Skip to content

Conversation

@surajrdy-aws
Copy link

Problem

Our tests are currently experiencing flakiness due to our usage of try-catch blocks which allow errors to pass through our tests. One of our more egregious examples of this is our quickActions.test.ts file which is unable to find the proper CSS element of our quickAction command overlay, but still allows our test to pass as this error is non-critical due to our try-catch block. This leaves an inherent problem in our tests making them flaky while still containing UI errors. Additionally, many of our helper functions return Booleans, and this logic of booleans is used in some instances like our chat.test.ts.

Solution

We will remove the majority of try-catch blocks that are used in our helpers to have more stricter errors in our tests. Our tests should fail if an error occurs while finding a UI element. Additionally, we update our chat.test.ts so that it can properly stop using the Boolean returned from the chat helper function.

We have updated:

  • generalUtils
  • cleanupUtils
  • chat.test.ts
  • quickActionsHelper
  • switchModelHelper

  • Treat all work as PUBLIC. Private feature/x branches will not be squash-merged at release time.
  • Your code changes must meet the guidelines in CONTRIBUTING.md.
  • License: I confirm that my contribution is made under the terms of the Apache 2.0 license.

@surajrdy-aws surajrdy-aws requested a review from a team as a code owner August 13, 2025 18:56
@amazon-inspector-ohio
Copy link

⏳ I'm reviewing this pull request for security vulnerabilities and code quality issues. I'll provide an update when I'm done

@surajrdy-aws surajrdy-aws changed the base branch from master to feature/ui-e2e-tests August 13, 2025 18:56
@amazon-inspector-ohio
Copy link

✅ I finished the code review, and didn't find any security or code quality issues.

@github-actions
Copy link

  • This pull request implements a feat or fix, so it must include a changelog entry (unless the fix is for an unreleased feature). Review the changelog guidelines.
    • Note: beta or "experiment" features that have active users should announce fixes in the changelog.
    • If this is not a feature or fix, use an appropriate type from the title guidelines. For example, telemetry-only changes should use the telemetry type.

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.

1 participant