element now?
- var isstrikethrough = $newFirstTextElement.find("s").length === 1;
-
- //expect it to be strikethrough
- expect(isstrikethrough).to.be(true);
-
- //make sure the text hasn't changed
- expect($newFirstTextElement.text()).to.eql($firstTextElement.text());
-
- done();
- });
-});
diff --git a/tests/frontend/specs/timeslider.js b/tests/frontend/specs/timeslider.js
deleted file mode 100644
index bca80ba49..000000000
--- a/tests/frontend/specs/timeslider.js
+++ /dev/null
@@ -1,47 +0,0 @@
-//deactivated, we need a nice way to get the timeslider, this is ugly
-xdescribe("timeslider button takes you to the timeslider of a pad", function(){
- beforeEach(function(cb){
- helper.newPad(cb); // creates a new pad
- this.timeout(60000);
- });
-
- it("timeslider contained in URL", function(done){
- var inner$ = helper.padInner$;
- var chrome$ = helper.padChrome$;
-
- // get the first text element inside the editable space
- var $firstTextElement = inner$("div span").first();
- var originalValue = $firstTextElement.text(); // get the original value
- var newValue = "Testing"+originalValue;
- $firstTextElement.sendkeys("Testing"); // send line 1 to the pad
-
- var modifiedValue = $firstTextElement.text(); // get the modified value
- expect(modifiedValue).not.to.be(originalValue); // expect the value to change
-
- helper.waitFor(function(){
- return modifiedValue !== originalValue; // The value has changed so we can..
- }).done(function(){
-
- var $timesliderButton = chrome$("#timesliderlink");
- $timesliderButton.click(); // So click the timeslider link
-
- helper.waitFor(function(){
- var iFrameURL = chrome$.window.location.href;
- if(iFrameURL){
- return iFrameURL.indexOf("timeslider") !== -1;
- }else{
- return false; // the URL hasnt been set yet
- }
- }).done(function(){
- // click the buttons
- var iFrameURL = chrome$.window.location.href; // get the url
- var inTimeslider = iFrameURL.indexOf("timeslider") !== -1;
- expect(inTimeslider).to.be(true); // expect the value to change
- done();
- });
-
-
- });
- });
-});
-
diff --git a/tests/frontend/specs/timeslider_follow.js b/tests/frontend/specs/timeslider_follow.js
deleted file mode 100644
index 258abc3ec..000000000
--- a/tests/frontend/specs/timeslider_follow.js
+++ /dev/null
@@ -1,55 +0,0 @@
-describe("timeslider", function(){
- //create a new pad before each test run
- beforeEach(function(cb){
- helper.newPad(cb);
- this.timeout(6000);
- });
-
- it("follow content as it's added to timeslider", function(done) { // passes
- var inner$ = helper.padInner$;
- var chrome$ = helper.padChrome$;
-
- // make some changes to produce 100 revisions
- var timePerRev = 900
- , revs = 10;
- this.timeout(revs*timePerRev+10000);
- for(var i=0; i < revs; i++) {
- setTimeout(function() {
- // enter 'a' in the first text element
- inner$("div").last().sendkeys('a\n');
- inner$("div").last().sendkeys('{enter}');
- inner$("div").last().sendkeys('{enter}');
- inner$("div").last().sendkeys('{enter}');
- inner$("div").last().sendkeys('{enter}');
- }, timePerRev*i);
- }
-
- setTimeout(function() {
- // go to timeslider
- $('#iframe-container iframe').attr('src', $('#iframe-container iframe').attr('src')+'/timeslider#0');
-
- setTimeout(function() {
- var timeslider$ = $('#iframe-container iframe')[0].contentWindow.$;
- var $sliderBar = timeslider$('#ui-slider-bar');
-
- var latestContents = timeslider$('#innerdocbody').text();
-
- // set to follow contents as it arrives
- timeslider$('#options-followContents').prop("checked", true);
-
- var originalTop = timeslider$('#innerdocbody').offset();
- timeslider$('#playpause_button_icon').click();
-
- setTimeout(function() {
- //make sure the text has changed
- var newTop = timeslider$('#innerdocbody').offset();
- expect( originalTop ).not.to.eql( newTop );
- done();
- }, 1000);
-
- }, 2000);
- }, revs*timePerRev);
- });
-
-});
-
diff --git a/tests/frontend/specs/timeslider_labels.js b/tests/frontend/specs/timeslider_labels.js
deleted file mode 100644
index 09213a452..000000000
--- a/tests/frontend/specs/timeslider_labels.js
+++ /dev/null
@@ -1,64 +0,0 @@
-describe("timeslider", function(){
- //create a new pad before each test run
- beforeEach(function(cb){
- helper.newPad(cb);
- this.timeout(60000);
- });
-
- it("Shows a date and time in the timeslider and make sure it doesn't include NaN", function(done) {
- var inner$ = helper.padInner$;
- var chrome$ = helper.padChrome$;
-
- // make some changes to produce 100 revisions
- var revs = 10;
- this.timeout(60000);
- for(var i=0; i < revs; i++) {
- setTimeout(function() {
- // enter 'a' in the first text element
- inner$("div").first().sendkeys('a');
- }, 200);
- }
-
- setTimeout(function() {
- // go to timeslider
- $('#iframe-container iframe').attr('src', $('#iframe-container iframe').attr('src')+'/timeslider');
-
- setTimeout(function() {
- var timeslider$ = $('#iframe-container iframe')[0].contentWindow.$;
- var $sliderBar = timeslider$('#ui-slider-bar');
-
- var latestContents = timeslider$('#padcontent').text();
-
- // Expect the date and time to be shown
-
- // Click somewhere on the timeslider
- var e = new jQuery.Event('mousedown');
- e.clientX = e.pageX = 150;
- e.clientY = e.pageY = 45;
- $sliderBar.trigger(e);
-
- e = new jQuery.Event('mousedown');
- e.clientX = e.pageX = 150;
- e.clientY = e.pageY = 40;
- $sliderBar.trigger(e);
-
- e = new jQuery.Event('mousedown');
- e.clientX = e.pageX = 150;
- e.clientY = e.pageY = 50;
- $sliderBar.trigger(e);
-
- $sliderBar.trigger('mouseup')
-
- setTimeout(function() {
- //make sure the text has changed
- expect( timeslider$('#timer').text() ).not.to.eql( "" );
- expect( timeslider$('#revision_date').text() ).not.to.eql( "" );
- expect( timeslider$('#revision_label').text() ).not.to.eql( "" );
- var includesNaN = timeslider$('#revision_label').text().indexOf("NaN"); // NaN is bad. Naan ist gut
- expect( includesNaN ).to.eql( -1 ); // not quite so tasty, I like curry.
- done();
- }, 400);
- }, 2000);
- }, 2000);
- });
-});
diff --git a/tests/frontend/specs/timeslider_numeric_padID.js b/tests/frontend/specs/timeslider_numeric_padID.js
deleted file mode 100644
index e6071f091..000000000
--- a/tests/frontend/specs/timeslider_numeric_padID.js
+++ /dev/null
@@ -1,67 +0,0 @@
-describe("timeslider", function(){
- var padId = 735773577357+(Math.round(Math.random()*1000));
-
- //create a new pad before each test run
- beforeEach(function(cb){
- helper.newPad(cb, padId);
- this.timeout(60000);
- });
-
- it("Makes sure the export URIs are as expected when the padID is numeric", function(done) {
- var inner$ = helper.padInner$;
- var chrome$ = helper.padChrome$;
-
- // make some changes to produce 100 revisions
- var revs = 10;
- this.timeout(60000);
- for(var i=0; i < revs; i++) {
- setTimeout(function() {
- // enter 'a' in the first text element
- inner$("div").first().sendkeys('a');
- }, 100);
- }
-
- setTimeout(function() {
- // go to timeslider
- $('#iframe-container iframe').attr('src', $('#iframe-container iframe').attr('src')+'/timeslider');
-
- setTimeout(function() {
- var timeslider$ = $('#iframe-container iframe')[0].contentWindow.$;
- var $sliderBar = timeslider$('#ui-slider-bar');
-
- var latestContents = timeslider$('#padcontent').text();
-
- // Expect the date and time to be shown
-
- // Click somewhere on the timeslider
- var e = new jQuery.Event('mousedown');
- e.clientX = e.pageX = 150;
- e.clientY = e.pageY = 45;
- $sliderBar.trigger(e);
-
- e = new jQuery.Event('mousedown');
- e.clientX = e.pageX = 150;
- e.clientY = e.pageY = 40;
- $sliderBar.trigger(e);
-
- e = new jQuery.Event('mousedown');
- e.clientX = e.pageX = 150;
- e.clientY = e.pageY = 50;
- $sliderBar.trigger(e);
-
- $sliderBar.trigger('mouseup')
-
- setTimeout(function() {
- // expect URI to be similar to
- // http://192.168.1.48:9001/p/2/2/export/html
- // http://192.168.1.48:9001/p/735773577399/0/export/html
- var exportLink = timeslider$('#exporthtmla').attr('href');
- var checkVal = padId + "/0/export/html";
- var includesCorrectURI = exportLink.indexOf(checkVal);
- expect(includesCorrectURI).to.not.be(-1);
- done();
- }, 400);
- }, 2000);
- }, 2000);
- });
-});
diff --git a/tests/frontend/specs/timeslider_revisions.js b/tests/frontend/specs/timeslider_revisions.js
deleted file mode 100644
index 8fa7f5514..000000000
--- a/tests/frontend/specs/timeslider_revisions.js
+++ /dev/null
@@ -1,181 +0,0 @@
-describe("timeslider", function(){
- //create a new pad before each test run
- beforeEach(function(cb){
- helper.newPad(cb);
- this.timeout(60000);
- });
-
- it("loads adds a hundred revisions", function(done) { // passes
- var inner$ = helper.padInner$;
- var chrome$ = helper.padChrome$;
-
- // make some changes to produce 100 revisions
- var timePerRev = 900
- , revs = 99;
- this.timeout(revs*timePerRev+10000);
- for(var i=0; i < revs; i++) {
- setTimeout(function() {
- // enter 'a' in the first text element
- inner$("div").first().sendkeys('a');
- }, timePerRev*i);
- }
- chrome$('.buttonicon-savedRevision').click();
-
- setTimeout(function() {
- // go to timeslider
- $('#iframe-container iframe').attr('src', $('#iframe-container iframe').attr('src')+'/timeslider');
-
- setTimeout(function() {
- var timeslider$ = $('#iframe-container iframe')[0].contentWindow.$;
- var $sliderBar = timeslider$('#ui-slider-bar');
-
- var latestContents = timeslider$('#innerdocbody').text();
-
- // Click somewhere on the timeslider
- var e = new jQuery.Event('mousedown');
- // sets y co-ordinate of the pad slider modal.
- var base = (timeslider$('#ui-slider-bar').offset().top - 24)
- e.clientX = e.pageX = 150;
- e.clientY = e.pageY = base+5;
- $sliderBar.trigger(e);
-
- e = new jQuery.Event('mousedown');
- e.clientX = e.pageX = 150;
- e.clientY = e.pageY = base;
- $sliderBar.trigger(e);
-
- e = new jQuery.Event('mousedown');
- e.clientX = e.pageX = 150;
- e.clientY = e.pageY = base-5;
- $sliderBar.trigger(e);
-
- $sliderBar.trigger('mouseup')
-
- setTimeout(function() {
- //make sure the text has changed
- expect( timeslider$('#innerdocbody').text() ).not.to.eql( latestContents );
- var starIsVisible = timeslider$('.star').is(":visible");
- expect( starIsVisible ).to.eql( true );
- done();
- }, 1000);
-
- }, 6000);
- }, revs*timePerRev);
- });
-
-
- // Disabled as jquery trigger no longer works properly
- xit("changes the url when clicking on the timeslider", function(done) {
- var inner$ = helper.padInner$;
- var chrome$ = helper.padChrome$;
-
- // make some changes to produce 7 revisions
- var timePerRev = 1000
- , revs = 20;
- this.timeout(revs*timePerRev+10000);
- for(var i=0; i < revs; i++) {
- setTimeout(function() {
- // enter 'a' in the first text element
- inner$("div").first().sendkeys('a');
- }, timePerRev*i);
- }
-
- setTimeout(function() {
- // go to timeslider
- $('#iframe-container iframe').attr('src', $('#iframe-container iframe').attr('src')+'/timeslider');
-
- setTimeout(function() {
- var timeslider$ = $('#iframe-container iframe')[0].contentWindow.$;
- var $sliderBar = timeslider$('#ui-slider-bar');
-
- var latestContents = timeslider$('#innerdocbody').text();
- var oldUrl = $('#iframe-container iframe')[0].contentWindow.location.hash;
-
- // Click somewhere on the timeslider
- var e = new jQuery.Event('mousedown');
- e.clientX = e.pageX = 150;
- e.clientY = e.pageY = 60;
- $sliderBar.trigger(e);
-
- helper.waitFor(function(){
- return $('#iframe-container iframe')[0].contentWindow.location.hash != oldUrl;
- }, 6000).always(function(){
- expect( $('#iframe-container iframe')[0].contentWindow.location.hash ).not.to.eql( oldUrl );
- done();
- });
- }, 6000);
- }, revs*timePerRev);
- });
- it("jumps to a revision given in the url", function(done) {
- var inner$ = helper.padInner$;
- var chrome$ = helper.padChrome$;
- this.timeout(40000);
-
- // wait for the text to be loaded
- helper.waitFor(function(){
- return inner$('body').text().length != 0;
- }, 10000).always(function() {
- var newLines = inner$('body div').length;
- var oldLength = inner$('body').text().length + newLines / 2;
- expect( oldLength ).to.not.eql( 0 );
- inner$("div").first().sendkeys('a');
- var timeslider$;
-
- // wait for our additional revision to be added
- helper.waitFor(function(){
- // newLines takes the new lines into account which are strippen when using
- // inner$('body').text(), one is used for one line in ACE.
- var lenOkay = inner$('body').text().length + newLines / 2 != oldLength;
- // this waits for the color to be added to our , which means that the revision
- // was accepted by the server.
- var colorOkay = inner$('span').first().attr('class').indexOf("author-") == 0;
- return lenOkay && colorOkay;
- }, 10000).always(function() {
- // go to timeslider with a specific revision set
- $('#iframe-container iframe').attr('src', $('#iframe-container iframe').attr('src')+'/timeslider#0');
-
- // wait for the timeslider to be loaded
- helper.waitFor(function(){
- try {
- timeslider$ = $('#iframe-container iframe')[0].contentWindow.$;
- } catch(e){}
- if(timeslider$){
- return timeslider$('#innerdocbody').text().length == oldLength;
- }
- }, 10000).always(function(){
- expect( timeslider$('#innerdocbody').text().length ).to.eql( oldLength );
- done();
- });
- });
- });
- });
-
- it("checks the export url", function(done) {
- var inner$ = helper.padInner$;
- var chrome$ = helper.padChrome$;
- this.timeout(11000);
- inner$("div").first().sendkeys('a');
-
- setTimeout(function() {
- // go to timeslider
- $('#iframe-container iframe').attr('src', $('#iframe-container iframe').attr('src')+'/timeslider#0');
- var timeslider$;
- var exportLink;
-
- helper.waitFor(function(){
- try{
- timeslider$ = $('#iframe-container iframe')[0].contentWindow.$;
- }catch(e){}
- if(!timeslider$)
- return false;
- exportLink = timeslider$('#exportplaina').attr('href');
- if(!exportLink)
- return false;
- return exportLink.substr(exportLink.length - 12) == "0/export/txt";
- }, 6000).always(function(){
- expect( exportLink.substr(exportLink.length - 12) ).to.eql( "0/export/txt" );
- done();
- });
- }, 2500);
- });
-});
diff --git a/tests/frontend/specs/undo.js b/tests/frontend/specs/undo.js
deleted file mode 100644
index 172a2b81e..000000000
--- a/tests/frontend/specs/undo.js
+++ /dev/null
@@ -1,61 +0,0 @@
-describe("undo button", function(){
- beforeEach(function(cb){
- helper.newPad(cb); // creates a new pad
- this.timeout(60000);
- });
-
- it("undo some typing by clicking undo button", function(done){
- var inner$ = helper.padInner$;
- var chrome$ = helper.padChrome$;
-
- // get the first text element inside the editable space
- var $firstTextElement = inner$("div span").first();
- var originalValue = $firstTextElement.text(); // get the original value
-
- $firstTextElement.sendkeys("foo"); // send line 1 to the pad
- var modifiedValue = $firstTextElement.text(); // get the modified value
- expect(modifiedValue).not.to.be(originalValue); // expect the value to change
-
- // get clear authorship button as a variable
- var $undoButton = chrome$(".buttonicon-undo");
- // click the button
- $undoButton.click();
-
- helper.waitFor(function(){
- return inner$("div span").first().text() === originalValue;
- }).done(function(){
- var finalValue = inner$("div span").first().text();
- expect(finalValue).to.be(originalValue); // expect the value to change
- done();
- });
- });
-
- it("undo some typing using a keypress", function(done){
- var inner$ = helper.padInner$;
- var chrome$ = helper.padChrome$;
-
- // get the first text element inside the editable space
- var $firstTextElement = inner$("div span").first();
- var originalValue = $firstTextElement.text(); // get the original value
-
- $firstTextElement.sendkeys("foo"); // send line 1 to the pad
- var modifiedValue = $firstTextElement.text(); // get the modified value
- expect(modifiedValue).not.to.be(originalValue); // expect the value to change
-
- var e = inner$.Event(helper.evtType);
- e.ctrlKey = true; // Control key
- e.which = 90; // z
- inner$("#innerdocbody").trigger(e);
-
- helper.waitFor(function(){
- return inner$("div span").first().text() === originalValue;
- }).done(function(){
- var finalValue = inner$("div span").first().text();
- expect(finalValue).to.be(originalValue); // expect the value to change
- done();
- });
- });
-
-
-});
-
diff --git a/tests/frontend/specs/unordered_list.js b/tests/frontend/specs/unordered_list.js
deleted file mode 100644
index 2af843d61..000000000
--- a/tests/frontend/specs/unordered_list.js
+++ /dev/null
@@ -1,177 +0,0 @@
-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();
- });
-
- });
- });
-
-});
-
-describe("unassign 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 remove by clicking list again", 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
- $insertunorderedlistButton.click();
- helper.waitFor(function(){
- var isList = inner$("div").find("ul").length === 1;
- // sohuldn't be list
- return (isList === false);
- }).done(function(){
- done();
- });
-
- });
- });
-});
-
-
-describe("keep unordered list on enter key", function(){
- //create a new pad before each test run
- beforeEach(function(cb){
- helper.newPad(cb);
- this.timeout(60000);
- });
-
- it("Keeps the unordered list on enter for the new line", function(done){
- var inner$ = helper.padInner$;
- var chrome$ = helper.padChrome$;
-
- var $insertorderedlistButton = chrome$(".buttonicon-insertunorderedlist");
- $insertorderedlistButton.click();
-
- //type a bit, make a line break and type again
- var $firstTextElement = inner$("div span").first();
- $firstTextElement.sendkeys('line 1');
- $firstTextElement.sendkeys('{enter}');
- $firstTextElement.sendkeys('line 2');
- $firstTextElement.sendkeys('{enter}');
-
- helper.waitFor(function(){
- return inner$("div span").first().text().indexOf("line 2") === -1;
- }).done(function(){
- var $newSecondLine = inner$("div").first().next();
- var hasULElement = $newSecondLine.find("ul li").length === 1;
- expect(hasULElement).to.be(true);
- expect($newSecondLine.text()).to.be("line 2");
- done();
- });
- });
-
-});
-
-describe("Pressing Tab in an UL increases and decreases indentation", function(){
- //create a new pad before each test run
- beforeEach(function(cb){
- helper.newPad(cb);
- this.timeout(60000);
- });
-
- it("indent and de-indent list item with keypress", 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();
-
- //select this text element
- $firstTextElement.sendkeys('{selectall}');
-
- var $insertorderedlistButton = chrome$(".buttonicon-insertunorderedlist");
- $insertorderedlistButton.click();
-
- var e = inner$.Event(helper.evtType);
- e.keyCode = 9; // tab
- inner$("#innerdocbody").trigger(e);
-
- expect(inner$("div").first().find(".list-bullet2").length === 1).to.be(true);
- e.shiftKey = true; // shift
- e.keyCode = 9; // tab
- inner$("#innerdocbody").trigger(e);
-
- helper.waitFor(function(){
- return inner$("div").first().find(".list-bullet1").length === 1;
- }).done(done);
-
- });
-
-});
-
-describe("Pressing indent/outdent button in an UL increases and decreases indentation and bullet / ol formatting", function(){
- //create a new pad before each test run
- beforeEach(function(cb){
- helper.newPad(cb);
- this.timeout(60000);
- });
-
- it("indent and de-indent list item with indent button", 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();
-
- //select this text element
- $firstTextElement.sendkeys('{selectall}');
-
- var $insertunorderedlistButton = chrome$(".buttonicon-insertunorderedlist");
- $insertunorderedlistButton.click();
-
- var $indentButton = chrome$(".buttonicon-indent");
- $indentButton.click(); // make it indented twice
-
- expect(inner$("div").first().find(".list-bullet2").length === 1).to.be(true);
- var $outdentButton = chrome$(".buttonicon-outdent");
- $outdentButton.click(); // make it deindented to 1
-
- helper.waitFor(function(){
- return inner$("div").first().find(".list-bullet1").length === 1;
- }).done(done);
- });
-});
-
diff --git a/tests/frontend/specs/urls_become_clickable.js b/tests/frontend/specs/urls_become_clickable.js
deleted file mode 100644
index 7f5e30679..000000000
--- a/tests/frontend/specs/urls_become_clickable.js
+++ /dev/null
@@ -1,70 +0,0 @@
-describe("urls", function(){
- //create a new pad before each test run
- beforeEach(function(cb){
- helper.newPad(cb);
- this.timeout(60000);
- });
-
- it("when you enter an url, it becomes clickable", 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();
-
- // simulate key presses to delete content
- firstTextElement.sendkeys('{selectall}'); // select all
- firstTextElement.sendkeys('{del}'); // clear the first line
- firstTextElement.sendkeys('https://etherpad.org'); // insert a URL
-
- helper.waitFor(function(){
- return inner$("div").first().find("a").length === 1;
- }, 2000).done(done);
- });
-
- it("when you enter a url containing a !, it becomes clickable and contains the whole 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 = "https://etherpad.org/!foo";
-
- // simulate key presses to delete content
- firstTextElement.sendkeys('{selectall}'); // select all
- firstTextElement.sendkeys('{del}'); // clear the first line
- firstTextElement.sendkeys(url); // insert a URL
-
- 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);
- });
-
- 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 = "https://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);
- });
-
-});
diff --git a/tests/frontend/specs/xxauto_reconnect.js b/tests/frontend/specs/xxauto_reconnect.js
deleted file mode 100644
index e2d2df36a..000000000
--- a/tests/frontend/specs/xxauto_reconnect.js
+++ /dev/null
@@ -1,71 +0,0 @@
-describe('Automatic pad reload on Force Reconnect message', function() {
- var padId, $originalPadFrame;
-
- beforeEach(function(done) {
- padId = helper.newPad(function() {
- // enable userdup error to have timer to force reconnect
- var $errorMessageModal = helper.padChrome$('#connectivity .userdup');
- $errorMessageModal.addClass('with_reconnect_timer');
-
- // make sure there's a timeout set, otherwise automatic reconnect won't be enabled
- helper.padChrome$.window.clientVars.automaticReconnectionTimeout = 2;
-
- // open same pad on another iframe, to force userdup error
- var $otherIframeWithSamePad = $('');
- $originalPadFrame = $('#iframe-container iframe');
- $otherIframeWithSamePad.insertAfter($originalPadFrame);
-
- // wait for modal to be displayed
- helper.waitFor(function() {
- return $errorMessageModal.is(':visible');
- }, 50000).done(done);
- });
-
- this.timeout(60000);
- });
-
- it('displays a count down timer to automatically reconnect', function(done) {
- var $errorMessageModal = helper.padChrome$('#connectivity .userdup');
- var $countDownTimer = $errorMessageModal.find('.reconnecttimer');
-
- expect($countDownTimer.is(':visible')).to.be(true);
-
- done();
- });
-
- context('and user clicks on Cancel', function() {
- beforeEach(function() {
- var $errorMessageModal = helper.padChrome$('#connectivity .userdup');
- $errorMessageModal.find('#cancelreconnect').click();
- });
-
- it('does not show Cancel button nor timer anymore', function(done) {
- var $errorMessageModal = helper.padChrome$('#connectivity .userdup');
- var $countDownTimer = $errorMessageModal.find('.reconnecttimer');
- var $cancelButton = $errorMessageModal.find('#cancelreconnect');
-
- expect($countDownTimer.is(':visible')).to.be(false);
- expect($cancelButton.is(':visible')).to.be(false);
-
- done();
- });
- });
-
- context('and user does not click on Cancel until timer expires', function() {
- var padWasReloaded = false;
-
- beforeEach(function() {
- $originalPadFrame.one('load', function() {
- padWasReloaded = true;
- });
- });
-
- it('reloads the pad', function(done) {
- helper.waitFor(function() {
- return padWasReloaded;
- }, 5000).done(done);
-
- this.timeout(5000);
- });
- });
-});