Work around rust crypto bug which causes flakiness (#12656)
* Work around rust crypto bug which causes flakiness Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Iterate Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Add comment Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Update playwright/e2e/crypto/crypto.spec.ts Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com> --------- Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>
This commit is contained in:
parent
1bf430ba23
commit
e9abc55869
1 changed files with 10 additions and 0 deletions
|
@ -451,6 +451,7 @@ test.describe("Cryptography", function () {
|
||||||
homeserver,
|
homeserver,
|
||||||
user: aliceCredentials,
|
user: aliceCredentials,
|
||||||
}) => {
|
}) => {
|
||||||
|
test.slow();
|
||||||
const securityKey = await enableKeyBackup(app);
|
const securityKey = await enableKeyBackup(app);
|
||||||
|
|
||||||
// bob sends a valid event
|
// bob sends a valid event
|
||||||
|
@ -468,6 +469,15 @@ test.describe("Cryptography", function () {
|
||||||
|
|
||||||
/* log out, and back in */
|
/* log out, and back in */
|
||||||
await logOutOfElement(page);
|
await logOutOfElement(page);
|
||||||
|
// Reload to work around a Rust crypto bug where it can hold onto the indexeddb even after logout
|
||||||
|
// https://github.com/element-hq/element-web/issues/25779
|
||||||
|
await page.addInitScript(() => {
|
||||||
|
// When we reload, the initScript created by the `user`/`pageWithCredentials` fixtures
|
||||||
|
// will re-inject the original credentials into localStorage, which we don't want.
|
||||||
|
// To work around, we add a second initScript which will clear localStorage again.
|
||||||
|
window.localStorage.clear();
|
||||||
|
});
|
||||||
|
await page.reload();
|
||||||
await logIntoElement(page, homeserver, aliceCredentials, securityKey);
|
await logIntoElement(page, homeserver, aliceCredentials, securityKey);
|
||||||
|
|
||||||
/* go back to the test room and find Bob's message again */
|
/* go back to the test room and find Bob's message again */
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue