mirror of
https://github.com/SchildiChat/element-web.git
synced 2024-10-01 01:26:12 -04:00
Setup crypto store for restore session tests
The new storage consistency work expects a crypto store exist together with local storage. This updates the loading tests to create them together. Needed for https://github.com/vector-im/riot-web/issues/9109
This commit is contained in:
parent
fa10022496
commit
eb1d1517ca
@ -293,12 +293,19 @@ describe('loading:', function() {
|
|||||||
});
|
});
|
||||||
|
|
||||||
describe("MatrixClient rehydrated from stored credentials:", function() {
|
describe("MatrixClient rehydrated from stored credentials:", function() {
|
||||||
beforeEach(function() {
|
beforeEach(async function() {
|
||||||
localStorage.setItem("mx_hs_url", "http://localhost" );
|
localStorage.setItem("mx_hs_url", "http://localhost" );
|
||||||
localStorage.setItem("mx_is_url", "http://localhost" );
|
localStorage.setItem("mx_is_url", "http://localhost" );
|
||||||
localStorage.setItem("mx_access_token", "access_token");
|
localStorage.setItem("mx_access_token", "access_token");
|
||||||
localStorage.setItem("mx_user_id", "@me:localhost");
|
localStorage.setItem("mx_user_id", "@me:localhost");
|
||||||
localStorage.setItem("mx_last_room_id", "!last_room:id");
|
localStorage.setItem("mx_last_room_id", "!last_room:id");
|
||||||
|
|
||||||
|
// Create a crypto store as well to satisfy storage consistency checks
|
||||||
|
const cryptoStore = new jssdk.IndexedDBCryptoStore(
|
||||||
|
indexedDB,
|
||||||
|
"matrix-js-sdk:crypto",
|
||||||
|
);
|
||||||
|
await cryptoStore._connect();
|
||||||
});
|
});
|
||||||
|
|
||||||
it('shows the last known room by default', function() {
|
it('shows the last known room by default', function() {
|
||||||
|
Loading…
Reference in New Issue
Block a user