diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 79addd527e2..b2f0922da77 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -281,14 +281,14 @@ jobs: ui-tests: name: UI Tests for ${{matrix.target}} on Simulators - runs-on: macos-12 - strategy: + runs-on: macos-13 + strategy: matrix: target: ['ios_swift', 'ios_objc', 'tvos_swift'] steps: - uses: actions/checkout@v3 - - run: ./scripts/ci-select-xcode.sh + - run: ./scripts/ci-select-xcode.sh "14.3" # GitHub Actions sometimes fail to launch the UI tests. Therefore we retry - name: Run Fastlane diff --git a/Samples/iOS-Swift/iOS-SwiftUITests/UIEventBreadcrumbTests.swift b/Samples/iOS-Swift/iOS-SwiftUITests/UIEventBreadcrumbTests.swift index 1734f21d711..db5a14a7069 100644 --- a/Samples/iOS-Swift/iOS-SwiftUITests/UIEventBreadcrumbTests.swift +++ b/Samples/iOS-Swift/iOS-SwiftUITests/UIEventBreadcrumbTests.swift @@ -22,17 +22,16 @@ class UIEventBreadcrumbTests: XCTestCase { app.buttons["Extra"].tap() app.buttons["UI event tests"].tap() - let label = app.staticTexts["breadcrumbLabel"] - //Trigger a change in textfield - app.buttons["editingChangedButton"].tap() + app.buttons["editingChangedButton"].afterWaitingForExistence("Did not find editingChangedButton").tap() + //Check the last breadcrumb is the button being pressed - XCTAssertEqual(label.label, "performEditingChangedPressed:") + app.staticTexts["performEditingChangedPressed:"].waitForExistence("performEditingChangedPressed: not called") //Trigger an endEditing in textfield app.buttons["editingDidEndButton"].tap() //Check the last breadcrumb is the endEditing from the textfield and not the button being pressed - XCTAssertEqual(label.label, "textFieldEndChanging:") + app.staticTexts["textFieldEndChanging:"].waitForExistence("textFieldEndChanging: not called") } func waitForExistenceOfMainScreen() {