mirror of https://github.com/vector-im/riot-web
Merge remote-tracking branch 'origin/develop' into develop
commit
ae8ad6969a
|
@ -71,7 +71,7 @@ describe('loading:', function () {
|
||||||
});
|
});
|
||||||
|
|
||||||
afterEach(async function () {
|
afterEach(async function () {
|
||||||
console.log('loading: afterEach');
|
console.log(`${Date.now()}: loading: afterEach`);
|
||||||
if (parentDiv) {
|
if (parentDiv) {
|
||||||
ReactDOM.unmountComponentAtNode(parentDiv);
|
ReactDOM.unmountComponentAtNode(parentDiv);
|
||||||
parentDiv.remove();
|
parentDiv.remove();
|
||||||
|
@ -84,6 +84,7 @@ describe('loading:', function () {
|
||||||
// clear the indexeddbs so we can start from a clean slate next time.
|
// clear the indexeddbs so we can start from a clean slate next time.
|
||||||
await test_utils.deleteIndexedDB('matrix-js-sdk:crypto');
|
await test_utils.deleteIndexedDB('matrix-js-sdk:crypto');
|
||||||
await test_utils.deleteIndexedDB('matrix-js-sdk:riot-web-sync');
|
await test_utils.deleteIndexedDB('matrix-js-sdk:riot-web-sync');
|
||||||
|
console.log(`${Date.now()}: loading: afterEach complete`);
|
||||||
});
|
});
|
||||||
|
|
||||||
/* simulate the load process done by index.js
|
/* simulate the load process done by index.js
|
||||||
|
@ -615,7 +616,6 @@ describe('loading:', function () {
|
||||||
matrixChat, sdk.getComponent('structures.login.Login'));
|
matrixChat, sdk.getComponent('structures.login.Login'));
|
||||||
|
|
||||||
httpBackend.when('POST', '/login').check(function(req) {
|
httpBackend.when('POST', '/login').check(function(req) {
|
||||||
console.log(req);
|
|
||||||
expect(req.data.type).toEqual('m.login.password');
|
expect(req.data.type).toEqual('m.login.password');
|
||||||
expect(req.data.identifier.type).toEqual('m.id.user');
|
expect(req.data.identifier.type).toEqual('m.id.user');
|
||||||
expect(req.data.identifier.user).toEqual('user');
|
expect(req.data.identifier.user).toEqual('user');
|
||||||
|
|
|
@ -34,25 +34,25 @@ export function deleteIndexedDB(dbName) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
console.log(`Removing indexeddb instance: ${dbName}`);
|
console.log(`${Date.now()}: Removing indexeddb instance: ${dbName}`);
|
||||||
const req = window.indexedDB.deleteDatabase(dbName);
|
const req = window.indexedDB.deleteDatabase(dbName);
|
||||||
|
|
||||||
req.onblocked = () => {
|
req.onblocked = () => {
|
||||||
console.log(`can't yet delete indexeddb ${dbName} because it is open elsewhere`);
|
console.log(`${Date.now()}: can't yet delete indexeddb ${dbName} because it is open elsewhere`);
|
||||||
};
|
};
|
||||||
|
|
||||||
req.onerror = (ev) => {
|
req.onerror = (ev) => {
|
||||||
reject(new Error(
|
reject(new Error(
|
||||||
`unable to delete indexeddb ${dbName}: ${ev.target.error}`,
|
`${Date.now()}: unable to delete indexeddb ${dbName}: ${ev.target.error}`,
|
||||||
));
|
));
|
||||||
};
|
};
|
||||||
|
|
||||||
req.onsuccess = () => {
|
req.onsuccess = () => {
|
||||||
console.log(`Removed indexeddb instance: ${dbName}`);
|
console.log(`${Date.now()}: Removed indexeddb instance: ${dbName}`);
|
||||||
resolve();
|
resolve();
|
||||||
};
|
};
|
||||||
}).catch((e) => {
|
}).catch((e) => {
|
||||||
console.error(`Error removing indexeddb instance ${dbName}: ${e}`);
|
console.error(`${Date.now()}: Error removing indexeddb instance ${dbName}: ${e}`);
|
||||||
throw e;
|
throw e;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue