mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-04-22 00:16:15 -04:00
lint: lint and various fixes of frontend test specs
This commit is contained in:
parent
da10d42183
commit
f8a19c4527
9 changed files with 261 additions and 240 deletions
|
@ -2,12 +2,15 @@
|
|||
|
||||
describe('scrolls to line', function () {
|
||||
// create a new pad with URL hash set before each test run
|
||||
beforeEach(function (cb) {
|
||||
helper.newPad({
|
||||
before(async function () {
|
||||
this.timeout(60000);
|
||||
await new Promise((resolve, reject) => helper.newPad({
|
||||
cb: (err) => {
|
||||
if (err != null) return reject(err);
|
||||
resolve();
|
||||
},
|
||||
hash: 'L4',
|
||||
cb,
|
||||
});
|
||||
this.timeout(10000);
|
||||
}));
|
||||
});
|
||||
|
||||
it('Scrolls down to Line 4', async function () {
|
||||
|
@ -19,25 +22,28 @@ describe('scrolls to line', function () {
|
|||
return (topOffset >= 100);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
describe('doesnt break on weird hash input', function () {
|
||||
// create a new pad with URL hash set before each test run
|
||||
beforeEach(function (cb) {
|
||||
helper.newPad({
|
||||
hash: '#DEEZ123123NUTS',
|
||||
cb,
|
||||
describe('doesnt break on weird hash input', function () {
|
||||
// create a new pad with URL hash set before each test run
|
||||
before(async function () {
|
||||
this.timeout(60000);
|
||||
await new Promise((resolve, reject) => helper.newPad({
|
||||
cb: (err) => {
|
||||
if (err != null) return reject(err);
|
||||
resolve();
|
||||
},
|
||||
hash: '#DEEZ123123NUTS',
|
||||
}));
|
||||
});
|
||||
this.timeout(10000);
|
||||
});
|
||||
|
||||
it('Does NOT change scroll', async function () {
|
||||
this.timeout(10000);
|
||||
const chrome$ = helper.padChrome$;
|
||||
await helper.waitForPromise(() => {
|
||||
const topOffset = parseInt(chrome$('iframe').first('iframe')
|
||||
.contents().find('#outerdocbody').css('top'));
|
||||
return (!topOffset); // no css top should be set.
|
||||
it('Does NOT change scroll', async function () {
|
||||
this.timeout(10000);
|
||||
const chrome$ = helper.padChrome$;
|
||||
await helper.waitForPromise(() => {
|
||||
const topOffset = parseInt(chrome$('iframe').first('iframe')
|
||||
.contents().find('#outerdocbody').css('top'));
|
||||
return (!topOffset); // no css top should be set.
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue