diff --git a/test/cross.auto_refresh.test.js b/test/cross.auto_refresh.test.js index 2b0ebf2d..65001c8d 100644 --- a/test/cross.auto_refresh.test.js +++ b/test/cross.auto_refresh.test.js @@ -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." ) ); }); diff --git a/test/interception.basic1.test.js b/test/interception.basic1.test.js index c2db9207..587d122a 100644 --- a/test/interception.basic1.test.js +++ b/test/interception.basic1.test.js @@ -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 () {