diff options
author | Luiza Pagliari <lpagliari@gmail.com> | 2017-02-20 06:03:56 -0300 |
---|---|---|
committer | Luiza Pagliari <lpagliari@gmail.com> | 2017-02-20 06:03:56 -0300 |
commit | 15cda0fde6b3b5794b26331f36ab04413be0ee0e (patch) | |
tree | 7a7813ecd73f095fcb59d23bbcd7ceafa06e782f /tests/frontend | |
parent | 92be6561137bb9db1569910faaff25c0607c4212 (diff) | |
download | etherpad-lite-15cda0fde6b3b5794b26331f36ab04413be0ee0e.zip |
[refactor] Use better way to select a single line
Diffstat (limited to 'tests/frontend')
-rw-r--r-- | tests/frontend/specs/helper.js | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/tests/frontend/specs/helper.js b/tests/frontend/specs/helper.js index 7270d479..863f7a92 100644 --- a/tests/frontend/specs/helper.js +++ b/tests/frontend/specs/helper.js @@ -115,7 +115,7 @@ describe("the test helper", function(){ // wait for lines to be split helper.waitFor(function(){ - var $fourthLine = helper.padInner$("div").slice(3,4); + var $fourthLine = helper.padInner$("div").eq(3); return $fourthLine.text() === "to test"; }).done(done); }); @@ -130,8 +130,8 @@ describe("the test helper", function(){ var endOffset = 4; var $lines = inner$("div"); - var $startLine = $lines.slice(1,2); - var $endLine = $lines.slice(3,4); + var $startLine = $lines.eq(1); + var $endLine = $lines.eq(3); helper.selectLines($startLine, $endLine, startOffset, endOffset); @@ -148,8 +148,8 @@ describe("the test helper", function(){ var endOffset = 1; var $lines = inner$("div"); - var $startLine = $lines.slice(1,2); - var $endLine = $lines.slice(4,5); + var $startLine = $lines.eq(1); + var $endLine = $lines.eq(4); helper.selectLines($startLine, $endLine, startOffset, endOffset); @@ -166,8 +166,8 @@ describe("the test helper", function(){ var endOffset = 0; var $lines = inner$("div"); - var $startLine = $lines.slice(1,2); - var $endLine = $lines.slice(3,4); + var $startLine = $lines.eq(1); + var $endLine = $lines.eq(3); helper.selectLines($startLine, $endLine, startOffset, endOffset); @@ -184,8 +184,8 @@ describe("the test helper", function(){ var endOffset = 50; var $lines = inner$("div"); - var $startLine = $lines.slice(1,2); - var $endLine = $lines.slice(3,4); + var $startLine = $lines.eq(1); + var $endLine = $lines.eq(3); helper.selectLines($startLine, $endLine, startOffset, endOffset); @@ -199,8 +199,8 @@ describe("the test helper", function(){ var inner$ = helper.padInner$; var $lines = inner$("div"); - var $startLine = $lines.slice(1,2); - var $endLine = $lines.slice(3,4); + var $startLine = $lines.eq(1); + var $endLine = $lines.eq(3); helper.selectLines($startLine, $endLine); |