import XCTest /// Covers Orders -> Order Details, another big zero-coverage screen /// (OrderDetailsView.swift, ~1100 lines). Relies on the standing QA /// account's real order history - see /// decisions/2026-08-06-ui-test-account-and-app-attest-bypass.md. final class OrderDetailsFlowTests: XCTestCase { override func setUpWithError() throws { continueAfterFailure = false } override func tearDownWithError() throws { XCUIApplication().logoutIfAuthenticated() } func testOrderDetailsReachableFromOrdersList() throws { let app = XCUIApplication() app.launch() XCTAssertTrue(app.ensureLoggedIn(), "Login never completed") XCTAssertTrue(app.buttons["Sair da Conta"].waitForExistence(timeout: 10), "Never reached authenticated Profile") app.staticTexts["Meus Pedidos"].tap() XCTAssertTrue(app.staticTexts["Meus Pedidos"].waitForExistence(timeout: 10)) // "Ver Detalhes" appears once per order card; this account has real // order history (confirmed in AuthenticatedProfileNavigationTests). let detailsButton = app.buttons["Ver Detalhes"] XCTAssertTrue(detailsButton.waitForExistence(timeout: 10), "No orders with a 'Ver Detalhes' action found") detailsButton.tap() XCTAssertTrue(app.staticTexts["Detalhes do Pedido"].waitForExistence(timeout: 10), "Never reached Order Details") XCTAssertTrue(app.staticTexts["Itens do Pedido"].waitForExistence(timeout: 5)) XCTAssertTrue(app.staticTexts["Resumo de Valores"].waitForExistence(timeout: 5)) } }