Advertisement
Guest User

Untitled

a guest
Jul 22nd, 2019
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.00 KB | None | 0 0
  1. context('Actions', () => {
  2. beforeEach(() => {
  3. cy.visit('/login');
  4. });
  5.  
  6. it('Bad sign in should fail', () => {
  7. cy.get('#username')
  8. .type('user@projectlounge.com');
  9. cy.get('#password')
  10. .type('Bad pass');
  11. cy.get('#LoginButton').click();
  12. cy.get('.alert')
  13. .should('contain', 'Bad credentials');
  14. });
  15.  
  16. it('User sign in should work', () => {
  17. cy.get('#username')
  18. .type('user@projectlounge.com');
  19. cy.get('#password')
  20. .type('goodpassword');
  21. cy.get('#LoginButton').click();
  22. cy.get('#logout')
  23. .should('contain', 'Admin Console');
  24. });
  25.  
  26.  
  27. it('User sign in should work - case insensitive user', () => {
  28. cy.get('#username')
  29. .type('User@projectlounge.com');
  30. cy.get('#password')
  31. .type('goodpassword');
  32. cy.get('#LoginButton').click();
  33. cy.get('#logout')
  34. .should('contain', 'Admin Console');
  35. });
  36. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement