Harden test harness and UI suite
This commit is contained in:
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user