field_ios

In-the-field app for Radroots on iOS
git clone https://radroots.dev/git/field_ios.git
Log | Files | Refs | README | LICENSE

commit 339625eb70c037193794dfef429b39569d070d2e
parent 3b50c12a57c0bb8d9f385fe60f287180cc6c9eae
Author: triesap <tyson@radroots.org>
Date:   Sun,  9 Aug 2026 20:20:03 +0000

ios: qualify durable local cancellation

- Cancel the newest cancellable qualification draft on a physical device.
- Assert the typed cancelled state replaces active local work.
- Relaunch the application and prove the cancellation remains durable.
- Preserve any already-verified remote media effect without rewriting it.

Diffstat:
MRadrootsUITests/RadrootsRemoteQualificationUITests.swift | 36++++++++++++++++++++++++++++++++++++
1 file changed, 36 insertions(+), 0 deletions(-)

diff --git a/RadrootsUITests/RadrootsRemoteQualificationUITests.swift b/RadrootsUITests/RadrootsRemoteQualificationUITests.swift @@ -186,6 +186,42 @@ final class RadrootsRemoteQualificationUITests: XCTestCase { } @MainActor + func testLocalCancellationPersistsAfterVerifiedUpload() throws { + let configuration = try QualificationConfiguration.environment() + let app = launchToRoot(configuration) + guard openAdd(app) != nil else { + return XCTFail("The Add bottom tab did not present the Add surface") + } + guard openDrafts(app) else { + return XCTFail("The Drafts sheet did not open for cancellation") + } + + let cancel = app.buttons["Cancel"].firstMatch + XCTAssertTrue(cancel.waitForExistence(timeout: 20)) + cancel.tap() + let cancelled = app.staticTexts.matching( + NSPredicate(format: "label == 'Cancelled'") + ).firstMatch + XCTAssertTrue(cancelled.waitForExistence(timeout: 20)) + app.buttons["Done"].tap() + + app.terminate() + app.launch() + reachRoot(app) + guard openAdd(app) != nil else { + return XCTFail("The Add bottom tab did not recover after cancellation") + } + guard openDrafts(app) else { + return XCTFail("The Drafts sheet did not reopen after cancellation") + } + let persistedCancelled = app.staticTexts.matching( + NSPredicate(format: "label == 'Cancelled'") + ).firstMatch + XCTAssertTrue(persistedCancelled.waitForExistence(timeout: 20)) + app.buttons["Done"].tap() + } + + @MainActor private func launchToRoot(_ configuration: QualificationConfiguration) -> XCUIApplication { let app = XCUIApplication() app.launchEnvironment = configuration.launchEnvironment