summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuiza Pagliari <lpagliari@gmail.com>2017-02-20 06:03:56 -0300
committerLuiza Pagliari <lpagliari@gmail.com>2017-02-20 06:03:56 -0300
commit15cda0fde6b3b5794b26331f36ab04413be0ee0e (patch)
tree7a7813ecd73f095fcb59d23bbcd7ceafa06e782f
parent92be6561137bb9db1569910faaff25c0607c4212 (diff)
downloadetherpad-lite-15cda0fde6b3b5794b26331f36ab04413be0ee0e.zip
[refactor] Use better way to select a single line
-rw-r--r--tests/frontend/specs/helper.js22
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);