Skip to content
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

Action keyboard events doesn't have event.key and event.keyIdentifier set #993

Closed
miherlosev opened this issue Nov 28, 2016 · 4 comments
Closed
Labels
!IMPORTANT! STATE: Auto-locked An issue has been automatically locked by the Lock bot. TYPE: bug The described behavior is considered as wrong (bug).
Milestone

Comments

@miherlosev
Copy link
Contributor

miherlosev commented Nov 28, 2016

Test code

 t.navigateTo('http://todomvc.com/examples/angular2');
    await t.typeText('.new-todo, #new-todo', '1')
           .pressKey('enter');

    await t.wait(4000);

I expect after pressKey('enter') action a new item was added to a list.
But it doesn't happen.

In hammerhead-playground all works good (I checked on DevExpress/testcafe-hammerhead@bb719bd commit)

  • testcafe version: 0.11.0-alpha
  • node.js version: 6.9.1
@miherlosev miherlosev added the TYPE: bug The described behavior is considered as wrong (bug). label Nov 28, 2016
@georgiy-abbasov
Copy link
Contributor

I'm working on this

@georgiy-abbasov georgiy-abbasov self-assigned this Nov 28, 2016
@georgiy-abbasov
Copy link
Contributor

georgiy-abbasov commented Nov 29, 2016

We need to dispatch events with event.key and event.keyIdentifier (Safari) properties when simulating keyboard events. At the current moment we have an empty values for these props - https://github.com/DevExpress/testcafe-hammerhead/blob/master/src/client/sandbox/event/simulator.js#L334.
@miherlosev, i decide to make a dictionary with keyCodes as keys and key\keyIdentifier as value in the context of testcafe-hammerhead.
This will help to solve problem with angular2 and humble.

Another situation with other 3 sites - jquery keypress handler executes correctly, but script, which adds note to list, is not loaded yet at the moment of t.pressKey execution. There is same situation on the original resources (without testcafe-hammerhead)

@AlexanderMoskovkin AlexanderMoskovkin changed the title PressKey action wrong work on http://todomvc.com/examples/angular2 PressKey action works wrong on the Angular2 demo page Dec 1, 2016
@AlexanderMoskovkin AlexanderMoskovkin added this to the Sprint #2 milestone Dec 1, 2016
georgiy-abbasov pushed a commit to georgiy-abbasov/testcafe-phoenix that referenced this issue Dec 2, 2016
@inikulin inikulin changed the title PressKey action works wrong on the Angular2 demo page Action keyboard events doesn't have event.key and event.keyIdentifier set Dec 5, 2016
@lock
Copy link

lock bot commented Mar 29, 2019

This thread has been automatically locked since it is closed and there has not been any recent activity. Please open a new issue for related bugs or feature requests. We recommend you ask TestCafe API, usage and configuration inquiries on StackOverflow.

@lock lock bot added the STATE: Auto-locked An issue has been automatically locked by the Lock bot. label Mar 29, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Mar 29, 2019
kirovboris pushed a commit to kirovboris/testcafe-phoenix that referenced this issue Dec 18, 2019
… simulator, updated hammerhead version (closes DevExpress#993) (DevExpress#1019)

* Added 'event.key' and 'event.keyIdenfitifiers' properties to keypress simulator, updated hammerhead version (closes DevExpress#993)

* Remarks fixed

* Tests refactored

* One more fix

* Fix the fixture and test names
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
!IMPORTANT! STATE: Auto-locked An issue has been automatically locked by the Lock bot. TYPE: bug The described behavior is considered as wrong (bug).
Projects
None yet
Development

No branches or pull requests

3 participants