import XCTest @MainActor final class NativeUITests: XCTestCase { func testNativeFormAndNavigation() { let app=XCUIApplication();app.launch() XCTAssertTrue(app.buttons["Add note"].waitForExistence(timeout: 10)) app.buttons["Add note"].tap() let title=app.textFields["Title"] XCTAssertTrue(title.waitForExistence(timeout: 5)); title.tap(); title.typeText("Native UI note") let body=app.textViews.firstMatch;body.tap();body.typeText("A new note created through the native iPhone form.") app.buttons["Save"].tap() let result = app.cells.containing(.staticText, identifier: "Native UI note").firstMatch XCTAssertTrue(result.waitForExistence(timeout: 10)) // Independent reviewer mutation, 2026-09-12: removing this tap fails the // detail-only sourcePassage assertions on iPad. Observed red, then restored. result.tap() if app.windows.firstMatch.frame.width < 600 { XCTAssertTrue(app.navigationBars["Source"].waitForExistence(timeout: 5)) } let source = app.staticTexts["sourcePassage"] XCTAssertTrue(source.waitForExistence(timeout: 5)) XCTAssertEqual(source.label, "A new note created through the native iPhone form.") let capture=XCTAttachment(screenshot: app.screenshot());capture.lifetime = .keepAlways;add(capture) } }