Repository navigation
test(radio): enable keyboard tests - #27262
Conversation
|
|
There was a problem hiding this comment.
Can you document the purpose of this file and why it works as a comment?
There was a problem hiding this comment.
Documented here: e68643d
Let me know if you want additional details.
Our current approach for checking for webkit works great when running locally on macOS, but when ran on CI on a Linux image, the Alt+Tab key combination does not behave consistently the same. This utility detects those conditions and normalizes the key press in a shared utility that we can use across tests (instead of needing to detect per test and handle repeatedly).
liamdebeasi
left a comment
There was a problem hiding this comment.
Overall looks good, just would like to document some parts of the util code
| const keys = key.split('+').flatMap((keyCode) => { | ||
| if (Object.prototype.hasOwnProperty.call(modifiers, keyCode)) { | ||
| return modifiers[keyCode as keyof typeof modifiers](isAppleOS).map((modifier) => | ||
| modifier === CTRL ? 'Control' : capitalCase(modifier) | ||
| ); |
There was a problem hiding this comment.
Can we document what this is doing?
There was a problem hiding this comment.
Let me know if the updated documentation makes sense 👍
| for (let i = 0; i < times; i += 1) { | ||
| await command(); | ||
|
|
||
| if (times > 1 && pressOptions.delay !== undefined) { | ||
| await this.page.waitForTimeout(pressOptions.delay); |
There was a problem hiding this comment.
Can we document what this is doing?
liamdebeasi
left a comment
There was a problem hiding this comment.
Great find! This should help a great deal
Issue number: Internal
What is the current behavior?
Tabkeyboard navigation tests are disabled forion-radiobecause they were extremely flaky in CI.What is the new behavior?
ion-radioTabkeyboard navigation testsTabkeyboard navigation on environments that do not support "natural tab navigation"Does this introduce a breaking change?
Other information
This utility should likely be used in all places where we are using the
Alt+Tablogic for webkit-based browsers today. If/when the changes are agreed upon, I can follow-up with PR that adds this behavior to those tests.