Offline mode (#1723)
* Allow the client to run without connection to HS (i.e. using indexeddb) Allows running without having pushRules (it's safe not to have these when running from indexeddb sync.) This means rooms will be displayed with "unknown" notifcation state. This assumes anything that uses the push rules will get pushRule state again when the client starts syncing again. For recovering from being disconnected, * If an avatar has fallen back, try again on reconnection * If a thumbnail image failed to load, retry on reconnect * Load joined groups when reconnecting Update tests to give MELS a context.matrixClient
This commit is contained in:
parent
9625180fbe
commit
cf4ae681f4
7 changed files with 148 additions and 15 deletions
|
@ -1,12 +1,15 @@
|
|||
const expect = require('expect');
|
||||
const React = require('react');
|
||||
const ReactDOM = require("react-dom");
|
||||
const ReactTestUtils = require('react-addons-test-utils');
|
||||
const sdk = require('matrix-react-sdk');
|
||||
const MemberEventListSummary = sdk.getComponent('views.elements.MemberEventListSummary');
|
||||
import expect from 'expect';
|
||||
import React from 'react';
|
||||
import ReactTestUtils from 'react-addons-test-utils';
|
||||
import sdk from 'matrix-react-sdk';
|
||||
import * as languageHandler from '../../../../src/languageHandler';
|
||||
import * as testUtils from '../../../test-utils';
|
||||
|
||||
// Give MELS a matrixClient in its child context
|
||||
const MemberEventListSummary = testUtils.wrapInMatrixClientContext(
|
||||
sdk.getComponent('views.elements.MemberEventListSummary'),
|
||||
);
|
||||
|
||||
const testUtils = require('../../../test-utils');
|
||||
describe('MemberEventListSummary', function() {
|
||||
let sandbox;
|
||||
|
||||
|
@ -113,7 +116,6 @@ describe('MemberEventListSummary', function() {
|
|||
renderer.render(<MemberEventListSummary {...props} />);
|
||||
const result = renderer.getRenderOutput();
|
||||
|
||||
expect(result.type).toBe('div');
|
||||
expect(result.props.children).toEqual([
|
||||
<div className="event_tile" key="event0">Expanded membership</div>,
|
||||
]);
|
||||
|
@ -136,7 +138,6 @@ describe('MemberEventListSummary', function() {
|
|||
renderer.render(<MemberEventListSummary {...props} />);
|
||||
const result = renderer.getRenderOutput();
|
||||
|
||||
expect(result.type).toBe('div');
|
||||
expect(result.props.children).toEqual([
|
||||
<div className="event_tile" key="event0">Expanded membership</div>,
|
||||
<div className="event_tile" key="event1">Expanded membership</div>,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue