diff options
author | John McLear <john@mclear.co.uk> | 2014-12-29 00:30:11 +0100 |
---|---|---|
committer | John McLear <john@mclear.co.uk> | 2014-12-29 00:30:11 +0100 |
commit | cec9065df8bb4c6b7a9d091090c4bc06965b7bc5 (patch) | |
tree | 62a2e656b719816208f09c42d1116953c6ec66ae /tests/frontend | |
parent | 9715e039cdc1e98a872cdb9d4dad36f16498add3 (diff) | |
download | etherpad-lite-cec9065df8bb4c6b7a9d091090c4bc06965b7bc5.zip |
test for #2395 #2402
Diffstat (limited to 'tests/frontend')
-rw-r--r-- | tests/frontend/specs/unordered_list.js | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/tests/frontend/specs/unordered_list.js b/tests/frontend/specs/unordered_list.js new file mode 100644 index 00000000..4ea77b8a --- /dev/null +++ b/tests/frontend/specs/unordered_list.js @@ -0,0 +1,35 @@ +describe("assign unordered list", function(){ + //create a new pad before each test run + beforeEach(function(cb){ + helper.newPad(cb); + this.timeout(60000); + }); + + it("insert unordered list text then removes by outdent", function(done){ + var inner$ = helper.padInner$; + var chrome$ = helper.padChrome$; + var originalText = inner$("div").first().text(); + + var $insertunorderedlistButton = chrome$(".buttonicon-insertunorderedlist"); + $insertunorderedlistButton.click(); + + helper.waitFor(function(){ + var newText = inner$("div").first().text(); + if(newText === originalText){ + return inner$("div").first().find("ul li").length === 1; + } + }).done(function(){ + + // remove indentation by bullet and ensure text string remains the same + chrome$(".buttonicon-outdent").click(); + helper.waitFor(function(){ + var newText = inner$("div").first().text(); + return (newText === originalText); + }).done(function(){ + done(); + }); + + }); + }); + +}); |