tests: fix IE undo test

This commit is contained in:
John McLear 2020-03-22 18:39:59 +00:00 committed by muxator
parent 58e1e2d16f
commit d8c4dd7e77

View file

@ -44,11 +44,16 @@ describe("undo 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.modernIE){ // if it's IE
* ACHTUNG: this is the only place in the test codebase in which a keydown var evtType = "keypress";
* is sent for IE. Everywhere else IE uses keypress. }else{
*/ // Edge also requires keypress.
if(window.navigator.userAgent.indexOf("Edge") > -1){
var evtType = "keypress";
}else{
var evtType = "keydown"; var evtType = "keydown";
}
}
var e = inner$.Event(evtType); var e = inner$.Event(evtType);
e.ctrlKey = true; // Control key e.ctrlKey = true; // Control key