Skip to content

Commit

Permalink
fix: tests (#264)
Browse files Browse the repository at this point in the history
  • Loading branch information
anku255 authored Jul 4, 2024
1 parent 6b998b0 commit c78093d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
4 changes: 2 additions & 2 deletions test/cross.auto_refresh.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -896,12 +896,12 @@ addTestCases((name, transferMethod, setupFunc, setupArgs = []) => {

assert(
consoleLogs.includes(
"Saving to cookies was not successful, this indicates a configuration error or the browser preventing us from writing the cookies (e.g.: incognito mode)."
"Saving to cookies was not successful, this indicates a configuration error or the browser preventing us from writing the cookies."
)
);
assert(
consoleLogs.includes(
"Failed to retrieve local session state from cookies after a successful session refresh. This indicates a configuration error or that the browser is preventing cookie writes (e.g., incognito mode)."
"Failed to retrieve local session state from cookies after a successful session refresh. This indicates a configuration error or that the browser is preventing cookie writes."
)
);
});
Expand Down
9 changes: 7 additions & 2 deletions test/interception.basic1.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -280,13 +280,18 @@ addTestCases((name, transferMethod, setupFunc, setupArgs = []) => {
assert(
logs.some(str =>
str.includes(
"Saving to cookies was not successful, this indicates a configuration error or the browser preventing us from writing the cookies (e.g.: incognito mode)."
"Saving to cookies was not successful, this indicates a configuration error or the browser preventing us from writing the cookies."
)
)
);

const cookies = await page.cookies();
assert.strictEqual(cookies.length, 0);
// Assert that none of the frontend cookies are set
const frontendCookies =
transferMethod === "cookie"
? ["sAntiCsrf", "sFrontToken", "st-last-access-token-update"]
: ["sFrontToken", "st-last-access-token-update", "st-access-token", "st-refresh-token"];
assert(frontendCookies.every(cookieName => !cookies.find(cookie => cookie.name === cookieName)));
});

it("test rid is there", async function () {
Expand Down

0 comments on commit c78093d

Please sign in to comment.