Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Commit

Permalink
Update playwright/e2e/crypto/crypto.spec.ts
Browse files Browse the repository at this point in the history
Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>
  • Loading branch information
t3chguy and richvdh authored Jun 20, 2024
1 parent e26f7fc commit f0bd1ff
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions playwright/e2e/crypto/crypto.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -472,8 +472,9 @@ test.describe("Cryptography", function () {
// 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(() => {
// Clear localStorage as the user/pageWithCredentials fixtures will re-inject them on reload otherwise
// and by logging out we just invalidated the token that will be injected, causing a 401 unauth error.
// 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();
Expand Down

0 comments on commit f0bd1ff

Please sign in to comment.