summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorJohn McLear <john@mclear.co.uk>2013-03-14 14:36:54 -0300
committerJohn McLear <john@mclear.co.uk>2013-03-14 14:36:54 -0300
commit24188d70076eb6368b31a41466b567e7e59186f8 (patch)
tree212344d6dbd3ed19844bbdbb389235972cdf0007 /tests
parent1462d8e80c3a20486cee95cf10c1bc3d7724c6d1 (diff)
downloadetherpad-lite-24188d70076eb6368b31a41466b567e7e59186f8.zip
this should pass more tests..
Diffstat (limited to 'tests')
-rw-r--r--tests/frontend/specs/bold.js7
-rw-r--r--tests/frontend/specs/indentation.js6
-rw-r--r--tests/frontend/specs/italic.js6
-rw-r--r--tests/frontend/specs/redo.js6
-rw-r--r--tests/frontend/specs/undo.js4
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);