-
Notifications
You must be signed in to change notification settings - Fork 29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Question: Wrong keycode expected when using shift modifier in EventsTest::testKeybordEvents? #36
Comments
Why test suite doesn't fail currently, when automatic testing is performed on Travis CI? |
This is exactly what I am also wondering about :D |
If you're using Selenium you can actually run that specific test only and through real time debugging (e.g. xdebug) you can pause exactly at the moment after key is pressed to see what's happening. The test really should be working as if real user is pressing these keys. It's highly unlikely, that keydown/keypress and similar methods in the driver are working incorrectly for so many years and nobody have noticed anything. Maybe when you press |
I'm also seeing this with my new W3C Driver. This is definitely a bug in this testsuite. I suspect that the reason that this has not been picked up earlier is that the Selenium2 Drvier is using Syn.js to call:
However, If you try this in a browser, you'll see that We should replicate the user-browser behaviour within these tests. This is a bug both in these tests, and also within the Drivers which consume them. |
* Adopted base events test cause the base test only checks for last key event. But if we want to test this with webdriver we have to first keyDown all keys one by one and then keyUp them one by one. The keyUp can not be done with both keys at once, so only the last up event gets asserted by base test. * Use key value "82" instead of "114" for shift+r cause this seems to be the real one. Also see: minkphp/driver-testsuite#36
When I send "r" to the browser then keycode
114
is used but when I sendr
and modifiershift
to browser then keycode82
is used.I encounter a problem because test case always expects keycode
114
.Assertion:
$input2->keyPress('r', $modifier);
$this->assertEquals('key pressed:114 / '.$eventProperties, $event->getText());
Provider:
'ctrl' => array('ctrl', '0 / 1 / 0 / 1'),
driver-testsuite/tests/Js/EventsTest.php
Lines 104 to 105 in d208035
driver-testsuite/tests/Js/EventsTest.php
Line 117 in d208035
Pressed
r
:Pressed
shift
+r
:The text was updated successfully, but these errors were encountered: