Merge branch 'develop' of github.com:vector-im/element-web into t3chguy/querystring
Conflicts: package.json src/@types/global.d.ts src/vector/app.tsx src/vector/jitsi/index.ts src/vector/platform/WebPlatform.ts yarn.lock
This commit is contained in:
commit
b03b4582c0
266 changed files with 11675 additions and 10340 deletions
|
@ -28,8 +28,8 @@ import MatrixReactTestUtils from 'matrix-react-test-utils';
|
|||
import * as jssdk from 'matrix-js-sdk';
|
||||
import * as sdk from 'matrix-react-sdk';
|
||||
import {MatrixClientPeg} from 'matrix-react-sdk/src/MatrixClientPeg';
|
||||
import {VIEWS} from 'matrix-react-sdk/src/components/structures/MatrixChat';
|
||||
import dis from 'matrix-react-sdk/src/dispatcher';
|
||||
import {Views} from 'matrix-react-sdk/src/components/structures/MatrixChat';
|
||||
import dis from 'matrix-react-sdk/src/dispatcher/dispatcher';
|
||||
import * as test_utils from '../test-utils';
|
||||
import MockHttpBackend from 'matrix-mock-request';
|
||||
import {parseQs, parseQsFromFragment} from '../../src/vector/url_utils';
|
||||
|
@ -312,7 +312,6 @@ describe('loading:', function() {
|
|||
|
||||
it('shows the last known room by default', function() {
|
||||
httpBackend.when('GET', '/pushrules').respond(200, {});
|
||||
httpBackend.when('POST', '/filter').respond(200, { filter_id: 'fid' });
|
||||
|
||||
loadApp();
|
||||
|
||||
|
@ -332,7 +331,6 @@ describe('loading:', function() {
|
|||
localStorage.removeItem("mx_last_room_id");
|
||||
|
||||
httpBackend.when('GET', '/pushrules').respond(200, {});
|
||||
httpBackend.when('POST', '/filter').respond(200, { filter_id: 'fid' });
|
||||
|
||||
loadApp();
|
||||
|
||||
|
@ -350,7 +348,6 @@ describe('loading:', function() {
|
|||
|
||||
it('shows a room view if we followed a room link', function() {
|
||||
httpBackend.when('GET', '/pushrules').respond(200, {});
|
||||
httpBackend.when('POST', '/filter').respond(200, { filter_id: 'fid' });
|
||||
|
||||
loadApp({
|
||||
uriFragment: "#/room/!room:id",
|
||||
|
@ -592,8 +589,10 @@ describe('loading:', function() {
|
|||
|
||||
describe('Token login:', function() {
|
||||
it('logs in successfully', function() {
|
||||
localStorage.setItem("mx_sso_hs_url", "https://homeserver");
|
||||
localStorage.setItem("mx_sso_is_url", "https://idserver");
|
||||
loadApp({
|
||||
queryString: "?loginToken=secretToken&homeserver=https%3A%2F%2Fhomeserver&identityServer=https%3A%2F%2Fidserver",
|
||||
queryString: "?loginToken=secretToken",
|
||||
});
|
||||
|
||||
return sleep(1).then(() => {
|
||||
|
@ -663,7 +662,6 @@ describe('loading:', function() {
|
|||
return sleep(1);
|
||||
}).then(() => {
|
||||
httpBackend.when('GET', '/pushrules').respond(200, {});
|
||||
httpBackend.when('POST', '/filter').respond(200, { filter_id: 'fid' });
|
||||
return expectAndAwaitSync().catch((e) => {
|
||||
throw new Error("Never got /sync after login: did the client start?");
|
||||
});
|
||||
|
@ -683,7 +681,7 @@ function assertAtLoadingSpinner(matrixChat) {
|
|||
}
|
||||
|
||||
function awaitLoggedIn(matrixChat) {
|
||||
if (matrixChat.state.view === VIEWS.LOGGED_IN) {
|
||||
if (matrixChat.state.view === Views.LOGGED_IN) {
|
||||
return Promise.resolve();
|
||||
}
|
||||
return new Promise(resolve => {
|
||||
|
@ -708,7 +706,7 @@ function awaitRoomView(matrixChat, retryLimit, retryCount) {
|
|||
retryCount = 0;
|
||||
}
|
||||
|
||||
if (matrixChat.state.view !== VIEWS.LOGGED_IN || !matrixChat.state.ready) {
|
||||
if (matrixChat.state.view !== Views.LOGGED_IN || !matrixChat.state.ready) {
|
||||
console.log(Date.now() + " Awaiting room view: not ready yet.");
|
||||
if (retryCount >= retryLimit) {
|
||||
throw new Error("MatrixChat still not ready after " +
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue