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

cy.type doesn't fill in KeyboardEvent.code #3722

Closed
fr0 opened this issue Mar 15, 2019 · 3 comments · Fixed by #4870
Closed

cy.type doesn't fill in KeyboardEvent.code #3722

fr0 opened this issue Mar 15, 2019 · 3 comments · Fixed by #4870
Labels
stage: ready for work The issue is reproducible and in scope topic: cy.type ⌨️

Comments

@fr0
Copy link

fr0 commented Mar 15, 2019

Current behavior:

The KeyboardEvent object generated when using the type command doesn't contain the code property.

Desired behavior:

The KeyboardEvent object generated when using the type command should contain the code property.

https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/code

Versions

3.1.5

@cypress-bot cypress-bot bot added the stage: ready for work The issue is reproducible and in scope label Mar 19, 2019
@jennifer-shehane
Copy link
Member

cc @bkucera

@kuceb kuceb mentioned this issue Apr 25, 2019
5 tasks
kuceb added a commit that referenced this issue Oct 22, 2019
@kuceb kuceb mentioned this issue Oct 22, 2019
17 tasks
@cypress-bot cypress-bot bot added stage: work in progress and removed stage: ready for work The issue is reproducible and in scope labels Oct 23, 2019
brian-mann added a commit that referenced this issue Oct 23, 2019
* cleanup type_spec, allow unused-vars for args

* fix missing return

* rename mouse/keyboard

* apply changes on this branch with rename

* temp 07/18/19 [skip ci] type_spec minor changes

* temp 07/19/19 [skip ci]

* temp 07/22/19 [skip ci]

* temp 07/22/19 [skip ci]

* remove accidental spec, use beforeEach visit in click_spec

* add tests for cy.trigger changes

* re-run build

* extract simulated type from native events

* most type_spec passing until tab

* add typedefs

* temp 08/08/19 [skip ci]

* fix type_spec, click_spec

* fix console table event table logging

* fix spec utils

* temp 08/12/19 [skip ci]

* large changes to selection.ts, working type_spec, eslint changes

* fix elements util, cleanup debugging code

* fix linting rules

* fix type_spec in electron by using plain Event contructor

* fix invalid clicking-into-iframe spec

* address review, cleanup

* use webpack-preprocessor (required for typescript files)

* fix invalid connectors_spec

* chore(lint): fix linting, since changed rules

* fix not borrowing property getter for maxlength

* temp 09/25/19 [skip ci]

* add test for clicking checkbox, cleanup click_spec

* document mouse click and mouse move algo, adjust mouse move, add test for recursive movement

* cleanup / formatting

* scope the getCommandLogWithText to the active runnable to prevent leakage

* cleanup tests, make values static so tests pass consistently

- use attach listener alias APIs
- remove magic number constants
- fix some incoherent html / script tag stuff

* begin implementation for returning fromAutWindow

- restore original fromWindow algorithm
- begin writing fromAutWindow for calculating red hitbox coordinates
which are layered on the AUT

* move describe block with the others

* refactor actions to DRY up duplicated logic between click/dblclick/rightclick

- tighten up the mouse.js method names, name them consistently

* remove comment

* fix iframe coords and test

* temp 10/06/19 [skip ci]

* rename fromDocCoords->fromWindowCoords, fix type_spec ux test

* fix after merge from mouse-fixes branch / develop

* temp 10/08/19 [skip ci]

* Revert "temp 10/08/19 [skip ci]"

This reverts commit 92b73f6.

* remove only, fix contenteditable test

* add test for datetime-local inputs

* add webpack devdep

* fix debugging code

* fix force:true on hidden input

* up timeout for test in ci

* tighten up method, remove unnecessary arg

* add debug logic for retries to console.error() non cypress errors

* renamed fromWindow -> fromElWindow, and fromViewport -> fromElViewport

* handle calculating the fromElWindow coordinates inline

* extract out function for clarity, receive consistent arg names

* cleanup, add lots of comments

* fix display specific test

* fix type follow focus when redirect on focus

* cleanup new follow focus test

* upgrade eslint-plugin-dev to 5.0.0

* more [lint fixes]

* use typescript in driver

* cleanup minor

* remove unneeded file

* mild refactor webpack configs

* fix elements.ts

* fix isTextLike signature change

* fix isType check, fix type_spec

* actually use webpack-preprocessor

* fix isType domUtil

* fix connectors_spec

* cleanup connectors_spec

* address feedback- cleanup, add comments, refac

* answer: no, need index.js

* cleanup after driver typescript PR

* fix keyboard getActiveModifiers

* fix(driver:keyboard): fix typing negative numbers with existing text selection

* remove debugging code, cleanup

* link fixed issues in tests, actually fix one issue

* cleanup remove dead code

* remove unused helper

* add test for #2166

* pay no attention to the code and implementation changing... add tests and note for changing focus into date input

* mark fix for issue #3316

* mark fix for issue #3722

* rename elements.isType -> elements.isInputType for clarity

* restructure keyboard a bit, don't export default, rework static class properties to regular exports

- attach $Mouse + $Keyboard to Cypress

* tighten up

* coffeescript fixes, consistent regexp const naming

* capitalize interface, tighten up several modifier functions

* misc cleanup and tightening up

* rework impl to use stubs instead of numbers

* some more cleanup

* fix logic with when function is called


Co-authored-by: Brian Mann <brian.mann86@gmail.com>
Co-authored-by: Jennifer Shehane <jennifer@cypress.io>
@cypress-bot
Copy link
Contributor

cypress-bot bot commented Oct 23, 2019

The code for this is done in cypress-io/cypress#4870, but has yet to be released.
We'll update this issue and reference the changelog when it's released.

@cypress-bot
Copy link
Contributor

cypress-bot bot commented Oct 23, 2019

Released in 3.5.0.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
stage: ready for work The issue is reproducible and in scope topic: cy.type ⌨️
Projects
None yet
2 participants