mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-04-28 03:16:16 -04:00
jshint and test
This commit is contained in:
parent
a2a7322226
commit
1956b29093
2 changed files with 41 additions and 11 deletions
24
tests/frontend/specs/scrollTo.js
Executable file
24
tests/frontend/specs/scrollTo.js
Executable file
|
@ -0,0 +1,24 @@
|
|||
'use strict';
|
||||
|
||||
describe('scrolls to line', function () {
|
||||
// create a new pad with URL hash set before each test run
|
||||
beforeEach(function (cb) {
|
||||
helper.newPad({
|
||||
hash: 'L4',
|
||||
cb,
|
||||
});
|
||||
this.timeout(10000);
|
||||
});
|
||||
|
||||
|
||||
it('Scrolls down to Line 4', function (done) {
|
||||
this.timeout(10000);
|
||||
const chrome$ = helper.padChrome$;
|
||||
helper.waitFor(() => {
|
||||
const topOffset = parseInt(chrome$('iframe').first('iframe')
|
||||
.contents().find('#outerdocbody').css('top'));
|
||||
return (topOffset >= 100);
|
||||
});
|
||||
done();
|
||||
});
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue