etherpad-lite/tests/frontend/specs/unordered_list.js
muxator 04e9fc3a2f formatting: bulk remove trailing whitespaces on frontend tests
This is a followup on 312c72c364, which did the same on the main code base,
and is preliminary work for tidying up John's changes in the following commits.

No functional changes.

Command:
    find tests/frontend -name '*.js' -type f -print0 | xargs -0 sed --in-place 's/[[:space:]]*$//'
2020-03-24 23:24:38 +01:00

35 lines
1 KiB
JavaScript

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();
});
});
});
});