fix: make workspace navigation atomic and return home on account switch

This commit is contained in:
SantaSpeen committed 2026-10-25 21:19:10 +03:00
1 parent c02bf755f2
commit 55f2474660
21 files changed
+709 -61

No files matched your search

@@ -89,6 +89,12 @@ const { chromium } = require(process.env.PLAYWRIGHT_MODULE);
const independent = await device2.newPage();
await independent.goto(process.env.QA_APP_ONE + "/files/");
await independent.getByText("Alice-private.txt", { exact: true }).waitFor();
// The destination account has no such directory: switch must go home first.
await b
.locator("#listing")
.getByRole("button", { name: "Alice-only", exact: true })
.dblclick();
await b.getByText("nested-Alice.txt", { exact: true }).waitFor();
// Hold a valid A response until after both applications have switched to B.
let release;
const held = new Promise((r) => (release = r));
@@ -119,6 +125,8 @@ const { chromium } = require(process.env.PLAYWRIGHT_MODULE);
.waitFor({ timeout: 15000 }),
]);
release();
assert.equal(new URL(a.url()).pathname, "/files/");
assert.equal(new URL(b.url()).pathname, "/files/");
await a.unroute("**/api/resources/");
await a.waitForTimeout(200);