commit 67ae44b4b094d73c3272e706ef51eb12edc5b759
parent d22d42d4f4ec9526fb8781f86363672c98fcde00
Author: triesap <tyson@radroots.org>
Date: Fri, 28 Aug 2026 18:14:12 +0000
test: stabilize persona photo submission
- Bound the governed photo preparation wait without continuing after failure.
- Treat the ordinary form-to-root transition as completed local work.
- Avoid querying stale XCUITest elements after the submit control disappears.
- Preserve the exact visible-UI and deterministic-persona qualification boundary.
Diffstat:
1 file changed, 14 insertions(+), 9 deletions(-)
diff --git a/RadrootsUITests/RadrootsRemoteQualificationUITests.swift b/RadrootsUITests/RadrootsRemoteQualificationUITests.swift
@@ -823,10 +823,12 @@ final class RadrootsRemoteQualificationUITests: XCTestCase {
XCTAssertTrue(library.waitForExistence(timeout: 10))
XCTAssertTrue(library.isEnabled)
library.tap()
- XCTAssertTrue(
- app.descendants(matching: .any)["radroots.add.media.prepared"]
- .waitForExistence(timeout: 30)
- )
+ guard app.descendants(matching: .any)["radroots.add.media.prepared"]
+ .waitForExistence(timeout: 60)
+ else {
+ XCTFail("The governed Photo update image was not prepared")
+ throw QualificationError.missingProductSurface
+ }
case .event:
try enterText(app, identifier: "radroots.add.title", value: marker)
case .foodAvailability:
@@ -1113,10 +1115,12 @@ final class RadrootsRemoteQualificationUITests: XCTestCase {
) -> Bool {
let progress = app.descendants(matching: .any)["radroots.add.progress"]
let finished = NSPredicate { _, _ in
+ guard !progress.exists else { return false }
+ guard submit.exists else {
+ return app.buttons["radroots.add.new"].exists
+ }
let submitValue = submit.value as? String
- return submit.exists
- && !progress.exists
- && submitValue != priorSubmitValue
+ return submitValue != priorSubmitValue
&& submitValue != "Working"
}
let expectation = XCTNSPredicateExpectation(predicate: finished, object: app)
@@ -1131,9 +1135,10 @@ final class RadrootsRemoteQualificationUITests: XCTestCase {
) -> Bool {
let progress = app.descendants(matching: .any)["radroots.add.progress"]
let started = NSPredicate { _, _ in
+ guard !progress.exists else { return true }
+ guard submit.exists else { return true }
let submitValue = submit.value as? String
- return progress.exists
- || submitValue != priorSubmitValue
+ return submitValue != priorSubmitValue
}
for _ in 0..<3 {