Skip to content

feat(amazonq): Added basic chat tests & fixed nomenclature of clearChat util #7812

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 6 commits into
base: feature/ui-e2e-tests
Choose a base branch
from

Conversation

surajrdy-aws
Copy link

@surajrdy-aws surajrdy-aws commented Aug 4, 2025

Problem

We have yet to implement the multiple chat test and the view history chat test. The clearChat abstraction can also be confusing to some individuals since the /clear command is different.

Solution

I have made the clearChat abstraction clearer in name so people do not get confused with the /clear command. Additionally, I have implemented the multipleChatTest and the viewHistory chat test.


  • 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 4, 2025 20:25
Copy link

github-actions bot commented Aug 4, 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.

@surajrdy-aws surajrdy-aws changed the title feature(amazonq): Added multiple chat test & fixed nomenclature of clearChat util feature(amazonq): Added basic chat tests & fixed nomenclature of clearChat util Aug 5, 2025
Copy link

@laura-codess laura-codess left a comment

Choose a reason for hiding this comment

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

LGTM :)

@Hweinstock
Copy link
Contributor

feature --> feat:

Invalid pull request title: `feature(amazonq): Added basic chat tests & fixed nomenclature of clearChat util`

* 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): Added basic chat tests & fixed nomenclature of clearChat util feat(amazonq): Added basic chat tests & fixed nomenclature of clearChat util Aug 12, 2025
@surajrdy-aws surajrdy-aws reopened this Aug 12, 2025
@@ -33,4 +29,20 @@ describe('Amazon Q Chat Basic Functionality', function () {
}
console.log('Chat response detected successfully')
})
it('Multiple Chat 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.

can we use a more descriptive label here? Usually each it is followed by an action. Ex. "allows user to add multiple tabs"

Copy link
Author

Choose a reason for hiding this comment

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

Ah I see, didn't realize that! Will update all functions accordingly.

await addChat.click()
}
})
it('View History', async () => {
Copy link
Contributor

Choose a reason for hiding this comment

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

same as above.

@@ -117,7 +117,7 @@ export async function waitForChatResponse(webview: WebviewView, timeout = 15000)
* @param webview The WebviewView instance
* @returns Promise<boolean> True if successful, false if an error occurred
*/
export async function clearChat(webview: WebviewView): Promise<boolean> {
export async function clearChatInput(webview: WebviewView): Promise<boolean> {
Copy link
Contributor

Choose a reason for hiding this comment

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

nice, I like how this disambiguates between it clearing the entire chat window and the chat contents itself.

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