diff options
author | John McLear <john@mclear.co.uk> | 2013-03-14 13:41:49 -0300 |
---|---|---|
committer | John McLear <john@mclear.co.uk> | 2013-03-14 13:41:49 -0300 |
commit | 12107859bb2325c5ba7b7bf0efeaa76682b5edb7 (patch) | |
tree | eb461f6b25f3a5e8ec1f5fee1e67a2630b13ae74 | |
parent | f0dee2d2ceaf7cddf23bc54bce5ed623199cc57e (diff) | |
download | etherpad-lite-12107859bb2325c5ba7b7bf0efeaa76682b5edb7.zip |
fix tests in firefox as firefox fires on keypress not down
-rw-r--r-- | tests/frontend/specs/bold.js | 2 | ||||
-rw-r--r-- | tests/frontend/specs/indentation.js | 2 | ||||
-rw-r--r-- | tests/frontend/specs/italic.js | 2 | ||||
-rw-r--r-- | tests/frontend/specs/redo.js | 2 |
4 files changed, 4 insertions, 4 deletions
diff --git a/tests/frontend/specs/bold.js b/tests/frontend/specs/bold.js index 2fb6bbfe..010d6901 100644 --- a/tests/frontend/specs/bold.js +++ b/tests/frontend/specs/bold.js @@ -44,7 +44,7 @@ describe("bold button", function(){ //select this text element $firstTextElement.sendkeys('{selectall}'); - var e = inner$.Event("keydown"); + var e = inner$.Event("keypress"); e.ctrlKey = true; // Control key e.which = 66; // b inner$("#innerdocbody").trigger(e); diff --git a/tests/frontend/specs/indentation.js b/tests/frontend/specs/indentation.js index 06d90aa8..6b9b432d 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}'); - var e = inner$.Event("keydown"); + var e = inner$.Event("keypress"); e.keyCode = 9; // tab :| inner$("#innerdocbody").trigger(e); diff --git a/tests/frontend/specs/italic.js b/tests/frontend/specs/italic.js index 052d2df4..15976f29 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}'); - var e = inner$.Event("keydown"); + var e = inner$.Event("keypress"); e.ctrlKey = true; // Control key e.which = 105; // i inner$("#innerdocbody").trigger(e); diff --git a/tests/frontend/specs/redo.js b/tests/frontend/specs/redo.js index c1497221..d72b5a09 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 - var e = inner$.Event("keydown"); + var e = inner$.Event("keypress"); e.ctrlKey = true; // Control key e.which = 90; // z inner$("#innerdocbody").trigger(e); |