Merge pull request #2970 from xavidotron/url

Remove [ and ] from the regexp used by the URL filter.
This commit is contained in:
John McLear 2016-06-28 07:28:18 +01:00 committed by GitHub
commit ab4f23aae5
2 changed files with 24 additions and 1 deletions

View file

@ -44,4 +44,27 @@ describe("urls", function(){
}, 2000).done(done);
});
it("when you enter a url followed by a ], the ] is not included in the URL", function(done) {
var inner$ = helper.padInner$;
var chrome$ = helper.padChrome$;
//get the first text element out of the inner iframe
var firstTextElement = inner$("div").first();
var url = "http://etherpad.org/";
// simulate key presses to delete content
firstTextElement.sendkeys('{selectall}'); // select all
firstTextElement.sendkeys('{del}'); // clear the first line
firstTextElement.sendkeys(url); // insert a URL
firstTextElement.sendkeys(']'); // put a ] after it
helper.waitFor(function(){
if(inner$("div").first().find("a").length === 1){ // if it contains an A link
if(inner$("div").first().find("a")[0].href === url){
return true;
}
};
}, 2000).done(done);
});
});