Skip to content

test(amazonq): end to end Inline Completion UI tests #5535

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

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

samgst-amazon
Copy link
Contributor

UI tests to validate end to end functionality of the InlineCompletion feature

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)

Description

No Case Action Expect
1 Manual trigger, accept Manual trigger in a supported language doc, accept suggestion Suggestion is shown on screen, accept using Tab does insert suggestion to cursor position. Telemetry accept is sent.
2 Manual trigger, reject Manual trigger in a supported language doc, reject suggestion by Esc Suggestion is shown on screen, reject using Esc does not insert suggestion to cursor position. Telemetry reject is sent.
3 Manual trigger, discard Manual trigger in a supported language doc, then move cursor one line above to discard the upcoming suggestion Suggestion is NOT shown on screen, telemetry discard is sent
4 Auto trigger, accept Press Enter to auto trigger in a supported language doc, accept suggestion Suggestion is shown on screen, accept using Tab does insert suggestion to cursor position. Telemetry accept is sent.
5 Auto trigger, reject Press Enter to auto trigger in a supported language doc, reject suggestion Suggestion is shown on screen, then disappears after rejection. Telemetry reject is sent
6 Auto trigger, discard Auto trigger in a supported language doc, then move cursor one line above to discard the upcoming suggestion Suggestion is NOT shown on screen, telemetry discard is sent
7 Suggestion Navigation When suggestion is shown, pressing Left or Right can navigate through suggestions rendered suggestion changes
8 Auto/Manual trigger, unsupported language Trigger in a file that is not supported no suggestion shown
9 Typeahead When suggestion is shown, type characters that matches suggestion prefix, suggestion stays on screen

Checklist

  • My code follows the code style of this project
  • I have added tests to cover my changes
  • A short description of the change has been added to the CHANGELOG if the change is customer-facing in the IDE.
  • I have added metrics for my changes (if required)

License

I confirm that my contribution is made under the terms of the Apache 2.0 license.

import com.intellij.driver.sdk.ui.components.common.ideFrame
import java.awt.event.KeyEvent

class AmazonQInlineCompletionE2ETest {
Copy link
Contributor Author

@samgst-amazon samgst-amazon Apr 4, 2025

Choose a reason for hiding this comment

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

Still need to capture & assert Telemetry emissions for accept/reject/discard events

}.runIdeWithDriver()
.useDriverAndCloseIde {
waitForProjectOpen()
Thread.sleep(2000)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Only had this to avoid the AI assistant promo popup from stealing focus. can Probably take out for CI



@BeforeEach
fun resetTestFile() {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

needed this for local testing, but can probably remove for CI

Copy link

github-actions bot commented Apr 5, 2025

Qodana Community for JVM

It seems all right 👌

No new problems were found according to the checks applied

💡 Qodana analysis was run in the pull request mode: only the changed files were checked
☁️ View the detailed Qodana report

Contact Qodana team

Contact us at [email protected]

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