mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-04-22 08:26:16 -04:00
low hanging lint and some hard coded timeouts
This commit is contained in:
parent
809670dbea
commit
edf1dabe65
36 changed files with 273 additions and 150 deletions
|
@ -1,3 +1,5 @@
|
|||
'use strict';
|
||||
|
||||
describe('delete keystroke', function () {
|
||||
// create a new pad before each test run
|
||||
beforeEach(function (cb) {
|
||||
|
@ -6,8 +8,9 @@ describe('delete keystroke', function () {
|
|||
});
|
||||
|
||||
it('makes text delete', function (done) {
|
||||
this.timeout(50);
|
||||
|
||||
const inner$ = helper.padInner$;
|
||||
const chrome$ = helper.padChrome$;
|
||||
|
||||
// get the first text element out of the inner iframe
|
||||
const $firstTextElement = inner$('div').first();
|
||||
|
@ -15,15 +18,12 @@ describe('delete keystroke', function () {
|
|||
// get the original length of this element
|
||||
const elementLength = $firstTextElement.text().length;
|
||||
|
||||
// get the original string value minus the last char
|
||||
const originalTextValue = $firstTextElement.text();
|
||||
const originalTextValueMinusFirstChar = originalTextValue.substring(1, originalTextValue.length);
|
||||
|
||||
// simulate key presses to delete content
|
||||
$firstTextElement.sendkeys('{leftarrow}'); // simulate a keypress of the left arrow key
|
||||
$firstTextElement.sendkeys('{del}'); // simulate a keypress of delete
|
||||
|
||||
// ace creates a new dom element when you press a keystroke, so just get the first text element again
|
||||
// ace creates a new dom element when you press a keystroke
|
||||
// so just get the first text element again
|
||||
const $newFirstTextElement = inner$('div').first();
|
||||
|
||||
// get the new length of this element
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue