Skip to content

Commit ce82da2

Browse files
committed
test(swiftui): retry review-toggle keystroke in ReviewSplitScene
The space keystroke can lose the key-focus race on cold CI runners, which the old test masked by asserting nothing after it. fix(ci): give the release-assets job a repo context for gh The job has no checkout, so gh release upload failed with 'not a git repository' on the first real release run; GH_REPO makes the target explicit. The v0.3.4 AppImages were uploaded manually from the run's artifacts.
1 parent 33f9c34 commit ce82da2

2 files changed

Lines changed: 11 additions & 3 deletions

File tree

.github/workflows/appimage.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,8 @@ jobs:
123123
- name: Upload release asset
124124
env:
125125
GH_TOKEN: ${{ github.token }}
126+
# No checkout in this job, so gh needs the repo made explicit.
127+
GH_REPO: ${{ github.repository }}
126128
TAG_NAME: ${{ github.event.release.tag_name }}
127129
run: |
128130
ls -lh dist/appimage

shell/mac/Tests/JayJayUITests/Scenes/ReviewSplitScene.swift

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,18 @@ final class ReviewSplitScene: SceneBase {
1111

1212
files.element(boundBy: 0).click()
1313
keyStroke(.space)
14-
XCUIElement.perform(withKeyModifiers: .shift) {
15-
files.element(boundBy: 1).click()
16-
}
1714

15+
// Space can lose the key-focus race on cold CI runners; re-focus the row and retry once.
1816
let splitButton = app.buttons[AID.SplitSheet.openButton]
17+
if !splitButton.waitForExistence(timeout: 3) {
18+
files.element(boundBy: 0).click()
19+
keyStroke(.space)
20+
}
1921
XCTAssertTrue(splitButton.waitForExistence(timeout: 5), "Split toolbar button did not appear")
22+
23+
XCUIElement.perform(withKeyModifiers: .shift) {
24+
files.element(boundBy: 1).click()
25+
}
2026
splitButton.click()
2127

2228
let messageField = app.textFields[AID.SplitSheet.messageField]

0 commit comments

Comments
 (0)