mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-01-31 19:02:59 +01:00
fix tests w/ new context
This commit is contained in:
parent
3fd6e72657
commit
26a1584470
5 changed files with 5 additions and 5 deletions
|
@ -44,7 +44,7 @@ describe("bold button", function(){
|
||||||
//select this text element
|
//select this text element
|
||||||
$firstTextElement.sendkeys('{selectall}');
|
$firstTextElement.sendkeys('{selectall}');
|
||||||
|
|
||||||
if(inner$(window)[0].bowser.firefox || inner$(window)[0].bowser.msie){ // if it's a mozilla or IE
|
if(inner$(window)[0].bowser.firefox || inner$(window)[0].bowser.modernIE){ // if it's a mozilla or IE
|
||||||
var evtType = "keypress";
|
var evtType = "keypress";
|
||||||
}else{
|
}else{
|
||||||
var evtType = "keydown";
|
var evtType = "keydown";
|
||||||
|
|
|
@ -297,7 +297,7 @@ function prepareDocument(n, target){ // generates a random document with random
|
||||||
}
|
}
|
||||||
|
|
||||||
function keyEvent(target, charCode, ctrl, shift){ // sends a charCode to the window
|
function keyEvent(target, charCode, ctrl, shift){ // sends a charCode to the window
|
||||||
if(inner$(window)[0].bowser.firefox || inner$(window)[0].bowser.msie){ // if it's a mozilla or IE
|
if(inner$(window)[0].bowser.firefox || inner$(window)[0].bowser.modernIE){ // if it's a mozilla or IE
|
||||||
var evtType = "keypress";
|
var evtType = "keypress";
|
||||||
}else{
|
}else{
|
||||||
var evtType = "keydown";
|
var evtType = "keydown";
|
||||||
|
|
|
@ -15,7 +15,7 @@ describe("indentation button", function(){
|
||||||
//select this text element
|
//select this text element
|
||||||
$firstTextElement.sendkeys('{selectall}');
|
$firstTextElement.sendkeys('{selectall}');
|
||||||
|
|
||||||
if(inner$(window)[0].bowser.firefox || inner$(window)[0].bowser.msie){ // if it's a mozilla or IE
|
if(inner$(window)[0].bowser.firefox || inner$(window)[0].bowser.modernIE){ // if it's a mozilla or IE
|
||||||
var evtType = "keypress";
|
var evtType = "keypress";
|
||||||
}else{
|
}else{
|
||||||
var evtType = "keydown";
|
var evtType = "keydown";
|
||||||
|
|
|
@ -44,7 +44,7 @@ describe("italic some text", function(){
|
||||||
//select this text element
|
//select this text element
|
||||||
$firstTextElement.sendkeys('{selectall}');
|
$firstTextElement.sendkeys('{selectall}');
|
||||||
|
|
||||||
if(inner$(window)[0].bowser.firefox || inner$(window)[0].bowser.msie){ // if it's a mozilla or IE
|
if(inner$(window)[0].bowser.firefox || inner$(window)[0].bowser.modernIE){ // if it's a mozilla or IE
|
||||||
var evtType = "keypress";
|
var evtType = "keypress";
|
||||||
}else{
|
}else{
|
||||||
var evtType = "keydown";
|
var evtType = "keydown";
|
||||||
|
|
|
@ -47,7 +47,7 @@ describe("undo button then redo button", function(){
|
||||||
var modifiedValue = $firstTextElement.text(); // get the modified value
|
var modifiedValue = $firstTextElement.text(); // get the modified value
|
||||||
expect(modifiedValue).not.to.be(originalValue); // expect the value to change
|
expect(modifiedValue).not.to.be(originalValue); // expect the value to change
|
||||||
|
|
||||||
if(inner$(window)[0].bowser.firefox || inner$(window)[0].bowser.msie){ // if it's a mozilla or IE
|
if(inner$(window)[0].bowser.firefox || inner$(window)[0].bowser.modernIE){ // if it's a mozilla or IE
|
||||||
var evtType = "keypress";
|
var evtType = "keypress";
|
||||||
}else{
|
}else{
|
||||||
var evtType = "keydown";
|
var evtType = "keydown";
|
||||||
|
|
Loading…
Reference in a new issue