Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- context('Actions', () => {
- beforeEach(() => {
- cy.visit('/login');
- });
- it('Bad sign in should fail', () => {
- cy.get('#username')
- .type('user@projectlounge.com');
- cy.get('#password')
- .type('Bad pass');
- cy.get('#LoginButton').click();
- cy.get('.alert')
- .should('contain', 'Bad credentials');
- });
- it('User sign in should work', () => {
- cy.get('#username')
- .type('user@projectlounge.com');
- cy.get('#password')
- .type('goodpassword');
- cy.get('#LoginButton').click();
- cy.get('#logout')
- .should('contain', 'Admin Console');
- });
- it('User sign in should work - case insensitive user', () => {
- cy.get('#username')
- .type('User@projectlounge.com');
- cy.get('#password')
- .type('goodpassword');
- cy.get('#LoginButton').click();
- cy.get('#logout')
- .should('contain', 'Admin Console');
- });
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement