Stabilize Project Navigator UI tests#2183
Open
jkaunert wants to merge 3 commits into
Open
Conversation
There was a problem hiding this comment.
Pull request overview
This PR focuses on stabilizing Project Navigator UI tests by improving how tests locate and wait for navigator elements, and by introducing a DEBUG-only app launch mode that opens an isolated temporary workspace created by CodeEdit.
Changes:
- Added more resilient UI-test queries and explicit wait helpers for navigator row discovery and row-count changes.
- Updated Project Navigator UI tests to wait for expected rows/row-count transitions instead of relying on short timing windows.
- Added a DEBUG-only launch argument path for CodeEdit to create/open an isolated temp workspace for UI tests.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| CodeEditUITests/Query.swift | Adds add-button lookup, row query helpers, and polling-based wait utilities used by UI tests. |
| CodeEditUITests/ProjectPath.swift | Adds helper to generate a temp workspace identifier for app-created workspaces. |
| CodeEditUITests/Features/NavigatorArea/ProjectNavigator/ProjectNavigatorUITests.swift | Hardens folder open/close assertions using explicit waits and row-count checks. |
| CodeEditUITests/Features/NavigatorArea/ProjectNavigator/ProjectNavigatorFileManagementUITests.swift | Stabilizes “Add File” flow by waiting for navigator growth, expected row, and editor/tab evidence. |
| CodeEditUITests/App.swift | Adds launchWithAppWritableTempDir() to launch CodeEdit in a workspace created by the app. |
| CodeEdit/Features/NavigatorArea/ProjectNavigator/ProjectNavigatorToolbarBottom.swift | Makes the “Add” control more reliably discoverable by UI tests via an explicit label and sizing. |
| CodeEdit/AppDelegate.swift | Adds DEBUG-only support for --codeedit-uitest-open-temp-workspace and consolidates workspace opening logic. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Why
While preparing the Project Navigator UI-test stabilization work, release-readiness review found
testCreateNewFilescould still race file creation by relying on a short selected-row/row lookup after choosing Add File. This hardens that path so creation waits for observable navigator growth, the expected titled row, and tab/editor evidence before continuing.Validation
DEVELOPER_DIR=/Applications/Xcode-26.6-RC2.app/Contents/Developer xcodebuild -version-> Xcode 26.6 (17F113)xcodebuild -project CodeEdit.xcodeproj -scheme CodeEdit -configuration Debug -derivedDataPath /tmp/apple-appdev-deriveddata/codeedit-baseline-ui-tests-pr-20260702-xcode26 -destination 'platform=macOS' -skipPackagePluginValidation build-> passed (** BUILD SUCCEEDED **)xcodebuild ... -only-testing:CodeEditUITests/ProjectNavigatorFileManagementUITests/testCreateNewFiles -only-testing:CodeEditUITests/ProjectNavigatorUITests/testNavigatorOpenFilesAndFolder test-> passed (** TEST SUCCEEDED **, 2 tests)xcodebuild ... -only-testing:CodeEditUITests/ProjectNavigatorFileManagementUITests test-> passed (** TEST SUCCEEDED **, 2 tests)xcodebuild ... -only-testing:CodeEditUITests/ProjectNavigatorUITests test-> passed (** TEST SUCCEEDED **, 1 test)git diff --check upstream/main...HEAD-> cleanNotes
The build/test runs still print SwiftLint package-plugin command-report noise after success, for example
The following build commands failed: Running SwiftLint ..., whilexcodebuildexits 0 and prints the final build/test success marker. I did not find a branch-attributable warning from these UI-test changes.My active default Xcode is currently Xcode 27 beta; that toolchain fails unrelated base code in
EditorTabsOverflowShadow.swiftwithambiguous use of 'opacity'. I used Xcode 26.6 for this PR's freshness validation.