fix(core): Do not validate email when LDAP is enabled (#13605)

This commit is contained in:
Ricardo Espinoza
2025-03-03 19:15:52 +01:00
committed by GitHub
parent 24681f843c
commit 17738c5096
16 changed files with 187 additions and 83 deletions

View File

@@ -36,7 +36,7 @@ describe('User Management', { disableAutoLogin: true }, () => {
it('should login and logout', () => {
cy.visit('/');
cy.get('input[name="email"]').type(INSTANCE_OWNER.email);
cy.get('input[name="emailOrLdapLoginId"]').type(INSTANCE_OWNER.email);
cy.get('input[name="password"]').type(INSTANCE_OWNER.password);
cy.getByTestId('form-submit-button').click();
mainSidebar.getters.logo().should('be.visible');
@@ -47,7 +47,7 @@ describe('User Management', { disableAutoLogin: true }, () => {
mainSidebar.actions.openUserMenu();
cy.getByTestId('user-menu-item-logout').click();
cy.get('input[name="email"]').type(INSTANCE_MEMBERS[0].email);
cy.get('input[name="emailOrLdapLoginId"]').type(INSTANCE_MEMBERS[0].email);
cy.get('input[name="password"]').type(INSTANCE_MEMBERS[0].password);
cy.getByTestId('form-submit-button').click();
mainSidebar.getters.logo().should('be.visible');

View File

@@ -506,7 +506,7 @@ describe('Projects', { disableAutoLogin: true }, () => {
mainSidebar.actions.openUserMenu();
cy.getByTestId('user-menu-item-logout').click();
cy.get('input[name="email"]').type(INSTANCE_MEMBERS[0].email);
cy.get('input[name="emailOrLdapLoginId"]').type(INSTANCE_MEMBERS[0].email);
cy.get('input[name="password"]').type(INSTANCE_MEMBERS[0].password);
cy.getByTestId('form-submit-button').click();

View File

@@ -15,7 +15,7 @@ export class SigninPage extends BasePage {
getters = {
form: () => cy.getByTestId('auth-form'),
email: () => cy.getByTestId('email'),
email: () => cy.getByTestId('emailOrLdapLoginId'),
password: () => cy.getByTestId('password'),
submit: () => cy.get('button'),
};

View File

@@ -69,7 +69,7 @@ Cypress.Commands.add('signin', ({ email, password }) => {
.request({
method: 'POST',
url: `${BACKEND_BASE_URL}/rest/login`,
body: { email, password },
body: { emailOrLdapLoginId: email, password },
failOnStatusCode: false,
})
.then((response) => {