import XCTest final class ProfileNetworkMockUITests: XCTestCase { private var app: XCUIApplication! override func setUpWithError() throws { continueAfterFailure = false app = XCUIApplication() app.launchEnvironment["UITEST_NETWORK_MOCKS"] = "enabled" app.launch() } func testProfileScreenUsesFixtureResponse() throws { app.buttons["profile-refresh"].tap() let profileName = app.staticTexts["profile-name"] XCTAssertTrue( profileName.waitForExistence(timeout: 5), "Profile name did not appear" ) XCTAssertEqual(profileName.label, "Fixture User") } }