native-events
webzwo0i 2020-11-14 20:00:44 +01:00
parent c10e525c68
commit e971de5740
2 changed files with 10 additions and 3 deletions

View File

@ -21,9 +21,15 @@ describe("All the alphabet works n stuff", function(){
let code; let code;
for (let index = 0; index < expectedString.length; index++){ for (let index = 0; index < expectedString.length; index++){
code = expectedString.charCodeAt(index); code = expectedString.charCodeAt(index);
$(firstTextElement).trigger({type: 'keydown', which: code}); var press = jQuery.Event("keypress");
$(firstTextElement).trigger({type: 'keypress', which: code}); var down = jQuery.Event("keydown");
$(firstTextElement).trigger({type: 'keyup', which: code}); var up = jQuery.Event("keyup");
press.which = code;
down.which = code;
up.which = code;
$(firstTextElement).trigger(down);
$(firstTextElement).trigger(press);
$(firstTextElement).trigger(up);
} }
helper.waitFor(function(){ helper.waitFor(function(){

View File

@ -16,6 +16,7 @@ async function runTest(testSettings){
'browserName': testSettings.browserName, 'browserName': testSettings.browserName,
'platformName': testSettings.platformName, 'platformName': testSettings.platformName,
'browserVersion': testSettings.browserVersion, 'browserVersion': testSettings.browserVersion,
'nativeEvents': true,
'sauce:options': { 'sauce:options': {
'nativeEvents': true, 'nativeEvents': true,
'username': process.env.SAUCE_USERNAME, 'username': process.env.SAUCE_USERNAME,