diff options
Diffstat (limited to 'tests/frontend')
-rw-r--r-- | tests/frontend/specs/bold.js | 7 | ||||
-rw-r--r-- | tests/frontend/specs/indentation.js | 6 | ||||
-rw-r--r-- | tests/frontend/specs/italic.js | 6 | ||||
-rw-r--r-- | tests/frontend/specs/redo.js | 6 | ||||
-rw-r--r-- | tests/frontend/specs/undo.js | 4 |
5 files changed, 14 insertions, 15 deletions
diff --git a/tests/frontend/specs/bold.js b/tests/frontend/specs/bold.js index 0bdbbc84..95da7331 100644 --- a/tests/frontend/specs/bold.js +++ b/tests/frontend/specs/bold.js @@ -43,11 +43,10 @@ describe("bold button", function(){ //select this text element $firstTextElement.sendkeys('{selectall}'); - - if(!inner$.browser.firefox){ - var evtType = "keydown"; - }else{ + if(inner$.browser.mozilla){ // if it's a mozilla browser var evtType = "keypress"; + }else{ + var evtType = "keydown"; } var e = inner$.Event(evtType); diff --git a/tests/frontend/specs/indentation.js b/tests/frontend/specs/indentation.js index 81ffc78e..9692120a 100644 --- a/tests/frontend/specs/indentation.js +++ b/tests/frontend/specs/indentation.js @@ -15,10 +15,10 @@ describe("indentation button", function(){ //select this text element $firstTextElement.sendkeys('{selectall}'); - if(!inner$.browser.firefox){ - var evtType = "keydown"; - }else{ + if(inner$.browser.mozilla){ // if it's a mozilla browser var evtType = "keypress"; + }else{ + var evtType = "keydown"; } var e = inner$.Event(evtType); diff --git a/tests/frontend/specs/italic.js b/tests/frontend/specs/italic.js index be226d48..29dbae59 100644 --- a/tests/frontend/specs/italic.js +++ b/tests/frontend/specs/italic.js @@ -44,10 +44,10 @@ describe("italic some text", function(){ //select this text element $firstTextElement.sendkeys('{selectall}'); - if(!inner$.browser.firefox){ - var evtType = "keydown"; - }else{ + if(inner$.browser.mozilla){ // if it's a mozilla browser var evtType = "keypress"; + }else{ + var evtType = "keydown"; } var e = inner$.Event(evtType); diff --git a/tests/frontend/specs/redo.js b/tests/frontend/specs/redo.js index 7595da59..c2f8a95a 100644 --- a/tests/frontend/specs/redo.js +++ b/tests/frontend/specs/redo.js @@ -47,10 +47,10 @@ 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.firefox){ - var evtType = "keydown"; - }else{ + if(inner$.browser.mozilla){ // if it's a mozilla browser var evtType = "keypress"; + }else{ + var evtType = "keydown"; } var e = inner$.Event(evtType); diff --git a/tests/frontend/specs/undo.js b/tests/frontend/specs/undo.js index 9152c884..6fed22e3 100644 --- a/tests/frontend/specs/undo.js +++ b/tests/frontend/specs/undo.js @@ -45,9 +45,9 @@ describe("undo button", function(){ expect(modifiedValue).not.to.be(originalValue); // expect the value to change if(!inner$.browser.firefox){ - var evtType = "keydown"; - }else{ var evtType = "keypress"; + }else{ + var evtType = "keydown"; } var e = inner$.Event(evtType); |