[Security Solution] Removing cy.session from Cypress tests (#170969)

This commit is contained in:
Gloria Hornero 2023-11-09 18:33:47 +01:00 committed by GitHub
parent 8b4da3eee3
commit ebe0d1b0bf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 10 deletions

1
.github/CODEOWNERS vendored
View file

@ -1418,6 +1418,7 @@ x-pack/plugins/security_solution/server/lib/telemetry/ @elastic/security-data-an
## Security Solution sub teams - security-engineering-productivity
/x-pack/test/security_solution_cypress/* @elastic/security-engineering-productivity
/x-pack/test/security_solution_cypress/cypress/* @elastic/security-engineering-productivity
/x-pack/test/security_solution_cypress/cypress/tasks/login.ts @elastic/security-engineering-productivity
/x-pack/test/security_solution_cypress/es_archives @elastic/security-engineering-productivity
/x-pack/plugins/security_solution/scripts/run_cypress @MadameSheema @patrykkopycinski @oatkiller @maximpn @banderror

View file

@ -62,9 +62,7 @@ export interface User {
}
export const loginWithUser = (user: User): void => {
cy.session(user, () => {
loginWithUsernameAndPassword(user.username, user.password);
});
loginWithUsernameAndPassword(user.username, user.password);
};
/**
@ -129,9 +127,7 @@ const loginWithRole = (role: SecurityRoleName): void => {
const password = 'changeme';
cy.log(`origin: ${Cypress.config().baseUrl}`);
cy.session(role, () => {
loginWithUsernameAndPassword(role, password);
});
loginWithUsernameAndPassword(role, password);
};
/**
@ -154,10 +150,7 @@ const loginViaEnvironmentCredentials = (): void => {
const username = Cypress.env(ELASTICSEARCH_USERNAME);
const password = Cypress.env(ELASTICSEARCH_PASSWORD);
cy.session([username, password], () => {
loginWithUsernameAndPassword(username, password);
});
loginWithUsernameAndPassword(username, password);
};
/**