(page: typeof tab1)
| 38 | // This is what makes the two tabs independent; the shared session cookie |
| 39 | // is irrelevant to it. |
| 40 | const requestOrgSlugOf = async (page: typeof tab1): Promise<string> => { |
| 41 | const matching = page.waitForRequest( |
| 42 | (request) => |
| 43 | request.url().includes("/api/") && |
| 44 | request.headers()["x-executor-organization"] !== undefined, |
| 45 | { timeout: 15_000 }, |
| 46 | ); |
| 47 | // Nudge the app to refetch so a fresh scoped request goes out. |
| 48 | void page.reload({ waitUntil: "commit" }); |
| 49 | return (await matching).headers()["x-executor-organization"]!; |
| 50 | }; |
| 51 | |
| 52 | let slugA = ""; |
| 53 | let slugB = ""; |
no outgoing calls
no test coverage detected