Skip to content

Commit 95e247a

Browse files
authored
Merge pull request element-hq#9325 from jryans/storage-eviction-modal
Setup crypto store for restore session tests
2 parents c55223e + eb1d151 commit 95e247a

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

test/app-tests/loading.js

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -293,12 +293,19 @@ describe('loading:', function() {
293293
});
294294

295295
describe("MatrixClient rehydrated from stored credentials:", function() {
296-
beforeEach(function() {
296+
beforeEach(async function() {
297297
localStorage.setItem("mx_hs_url", "http://localhost" );
298298
localStorage.setItem("mx_is_url", "http://localhost" );
299299
localStorage.setItem("mx_access_token", "access_token");
300300
localStorage.setItem("mx_user_id", "@me:localhost");
301301
localStorage.setItem("mx_last_room_id", "!last_room:id");
302+
303+
// Create a crypto store as well to satisfy storage consistency checks
304+
const cryptoStore = new jssdk.IndexedDBCryptoStore(
305+
indexedDB,
306+
"matrix-js-sdk:crypto",
307+
);
308+
await cryptoStore._connect();
302309
});
303310

304311
it('shows the last known room by default', function() {

0 commit comments

Comments
 (0)