Skip to content

Instantly share code, notes, and snippets.

@GeoffMahugu
Last active February 21, 2019 07:13
Show Gist options
  • Save GeoffMahugu/0ac2cfa5e78c37ea9edbe8ee82eba82a to your computer and use it in GitHub Desktop.
Save GeoffMahugu/0ac2cfa5e78c37ea9edbe8ee82eba82a to your computer and use it in GitHub Desktop.
First Test
//Describe is the block container for the test script.
describe('My First Test', function () {
//it: will contain the three phases for making a test
it('Visit Landing Page', function () {
//setup initial state by visiting the home page
cy.visit("127.0.0.1:4200/");
//Act: target the searchbox and type magma
cy.get('#search-box')
.type('magma');
//Assert that the input has the name magma
cy.get('#search-box').should('have.value', 'magma');
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment