mirror of
https://github.com/element-hq/element-web.git
synced 2024-12-12 01:05:53 +03:00
fix some tests
This commit is contained in:
parent
955ec14db9
commit
0b8196343f
2 changed files with 12 additions and 2 deletions
|
@ -21,6 +21,7 @@ const ReactDOM = require("react-dom");
|
||||||
const TestUtils = require('react-addons-test-utils');
|
const TestUtils = require('react-addons-test-utils');
|
||||||
const expect = require('expect');
|
const expect = require('expect');
|
||||||
import sinon from 'sinon';
|
import sinon from 'sinon';
|
||||||
|
import { EventEmitter } from "events";
|
||||||
|
|
||||||
const sdk = require('matrix-react-sdk');
|
const sdk = require('matrix-react-sdk');
|
||||||
|
|
||||||
|
@ -46,8 +47,14 @@ const WrappedMessagePanel = React.createClass({
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|
||||||
|
getInitialState: function() {
|
||||||
|
return {
|
||||||
|
resizeNotifier: new EventEmitter(),
|
||||||
|
};
|
||||||
|
},
|
||||||
|
|
||||||
render: function() {
|
render: function() {
|
||||||
return <MessagePanel room={room} {...this.props} />;
|
return <MessagePanel room={room} {...this.props} resizeNotifier={this.state.resizeNotifier} />;
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -19,6 +19,7 @@ const ReactDOM = require("react-dom");
|
||||||
const ReactTestUtils = require('react-addons-test-utils');
|
const ReactTestUtils = require('react-addons-test-utils');
|
||||||
const expect = require('expect');
|
const expect = require('expect');
|
||||||
import Promise from 'bluebird';
|
import Promise from 'bluebird';
|
||||||
|
import { EventEmitter } from "events";
|
||||||
|
|
||||||
const sdk = require('matrix-react-sdk');
|
const sdk = require('matrix-react-sdk');
|
||||||
|
|
||||||
|
@ -29,6 +30,7 @@ const Tester = React.createClass({
|
||||||
getInitialState: function() {
|
getInitialState: function() {
|
||||||
return {
|
return {
|
||||||
tileKeys: [],
|
tileKeys: [],
|
||||||
|
resizeNotifier: new EventEmitter(),
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -130,7 +132,8 @@ const Tester = React.createClass({
|
||||||
return (
|
return (
|
||||||
<ScrollPanel ref="sp"
|
<ScrollPanel ref="sp"
|
||||||
onScroll={this._onScroll}
|
onScroll={this._onScroll}
|
||||||
onFillRequest={this._onFillRequest}>
|
onFillRequest={this._onFillRequest}
|
||||||
|
resizeNotifier={this.state.resizeNotifier}>
|
||||||
{ tiles }
|
{ tiles }
|
||||||
</ScrollPanel>
|
</ScrollPanel>
|
||||||
);
|
);
|
||||||
|
|
Loading…
Reference in a new issue