-
Notifications
You must be signed in to change notification settings - Fork 807
Update Rider UI test to handle new startup behavior #1458
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
Conversation
Rider now requires additional wait time after clicking the Create button in the New Solution dialog. The dialog takes longer to close and the project needs more time to open before the IdeFrameImpl becomes available. Added a 15-second wait after clicking Create to allow: - The New Solution dialog to close - The project to be created on disk - The IDE frame to fully initialize This matches similar changes needed for other JetBrains IDEs where startup behavior has changed to show welcome/project dialogs longer. Fixes timeout when trying to find IdeFrameImpl after project creation. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <[email protected]>
Code ReviewCritical Issues1. Hard-coded sleep is fragile and inefficient (tests/ui-rd-tests/src/test/kotlin/RiderUiTest.kt:148)
Suggested fix: step("Wait for dialog to close") {
waitFor(duration = Duration.ofSeconds(30)) {
runCatching {
find<WelcomeFrame>(Duration.ofSeconds(1))
false // Still present
}.getOrElse { true } // Not found = closed
}
}2. Redundant sleep removed without replacement (line 37-38)
Flow issue: startNewProject() // Returns immediately after dialog closes
// <-- No wait here anymore
idea { // Tries to find IdeFrameImpl - may fail if not ready
waitSmartMode()3. Mixed responsibilities in
Minor Issues4. Inconsistent timeout patterns
Recommendations
Test Coverage
|
| step("Wait for dialog to close") { | ||
| Thread.sleep(15000) |
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.
Critical: This sleep executes INSIDE the welcomeFrame {} block before the dialog closes. It won't help the IDE frame appear.
Move this wait outside and use waitFor() instead:
| step("Wait for dialog to close") { | |
| Thread.sleep(15000) | |
| } | |
| // Wait for welcome frame to close and IDE to initialize | |
| step("Wait for IDE frame") { | |
| waitFor(duration = Duration.ofSeconds(30)) { | |
| runCatching { find<IdeaFrame>(Duration.ofSeconds(1)); true } | |
| .getOrDefault(false) | |
| } | |
| } |
| // Wait for the IDE frame to appear after project creation | ||
| // The new Rider startup behavior requires waiting for the welcome dialog to close | ||
| // and the project to fully open before we can access the IdeFrameImpl | ||
| idea { |
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.
Bug: Removed the 5s sleep but added no replacement. The 15s sleep at line 148 is inside welcomeFrame {} and executes before this idea {} call.
The idea {} call has a 60s timeout (IdeaFrame.kt:23), but may fail immediately if frame doesn't exist. Add explicit wait after startNewProject().
Summary
Fixes timeout in Rider UI test by adding wait time after clicking Create button in New Solution dialog.
Problem
The Rider UI test was failing with a timeout when trying to find the
IdeFrameImplafter project creation. Analysis of the CI screen recording and UI hierarchy revealed that:Root Cause
Based on video analysis (screen-recording.mp4) and UI hierarchy dump (hierarchy-ideaVimTest.html):
FlatWelcomeFramewith "New Solution" dialog (MyDialog) was presentIdeFrameImplwas found in the UI hierarchySolution
Added a 15-second wait after clicking the Create button to allow:
This matches similar startup behavior changes in other JetBrains IDEs (see commit 2bf4189 for PyCharm).
Testing
./gradlew compileKotlin compileTestKotlin)Detailed Analysis
A full analysis has been written to
build/reports/ai-analysis.txtincluding:🤖 Generated with Claude Code