|
1 | | -// describe('Log In Feature: Test Invalid login', () => { |
2 | | -// it('should not log in', () => { |
3 | | -// cy.visit('/accounts/login/'); |
4 | | -// cy.title().should('contain', 'Log in'); |
5 | | -// // cy.get('#cu-privacy-notice-button').click(); |
6 | | -// cy.get('#guest-login').click(); |
7 | | -// cy.get('form[name="login_local"] div.login-local-form') |
8 | | -// .should('be.visible'); |
9 | | -// cy.get('#id_username').type('foo'); |
10 | | -// cy.get('#id_username').blur(); |
11 | | -// cy.get('#id_password').type('foo'); |
12 | | -// cy.get('#id_password').blur(); |
13 | | -// cy.get('form[name="login_local"] button[type="submit"]').click(); |
14 | | -// cy.title().should('contain', 'Log in'); |
15 | | -// }); |
16 | | -// }); |
| 1 | +describe('Log In Feature: Test Invalid login', () => { |
| 2 | + it('should not log in', () => { |
| 3 | + cy.visit('/accounts/login/'); |
| 4 | + cy.title().should('contain', 'Log in'); |
| 5 | + // cy.get('#cu-privacy-notice-button').click(); |
| 6 | + cy.get('#guest-login').click(); |
| 7 | + cy.get('form[name="login_local"] div.login-local-form') |
| 8 | + .should('be.visible'); |
| 9 | + cy.get('#id_username').type('foo'); |
| 10 | + cy.get('#id_username').blur(); |
| 11 | + cy.get('#id_password').type('foo'); |
| 12 | + cy.get('#id_password').blur(); |
| 13 | + cy.get('form[name="login_local"] button[type="submit"]').click(); |
| 14 | + cy.title().should('contain', 'Log in'); |
| 15 | + }); |
| 16 | +}); |
17 | 17 |
|
18 | | -// describe('Log In Feature: Test Instructor Login', () => { |
19 | | -// it('Logs in as faculty_one', () => { |
20 | | -// cy.visit('/accounts/login/'); |
21 | | -// cy.title().should('contain', 'Log in'); |
22 | | -// cy.get('#guest-login').click(); |
23 | | -// cy.get('form[name="login_local"] div.login-local-form') |
24 | | -// .should('be.visible'); |
25 | | -// cy.get('#id_username').type('faculty_one'); |
26 | | -// cy.get('#id_username').blur(); |
27 | | -// cy.get('#id_password').type('test'); |
28 | | -// cy.get('#id_password').blur(); |
29 | | -// cy.get('form[name="login_local"] button[type="submit"]').click(); |
30 | | -// cy.title().should('contain', 'My Courses'); |
31 | | -// cy.get('.navbar').should('contain', 'Faculty One'); |
32 | | -// }); |
33 | | -// }); |
| 18 | +describe('Log In Feature: Test Instructor Login', () => { |
| 19 | + it('Logs in as faculty_one', () => { |
| 20 | + cy.visit('/accounts/login/'); |
| 21 | + cy.title().should('contain', 'Log in'); |
| 22 | + cy.get('#guest-login').click(); |
| 23 | + cy.get('form[name="login_local"] div.login-local-form') |
| 24 | + .should('be.visible'); |
| 25 | + cy.get('#id_username').type('faculty_one'); |
| 26 | + cy.get('#id_username').blur(); |
| 27 | + cy.get('#id_password').type('test'); |
| 28 | + cy.get('#id_password').blur(); |
| 29 | + cy.get('form[name="login_local"] button[type="submit"]').click(); |
| 30 | + cy.title().should('contain', 'My Courses'); |
| 31 | + cy.get('.navbar').should('contain', 'Faculty One'); |
| 32 | + }); |
| 33 | +}); |
34 | 34 |
|
35 | | -// describe('Log In Feature: Test Student Login', () => { |
36 | | -// it('should test student login', () => { |
37 | | -// cy.visit('/accounts/login/'); |
38 | | -// cy.title().should('contain', 'Log in'); |
39 | | -// cy.get('#guest-login').click(); |
40 | | -// cy.get('form[name="login_local"] div.login-local-form') |
41 | | -// .should('be.visible'); |
42 | | -// cy.get('#id_username').type('faculty_one'); |
43 | | -// cy.get('#id_username').blur(); |
44 | | -// cy.get('#id_password').type('test'); |
45 | | -// cy.get('#id_password').blur(); |
46 | | -// cy.get('form[name="login_local"] button[type="submit"]').click(); |
47 | | -// cy.title().should('contain', 'My Courses'); |
48 | | -// cy.get('.navbar').should('contain', 'Faculty One'); |
49 | | -// }); |
50 | | -// }); |
| 35 | +describe('Log In Feature: Test Student Login', () => { |
| 36 | + it('should test student login', () => { |
| 37 | + cy.visit('/accounts/login/'); |
| 38 | + cy.title().should('contain', 'Log in'); |
| 39 | + cy.get('#guest-login').click(); |
| 40 | + cy.get('form[name="login_local"] div.login-local-form') |
| 41 | + .should('be.visible'); |
| 42 | + cy.get('#id_username').type('faculty_one'); |
| 43 | + cy.get('#id_username').blur(); |
| 44 | + cy.get('#id_password').type('test'); |
| 45 | + cy.get('#id_password').blur(); |
| 46 | + cy.get('form[name="login_local"] button[type="submit"]').click(); |
| 47 | + cy.title().should('contain', 'My Courses'); |
| 48 | + cy.get('.navbar').should('contain', 'Faculty One'); |
| 49 | + }); |
| 50 | +}); |
0 commit comments