diff --git a/PediFoodsUITests/CartCheckoutFlowTests.swift b/PediFoodsUITests/CartCheckoutFlowTests.swift index b25a156..9028e6d 100644 --- a/PediFoodsUITests/CartCheckoutFlowTests.swift +++ b/PediFoodsUITests/CartCheckoutFlowTests.swift @@ -39,9 +39,12 @@ final class CartCheckoutFlowTests: XCTestCase { if errorText.exists { signals.append("error text visible: \(errorText.label)") } + // A bare `\.label` key path literal is illegal here - `label` is + // @MainActor-isolated, and a key path must be formable from any + // isolation context. A closure isn't subject to that restriction. let visibleTexts = app.staticTexts.allElementsBoundByIndex .prefix(15) - .map(\.label) + .map { $0.label } .joined(separator: " | ") signals.append("visible static texts: [\(visibleTexts)]") return signals.joined(separator: "; ")