Improve stability of Playwright screenshot tests (#11983)

This commit is contained in:
Michael Telatynski
2023-12-04 11:02:48 +00:00
committed by GitHub
parent 74ea0d134e
commit e180ca841b
23 changed files with 71 additions and 80 deletions

View File

@@ -118,11 +118,13 @@ async function interceptRequestsWithSoftLogout(page: Page, user: Credentials): P
await route.continue();
});
const promise = page.waitForResponse((resp) => resp.url().includes("/sync") && resp.status() === 401);
// do something to make the active /sync return: create a new room
await page.evaluate(() => {
// don't wait for this to complete: it probably won't, because of the broken sync
window.mxMatrixClientPeg.get().createRoom({});
});
await page.waitForResponse((resp) => resp.url().includes("/sync") && resp.status() === 401);
await promise;
}