-
Notifications
You must be signed in to change notification settings - Fork 681
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
base: feature/ui-e2e-tests
Are you sure you want to change the base?
Conversation
⏳ I'm reviewing this pull request for security vulnerabilities and code quality issues. I'll provide an update when I'm done |
🔴 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 |
|
@@ -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 |
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.
100 miliseconds is 0.1 seconds, is it worth putting a timeout for so little time?
looks like CI is blocked:
|
@@ -28,7 +28,19 @@ describe('Amazon Q Chat Quick Actions Functionality', function () { | |||
await clearChat(webviewView) | |||
}) | |||
|
|||
it('Quick Actions Test', async () => { | |||
it('/dev 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.
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 () {
...
}
}
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.
That's a really good idea, didn't think of that. Will implement!
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.
feature/x
branches will not be squash-merged at release time.