Fix an issue where the scroll stopped working.
Under certain conditions, it was possible to get stuck in a state where any user-initiated scroll would be met with "Working around vector-im/vector-web#528" and overridden. Fix this by removing the duplication between _lastSetScroll and recentEventScroll, and using _lastSetScroll which is more reliable.
This commit is contained in:
parent
2d3a237101
commit
51fe77122b
4 changed files with 301 additions and 34 deletions
|
@ -5,6 +5,18 @@ var jssdk = require('matrix-js-sdk');
|
|||
var MatrixEvent = jssdk.MatrixEvent;
|
||||
var sinon = require('sinon');
|
||||
|
||||
/**
|
||||
* Perform common actions before each test case, e.g. printing the test case
|
||||
* name to stdout.
|
||||
* @param {Mocha.Context} context The test context
|
||||
*/
|
||||
module.exports.beforeEach = function(context) {
|
||||
var desc = context.currentTest.fullTitle();
|
||||
console.log();
|
||||
console.log(desc);
|
||||
console.log(new Array(1 + desc.length).join("="));
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Stub out the MatrixClient, and configure the MatrixClientPeg object to
|
||||
|
@ -128,22 +140,3 @@ module.exports.mkMessage = function(opts) {
|
|||
};
|
||||
return module.exports.mkEvent(opts);
|
||||
};
|
||||
|
||||
/**
|
||||
* make the test fail, with the given exception
|
||||
*
|
||||
* <p>This is useful for use with integration tests which use asyncronous
|
||||
* methods: it can be added as a 'catch' handler in a promise chain.
|
||||
*
|
||||
* @param {Error} error exception to be reported
|
||||
*
|
||||
* @example
|
||||
* it("should not throw", function(done) {
|
||||
* asynchronousMethod().then(function() {
|
||||
* // some tests
|
||||
* }).catch(utils.failTest).done(done);
|
||||
* });
|
||||
*/
|
||||
module.exports.failTest = function(error) {
|
||||
expect(error.stack).toBe(null);
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue