oficina / sheets Public

Native review UI test: a refused edit stays on its cell and blocks nothing

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Paul Campbell pushed by claude agent, operated by paul@keymail.dev 3dd17f77337c14345315fa19515337446b94c381 parent 604b09d
1 file changed, +7 −4
  • native/ios/UITests/NativeUITests.swift +7 −4

CI passed — run details

CI log
amadan: .amadan/timeout: this job's budget is 15m0s (this runner allows up to 30m0s)
=== vet ===
CGO_ENABLED=0 go vet ./...
CGO_ENABLED=0 go vet -tags browser ./internal/sheets/
=== spacing ===
go tool fiesta spacing -skip 'vendor/*.css' -skip 'tokens.css' internal/sheets/static
=== fmt ===
=== build ===
CGO_ENABLED=0 go build ./...
=== migrations ===
go tool rastrillo migration check
rastrillo migration check: models and migrations agree
=== go-test ===
CGO_ENABLED=0 go test -count=1 ./...
?   	amadan.net/oficina/sheets/cmd/sheets	[no test files]
?   	amadan.net/oficina/sheets/cmd/sheets-contract	[no test files]
ok  	amadan.net/oficina/sheets/internal/guardstest	0.175s
ok  	amadan.net/oficina/sheets/internal/sheets	16.487s
ok  	amadan.net/oficina/sheets/internal/sheets/calc	0.010s
ok  	amadan.net/oficina/sheets/internal/sheets/format	0.003s
?   	amadan.net/oficina/sheets/internal/sheets/keymailtest	[no test files]
ok  	amadan.net/oficina/sheets/internal/sheets/live	0.054s
ok  	amadan.net/oficina/sheets/internal/sheets/seal	0.002s
ok  	amadan.net/oficina/sheets/internal/sheets/sealtest	0.006s
ok  	amadan.net/oficina/sheets/internal/sheets/store	6.277s
ok  	amadan.net/oficina/sheets/internal/sheets/teamstate	0.136s
ok  	amadan.net/oficina/sheets/internal/sheets/xlsx	4.857s
?   	amadan.net/oficina/sheets/tools/gencorpus	[no test files]
=== race ===
go test -race -count=1 ./internal/sheets/store/... ./internal/sheets/live/...
ok  	amadan.net/oficina/sheets/internal/sheets/store	73.155s
ok  	amadan.net/oficina/sheets/internal/sheets/live	1.065s
diff --git a/native/ios/UITests/NativeUITests.swift b/native/ios/UITests/NativeUITests.swift
index 9c1bfb6..b3acbbe 100644
--- a/native/ios/UITests/NativeUITests.swift
+++ b/native/ios/UITests/NativeUITests.swift
@@ -73,6 +73,8 @@ import XCTest
field.typeText(reference + "\n")
}
+ // Edits are optimistic (2026-11-26): a refused one keeps its value on
+ // its cell, marked, offers Retry, and blocks nothing else.
func testFailedCellEditCanBeRetriedWithoutLosingDraft() {
continueAfterFailure = false
let app = XCUIApplication()
@@ -86,12 +88,13 @@ import XCTest
// Only this exact synthetic input triggers one refusal in the fixture.
formula.typeText("=6*7")
app.buttons["Save"].tap()
- let retry = app.buttons["Retry pending edits"]
+ // "Retry" reads "Try again" in English (Mac.strings).
+ let retry = app.buttons["Try again"]
XCTAssertTrue(retry.waitForExistence(timeout: 10))
- XCTAssertEqual(formula.value as? String, "=6*7")
- XCTAssertFalse(formula.isEnabled)
+ XCTAssertTrue(app.buttons["A1, =6*7"].exists, "the refused value stays on its cell")
+ XCTAssertTrue(formula.isEnabled, "a refused edit must not lock the formula bar")
app.buttons["A2, Empty"].tap()
- XCTAssertEqual(app.textFields["Cell or range, for example A1:B5"].value as? String, "A1")
+ XCTAssertEqual(app.textFields["Cell or range, for example A1:B5"].value as? String, "A2")
retry.tap()
XCTAssertTrue(app.buttons["A1, 42"].waitForExistence(timeout: 10))
XCTAssertEqual(XCTWaiter.wait(for: [XCTNSPredicateExpectation(predicate: NSPredicate(format: "exists == false"), object: retry)], timeout: 10), .completed)