Skip to content

Commit 7b8df5f

Browse files
committed
test: add extra unit test for invalid login
1 parent dccb6c4 commit 7b8df5f

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

cypress/e2e/login.cy.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,16 @@ describe('Login page', () => {
3131
cy.url().should('include', '/dashboard/repo');
3232
})
3333

34+
it('should show an error snackbar on invalid login', () => {
35+
cy.get('[data-test="username"]').type('wronguser');
36+
cy.get('[data-test="password"]').type('wrongpass');
37+
cy.get('[data-test="login"]').click();
38+
39+
cy.get('.MuiSnackbarContent-message')
40+
.should('be.visible')
41+
.and('contain', 'You entered an invalid username or password...');
42+
});
43+
3444
describe('OIDC login button', () => {
3545
it('should exist', () => {
3646
cy.get('[data-test="oidc-login"]').should('exist');

0 commit comments

Comments
 (0)