From 617514b335611b19730f03c9a352be1bbe701a59 Mon Sep 17 00:00:00 2001 From: John McLear Date: Thu, 27 Nov 2014 17:12:24 +0000 Subject: [PATCH] mst tests still brkoen but it runs --- tests/frontend/specs/bold.js | 2 +- tests/frontend/specs/caret.js | 9 +++++++-- tests/frontend/specs/indentation.js | 2 +- tests/frontend/specs/italic.js | 2 +- tests/frontend/specs/redo.js | 2 +- tests/frontend/specs/undo.js | 2 +- 6 files changed, 12 insertions(+), 7 deletions(-) diff --git a/tests/frontend/specs/bold.js b/tests/frontend/specs/bold.js index 95da7331c..e023965f0 100644 --- a/tests/frontend/specs/bold.js +++ b/tests/frontend/specs/bold.js @@ -43,7 +43,7 @@ describe("bold button", function(){ //select this text element $firstTextElement.sendkeys('{selectall}'); - if(inner$.browser.mozilla){ // if it's a mozilla browser + if(inner$(window)[0].bowser.mozilla){ // if it's a mozilla browser var evtType = "keypress"; }else{ var evtType = "keydown"; diff --git a/tests/frontend/specs/caret.js b/tests/frontend/specs/caret.js index b33f5168c..a0cf0c3a6 100644 --- a/tests/frontend/specs/caret.js +++ b/tests/frontend/specs/caret.js @@ -2,6 +2,12 @@ describe("As the caret is moved is the UI properly updated?", function(){ var padName; var numberOfRows = 50; + //create a new pad before each test run + beforeEach(function(cb){ + helper.newPad(cb); + this.timeout(60000); + }); + it("creates a pad", function(done) { padName = helper.newPad(done); this.timeout(60000); @@ -224,7 +230,6 @@ describe("As the caret is moved is the UI properly updated?", function(){ }); var i = 0; while(i < numberOfRows){ // press down arrow -console.log("dwn"); keyEvent(inner$, 40, false, false); i++; } @@ -287,7 +292,7 @@ function prepareDocument(n, target){ // generates a random document with random } function keyEvent(target, charCode, ctrl, shift){ // sends a charCode to the window - if(target.browser.mozilla){ // if it's a mozilla browser + if(inner$(window)[0].bowser.mozilla){ // if it's a mozilla browser var evtType = "keypress"; }else{ var evtType = "keydown"; diff --git a/tests/frontend/specs/indentation.js b/tests/frontend/specs/indentation.js index 3d14a7a8b..74e32f970 100644 --- a/tests/frontend/specs/indentation.js +++ b/tests/frontend/specs/indentation.js @@ -15,7 +15,7 @@ describe("indentation button", function(){ //select this text element $firstTextElement.sendkeys('{selectall}'); - if(inner$.browser.mozilla){ // if it's a mozilla browser + if(inner$(window)[0].bowser.mozilla){ // if it's a mozilla browser var evtType = "keypress"; }else{ var evtType = "keydown"; diff --git a/tests/frontend/specs/italic.js b/tests/frontend/specs/italic.js index 29dbae59c..979f922bb 100644 --- a/tests/frontend/specs/italic.js +++ b/tests/frontend/specs/italic.js @@ -44,7 +44,7 @@ describe("italic some text", function(){ //select this text element $firstTextElement.sendkeys('{selectall}'); - if(inner$.browser.mozilla){ // if it's a mozilla browser + if(inner$(window)[0].bowser.mozilla){ // if it's a mozilla browser var evtType = "keypress"; }else{ var evtType = "keydown"; diff --git a/tests/frontend/specs/redo.js b/tests/frontend/specs/redo.js index c2f8a95a6..bb955b26a 100644 --- a/tests/frontend/specs/redo.js +++ b/tests/frontend/specs/redo.js @@ -47,7 +47,7 @@ describe("undo button then redo button", function(){ var modifiedValue = $firstTextElement.text(); // get the modified value expect(modifiedValue).not.to.be(originalValue); // expect the value to change - if(inner$.browser.mozilla){ // if it's a mozilla browser + if(inner$(window)[0].bowser.mozilla){ // if it's a mozilla browser var evtType = "keypress"; }else{ var evtType = "keydown"; diff --git a/tests/frontend/specs/undo.js b/tests/frontend/specs/undo.js index 0c58c9b84..31a474683 100644 --- a/tests/frontend/specs/undo.js +++ b/tests/frontend/specs/undo.js @@ -44,7 +44,7 @@ describe("undo button", function(){ var modifiedValue = $firstTextElement.text(); // get the modified value expect(modifiedValue).not.to.be(originalValue); // expect the value to change - if(inner$.browser.mozilla){ // if it's a mozilla browser + if(inner$(window)[0].bowser.mozilla){ // if it's a mozilla browser var evtType = "keypress"; }else{ var evtType = "keydown";