Fix some playwright flaky tests (#12357)
* Fix flaky test `should memorize the timeline position when switch Room A -> Room B -> Room A` Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Fix flaky test `should be correctly rendered - high contrast theme` Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Fix flaky test `Cryptography › setting up secure key backup should work isDeviceVerified=false` Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Update screenshots Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Update screenshots Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> --------- Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
|
@ -95,6 +95,10 @@ test.describe("Audio player", () => {
|
||||||
.mx_MessageTimestamp {
|
.mx_MessageTimestamp {
|
||||||
display: none !important;
|
display: none !important;
|
||||||
}
|
}
|
||||||
|
/* The MAB showing up on hover is not needed for the test */
|
||||||
|
.mx_MessageActionBar {
|
||||||
|
display: none !important;
|
||||||
|
}
|
||||||
`,
|
`,
|
||||||
mask: [page.locator(".mx_AudioPlayer_seek")],
|
mask: [page.locator(".mx_AudioPlayer_seek")],
|
||||||
};
|
};
|
||||||
|
|
|
@ -152,6 +152,12 @@ test.describe("Cryptography", function () {
|
||||||
await app.client.bootstrapCrossSigning(aliceCredentials);
|
await app.client.bootstrapCrossSigning(aliceCredentials);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
await page.route("**/_matrix/client/v3/keys/signatures/upload", async (route) => {
|
||||||
|
// We delay this API otherwise the `Setting up keys` may happen too quickly and cause flakiness
|
||||||
|
await new Promise((resolve) => setTimeout(resolve, 500));
|
||||||
|
await route.continue();
|
||||||
|
});
|
||||||
|
|
||||||
await app.settings.openUserSettings("Security & Privacy");
|
await app.settings.openUserSettings("Security & Privacy");
|
||||||
await page.getByRole("button", { name: "Set up Secure Backup" }).click();
|
await page.getByRole("button", { name: "Set up Secure Backup" }).click();
|
||||||
|
|
||||||
|
|
|
@ -92,6 +92,10 @@ test.describe("Room Directory", () => {
|
||||||
|
|
||||||
// Display Room B
|
// Display Room B
|
||||||
await app.viewRoomById(roomBId);
|
await app.viewRoomById(roomBId);
|
||||||
|
|
||||||
|
// Let the app settle to avoid flakiness
|
||||||
|
await page.waitForTimeout(500);
|
||||||
|
|
||||||
// Display Room A
|
// Display Room A
|
||||||
await app.viewRoomById(roomAId);
|
await app.viewRoomById(roomAId);
|
||||||
|
|
||||||
|
|
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 8.1 KiB |
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 8.3 KiB |
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 8.2 KiB |
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 8.3 KiB |