Merge pull request #2817 from storytouch/fix_tests_2805

Fix flaky tests introduced by #2805
This commit is contained in:
Luiza Pagliari 2015-10-26 11:08:06 -02:00
commit 6c68396ed5
1 changed files with 6 additions and 2 deletions

View File

@ -80,7 +80,9 @@ describe("indentation button", function(){
$firstTextElement.sendkeys("line with '{{}'{enter}");
helper.waitFor(function(){
return inner$("div span").first().text().indexOf("line with '{'") === -1;
// wait for Etherpad to split four lines into separated divs
var $fourthLine = inner$("div").first().next().next().next();
return $fourthLine.text().indexOf("line with '{'") === 0;
}).done(function(){
// we validate bottom to top for easier implementation
@ -126,7 +128,9 @@ describe("indentation button", function(){
$firstTextElement.sendkeys("line 2{enter}");
helper.waitFor(function(){
return inner$("div span").first().text().indexOf("line 2") === -1;
// wait for Etherpad to split two lines into separated divs
var $secondLine = inner$("div").first().next();
return $secondLine.text().indexOf("line 2") === 0;
}).done(function(){
var $lineWithColon = inner$("div").first();
$lineWithColon.sendkeys(':');