You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-07-30 02:21:17 +03:00
Make tests pass on Chrome again
It seems that a number of the tests had started failing when run in Chrome. They were fine under PhantomJS, but the MegolmExport tests only work under Chrome, and I need them to work... Mostly the problems were timing-related, where assumptions made about how quickly the `then` handler on a promise would be called were no longer valid. Possibly Chrome 55 has made some changes to the relative priorities of setTimeout and sendMessage calls. One of the TimelinePanel tests was failing because it was expecting the contents of a div to take up more room than they actually were. It's possible this is something very environment-specific; hopefully the new value will work on a wider range of machines. Also some logging tweaks.
This commit is contained in:
@ -99,7 +99,11 @@ describe('TimelinePanel', function() {
|
||||
// the document so that we can interact with it properly.
|
||||
parentDiv = document.createElement('div');
|
||||
parentDiv.style.width = '800px';
|
||||
parentDiv.style.height = '600px';
|
||||
|
||||
// This has to be slightly carefully chosen. We expect to have to do
|
||||
// exactly one pagination to fill it.
|
||||
parentDiv.style.height = '500px';
|
||||
|
||||
parentDiv.style.overflow = 'hidden';
|
||||
document.body.appendChild(parentDiv);
|
||||
});
|
||||
@ -235,7 +239,7 @@ describe('TimelinePanel', function() {
|
||||
expect(client.paginateEventTimeline.callCount).toEqual(0);
|
||||
done();
|
||||
}, 0);
|
||||
}, 0);
|
||||
}, 10);
|
||||
});
|
||||
|
||||
it("should let you scroll down to the bottom after you've scrolled up", function(done) {
|
||||
|
Reference in New Issue
Block a user