-
Notifications
You must be signed in to change notification settings - Fork 681
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
base: feature/ui-e2e-tests
Are you sure you want to change the base?
feat(amazonq): Added basic chat tests & fixed nomenclature of clearChat util #7812
Conversation
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM :)
feature --> feat:
|
@@ -33,4 +29,20 @@ describe('Amazon Q Chat Basic Functionality', function () { | |||
} | |||
console.log('Chat response detected successfully') | |||
}) | |||
it('Multiple Chat Test', async () => { |
There was a problem hiding this comment.
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"
There was a problem hiding this comment.
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 () => { |
There was a problem hiding this comment.
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> { |
There was a problem hiding this comment.
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.
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.
feature/x
branches will not be squash-merged at release time.