test: Remove cacheAcrossSpecs to avoid bulk permission failure
This commit is contained in:
parent
443d508669
commit
8f5a199d64
1 changed files with 10 additions and 16 deletions
|
|
@ -37,22 +37,16 @@ Cypress.Commands.add("login", (email, password) => {
|
|||
// cy.session clears all localStorage on new login, so we need to retain the last route
|
||||
const session_last_route = window.localStorage.getItem("session_last_route");
|
||||
return cy
|
||||
.session(
|
||||
[email, password] || "",
|
||||
() => {
|
||||
return cy.request({
|
||||
url: "/api/method/login",
|
||||
method: "POST",
|
||||
body: {
|
||||
usr: email,
|
||||
pwd: password,
|
||||
},
|
||||
});
|
||||
},
|
||||
{
|
||||
cacheAcrossSpecs: true,
|
||||
}
|
||||
)
|
||||
.session([email, password] || "", () => {
|
||||
return cy.request({
|
||||
url: "/api/method/login",
|
||||
method: "POST",
|
||||
body: {
|
||||
usr: email,
|
||||
pwd: password,
|
||||
},
|
||||
});
|
||||
})
|
||||
.then(() => {
|
||||
if (session_last_route) {
|
||||
window.localStorage.setItem("session_last_route", session_last_route);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue