Skip to content

Commit e7ec1f0

Browse files
committed
test(auth): Add default login redirect E2E test
1 parent 9736801 commit e7ec1f0

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

cypress/e2e/login.cy.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,18 @@ describe('Login page', () => {
1919
cy.get('[data-test="login"]').should('exist');
2020
});
2121

22+
it('should redirect to repo list on valid login', () => {
23+
cy.intercept('GET', '**/api/auth/me').as('getUser');
24+
25+
cy.get('[data-test="username"]').type('admin');
26+
cy.get('[data-test="password"]').type('admin');
27+
cy.get('[data-test="login"]').click();
28+
29+
cy.wait('@getUser');
30+
31+
cy.url().should('include', '/dashboard/repo');
32+
})
33+
2234
describe('OIDC login button', () => {
2335
it('should exist', () => {
2436
cy.get('[data-test="oidc-login"]').should('exist');

0 commit comments

Comments
 (0)