Skip to content

Conversation

ktdotgit
Copy link

@ktdotgit ktdotgit commented Aug 7, 2025

Description

Related links, issue #, if available: n/a
jGwYAejXwIQb
AWSUI-60156

How has this been tested?

  • Manual testing, unit testing, and integration testing
Review checklist

The following items are to be evaluated by the author(s) and the reviewer(s).

Correctness

  • Changes include appropriate documentation updates.
  • Changes are backward-compatible if not indicated, see CONTRIBUTING.md.
  • Changes do not include unsupported browser features, see CONTRIBUTING.md.
  • Changes were manually tested for accessibility, see accessibility guidelines.

Security

Testing

  • Changes are covered with new/existing unit tests?
  • Changes are covered with new/existing integration tests?

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Comment on lines 35 to 41
async type(text: string) {
// `await this.keys(text);` doesn't work as it key presses too quickly and doesn't
// allow the separator to be appended so the cursor position gets messed up.
for (let k = 0; k < text.length; k++) {
await this.keys(text[k]);
}
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This can be achieved by using the following inside the test itself instead of a helper function on the WizardPageObject class: await page.keys(['input text']) like here

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Out of curiosity, how does it differentiate between a user wanting to type in the literal string "Enter" and wanting to hit return ("Enter")?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is leaning WebDriverIO's keys functions which will treat a string either as a chain of text to type or a keycode such as 'Enter' or 'ArrowLeft': https://webdriver.io/docs/api/browser/keys/

@@ -19,7 +19,7 @@ afterEach(() => {
clearVisualRefreshState();
});

const skippedComponents = ['button'];
const skippedComponents = ['button', 'wizard'];
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FYI, before doing this... I tried setting the hidden submit button to disabled and setting onClick to preventDefault() but this test was still triggering it.

Copy link

codecov bot commented Aug 25, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 97.06%. Comparing base (354493e) to head (90825b8).
⚠️ Report is 15 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #3734   +/-   ##
=======================================
  Coverage   97.06%   97.06%           
=======================================
  Files         835      835           
  Lines       24161    24189   +28     
  Branches     8463     8472    +9     
=======================================
+ Hits        23451    23479   +28     
  Misses        705      705           
  Partials        5        5           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants