mirror of
https://github.com/umami-software/umami.git
synced 2026-02-18 11:35:37 +01:00
Refactor login functionality to use email instead of username. Update related tests, API routes, and database schema to support email-based authentication. Ensure consistency across login forms and queries.
This commit is contained in:
parent
d961c058dd
commit
6223e22c0d
7 changed files with 49 additions and 21 deletions
|
|
@ -9,9 +9,9 @@ describe('Login tests', () => {
|
|||
defaultCommandTimeout: 10000,
|
||||
},
|
||||
() => {
|
||||
cy.getDataTest('input-username').find('input').as('inputUsername').click();
|
||||
cy.get('@inputUsername').type(Cypress.env('umami_user'), { delay: 0 });
|
||||
cy.get('@inputUsername').click();
|
||||
cy.getDataTest('input-username').find('input').as('inputEmail').click();
|
||||
cy.get('@inputEmail').type(Cypress.env('umami_email'), { delay: 0 });
|
||||
cy.get('@inputEmail').click();
|
||||
cy.getDataTest('input-password')
|
||||
.find('input')
|
||||
.type(Cypress.env('umami_password'), { delay: 0 });
|
||||
|
|
@ -25,12 +25,12 @@ describe('Login tests', () => {
|
|||
cy.getDataTest('button-submit').click();
|
||||
cy.contains(/Required/i).should('be.visible');
|
||||
|
||||
cy.getDataTest('input-username').find('input').as('inputUsername');
|
||||
cy.get('@inputUsername').click();
|
||||
cy.get('@inputUsername').type(Cypress.env('umami_user'), { delay: 0 });
|
||||
cy.get('@inputUsername').click();
|
||||
cy.getDataTest('input-username').find('input').as('inputEmail');
|
||||
cy.get('@inputEmail').click();
|
||||
cy.get('@inputEmail').type(Cypress.env('umami_email'), { delay: 0 });
|
||||
cy.get('@inputEmail').click();
|
||||
cy.getDataTest('input-password').find('input').type('wrongpassword', { delay: 0 });
|
||||
cy.getDataTest('button-submit').click();
|
||||
cy.contains(/Incorrect username and\/or password./i).should('be.visible');
|
||||
cy.contains(/Incorrect username and\/or password\./i).should('be.visible');
|
||||
});
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue