Skip to content

Instantly share code, notes, and snippets.

Why You Should Consider Using Cypress To Test Your Javascript Project - 1
it('should be able to log-in', ()=> {
cy.visit('https://www.mywebsite.com/login');
cy.get('#username"]').first().type('username');
cy.get('#password"]').first().type('password');
cy.get(`#loginButton > button`).click();
cy.get('.accountPage').should('contain', 'Welcome');
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment