Skip to content
This repository has been archived by the owner on Jul 2, 2024. It is now read-only.

Commit

Permalink
Don't use session for now
Browse files Browse the repository at this point in the history
  • Loading branch information
minnakt committed Sep 8, 2023
1 parent 7c15736 commit aebc2bb
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions cypress/support/commands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,16 +59,11 @@ Cypress.Commands.add("getInputByLabel", (label: string) => {

/* login */
Cypress.Commands.add("login", () => {
const args = { ...user };
cy.session(
// Username & password can be used as the cache key too
args,
() => {
cy.origin("http://localhost:9090", { args }, ({ password, username }) => {
cy.request("POST", "/login", { username, password });
});
cy.getCookie("mci-token").then((c) => {
if (!c) {
cy.request("POST", "http://localhost:9090/login", { ...user });
}
);
});
});

/* logout */
Expand Down

0 comments on commit aebc2bb

Please sign in to comment.