Skip to content

feat(amazonq): Quick actions E2E UI tests and update to quickActionsHelper #7831

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

Open
wants to merge 3 commits into
base: feature/ui-e2e-tests
Choose a base branch
from

Conversation

surajrdy-aws
Copy link

Problem

We have yet to implement the quick actions E2E UI Tests. Additionally, the 10000 ms wait time in the quickActionsHelper unnecessarily slows down the tests.

Solution

Implemented quick actions E2E UI Tests and updated quickActionsHelper to use a maximum wait of 100 ms, which drastically decreases the time of our tests.


  • 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 6, 2025 19:01
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 6, 2025 19:01
Copy link

🔴 I'm not able to complete the code review because the diff size exceeds the limits. Consider splitting your changes into smaller diffs and try again. For more information, see Diff limits in the GitHub documentation

Request ID : c7e15753-1fd5-429c-b01e-04cd84df337f

Copy link

github-actions bot commented Aug 6, 2025

  • 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.

@@ -20,7 +20,7 @@ export async function getQuickActionsCommands(webview: WebviewView): Promise<{ i
const menuItems = await waitForElements(
webview,
By.css('.mynah-detailed-list-item.mynah-ui-clickable-item.target-command'),
10000
100

Choose a reason for hiding this comment

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

100 miliseconds is 0.1 seconds, is it worth putting a timeout for so little time?

@Hweinstock
Copy link
Contributor

looks like CI is blocked:

Invalid pull request title: `feature(amazonq): Quick actions E2E UI tests and update to quickActionsHelper`

* Problem: invalid type "feature"
* Expected format: `type(scope): subject...`
    * type: one of (build, ci, config, deps, docs, feat, fix, perf, refactor, revert, style, telemetry, test, types)
    * scope: lowercase, <30 chars
    * subject: must be <100 chars
    * documentation: https://github.com/aws/aws-toolkit-vscode/blob/master/CONTRIBUTING.md#pull-request-title
* Hint: *close and re-open the PR* to re-trigger CI (after fixing the PR title).

@surajrdy-aws surajrdy-aws changed the title feature(amazonq): Quick actions E2E UI tests and update to quickActionsHelper feat(amazonq): Quick actions E2E UI tests and update to quickActionsHelper Aug 12, 2025
@surajrdy-aws surajrdy-aws reopened this Aug 12, 2025
@@ -28,7 +28,19 @@ describe('Amazon Q Chat Quick Actions Functionality', function () {
await clearChat(webviewView)
})

it('Quick Actions Test', async () => {
it('/dev Test', async () => {
Copy link
Contributor

Choose a reason for hiding this comment

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

what behavior are these tests verifying? I would try to make it clear in the name. For example, /doc is in the quickActions menu.

Also, you could avoid some overhead by iterating through a list of these strings and creating a test for each one.
Ex.

for (const command of ['doc', 'transform', 'test', 'review']) {
   it(`quick action menu includes ${command}`, async function () {
      ...
    }
}

Copy link
Author

Choose a reason for hiding this comment

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

That's a really good idea, didn't think of that. Will implement!

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.

3 participants