Harden test harness and UI suite

This commit is contained in:
Trey t
2026-04-03 15:30:54 -05:00
parent 87b9971714
commit 0fa3db5401
13 changed files with 319 additions and 55 deletions

View File

@@ -206,22 +206,14 @@ final class ProgressTests: BaseUITestCase {
visitSheet.tapSave()
visitSheet.navigationBar.waitForNonExistence(timeout: BaseUITestCase.defaultTimeout)
// Wait for data to reload
sleep(2)
// Progress should have updated verify the progress circle label changed
let updatedCircle = app.descendants(matching: .any).matching(NSPredicate(
format: "label CONTAINS 'stadiums visited'"
)).firstMatch
XCTAssertTrue(updatedCircle.waitForExistence(timeout: BaseUITestCase.longTimeout),
"Progress circle should exist after adding a visit")
// If we had an initial label, verify it changed
if !initialLabel.isEmpty {
// The new label should have a higher visited count
XCTAssertNotEqual(updatedCircle.label, initialLabel,
"Progress label should update after adding a visit")
waitUntil(timeout: BaseUITestCase.longTimeout, "Progress label should update after adding a visit") {
guard updatedCircle.exists else { return false }
return initialLabel.isEmpty || updatedCircle.label != initialLabel
}
captureScreenshot(named: "F099-ProgressPercentageUpdated")