angular/packages/platform-browser/test/dom
Jessica Janiuk a67a8b2fc7 refactor(platform-browser): Updates keyboard event library to support code field (#46030)
On MacOS, pressing the alt key and another key turns into symbols, and
doesn't match the intended behavior. For example, `keydown.alt.s`
reports instead as `keydown.alt.ß`. We rely on the `key` field and not
the `code` field, which properly reports the code for S in this case.

This change adds support to allow users to specify they want to look at
the `code` field instead of the `key` field within their event string.
Example: `keydown.code.alt.leftshift` would only match the LeftShift and
not the right shift based on code values. It would also allow the user
to specify `keydown.code.alt.keys` to match S instead of ß when alt /
option is pressed on MacOS and would also work on Windows.

Fixes #45992

PR Close #46030
2022-07-18 15:28:58 +00:00
..
events refactor(platform-browser): Updates keyboard event library to support code field (#46030) 2022-07-18 15:28:58 +00:00
dom_renderer_spec.ts build: update to jasmine 4.0 (#45558) 2022-04-11 16:25:28 +00:00
shadow_dom_spec.ts test: clean up more entryComponents usages (#44561) 2022-01-06 18:36:22 +00:00
shared_styles_host_spec.ts test: clean up internal testing utilities (#42177) 2021-05-26 20:07:25 +00:00