From 4f0963e8f0b7ec63ab36a25b2533a68143662059 Mon Sep 17 00:00:00 2001 From: Dhiogo Ramos Brustolin Date: Wed, 3 May 2023 11:01:10 +0200 Subject: [PATCH 1/7] Update UIEventBreadcrumbTests.swift --- .../iOS-Swift/iOS-SwiftUITests/UIEventBreadcrumbTests.swift | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/Samples/iOS-Swift/iOS-SwiftUITests/UIEventBreadcrumbTests.swift b/Samples/iOS-Swift/iOS-SwiftUITests/UIEventBreadcrumbTests.swift index 1734f21d711..e0518c9e9ff 100644 --- a/Samples/iOS-Swift/iOS-SwiftUITests/UIEventBreadcrumbTests.swift +++ b/Samples/iOS-Swift/iOS-SwiftUITests/UIEventBreadcrumbTests.swift @@ -22,17 +22,15 @@ 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() //Check the last breadcrumb is the button being pressed - XCTAssertEqual(label.label, "performEditingChangedPressed:") + XCTAssertEqual(app.staticTexts["breadcrumbLabel"].label, "performEditingChangedPressed:") //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:") + XCTAssertEqual(app.staticTexts["breadcrumbLabel"].label, "textFieldEndChanging:") } func waitForExistenceOfMainScreen() { From 4c79dd3d6a40914ecf08fc98b68a784999c08b0b Mon Sep 17 00:00:00 2001 From: Dhiogo Ramos Brustolin Date: Wed, 3 May 2023 11:41:34 +0200 Subject: [PATCH 2/7] Update UIEventBreadcrumbTests.swift --- Samples/iOS-Swift/iOS-SwiftUITests/UIEventBreadcrumbTests.swift | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Samples/iOS-Swift/iOS-SwiftUITests/UIEventBreadcrumbTests.swift b/Samples/iOS-Swift/iOS-SwiftUITests/UIEventBreadcrumbTests.swift index e0518c9e9ff..e86b6680a11 100644 --- a/Samples/iOS-Swift/iOS-SwiftUITests/UIEventBreadcrumbTests.swift +++ b/Samples/iOS-Swift/iOS-SwiftUITests/UIEventBreadcrumbTests.swift @@ -24,6 +24,8 @@ class UIEventBreadcrumbTests: XCTestCase { //Trigger a change in textfield app.buttons["editingChangedButton"].tap() + + Thread.sleep(forTimeInterval: 0.5) //Check the last breadcrumb is the button being pressed XCTAssertEqual(app.staticTexts["breadcrumbLabel"].label, "performEditingChangedPressed:") From 92515d38582680c254bbf82b01559b4002b9c709 Mon Sep 17 00:00:00 2001 From: Dhiogo Ramos Brustolin Date: Wed, 3 May 2023 16:11:33 +0200 Subject: [PATCH 3/7] Update UIEventBreadcrumbTests.swift --- .../iOS-Swift/iOS-SwiftUITests/UIEventBreadcrumbTests.swift | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Samples/iOS-Swift/iOS-SwiftUITests/UIEventBreadcrumbTests.swift b/Samples/iOS-Swift/iOS-SwiftUITests/UIEventBreadcrumbTests.swift index e86b6680a11..978d54826a3 100644 --- a/Samples/iOS-Swift/iOS-SwiftUITests/UIEventBreadcrumbTests.swift +++ b/Samples/iOS-Swift/iOS-SwiftUITests/UIEventBreadcrumbTests.swift @@ -25,14 +25,13 @@ class UIEventBreadcrumbTests: XCTestCase { //Trigger a change in textfield app.buttons["editingChangedButton"].tap() - Thread.sleep(forTimeInterval: 0.5) //Check the last breadcrumb is the button being pressed - XCTAssertEqual(app.staticTexts["breadcrumbLabel"].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(app.staticTexts["breadcrumbLabel"].label, "textFieldEndChanging:") + app.staticTexts["textFieldEndChanging:"].waitForExistence("textFieldEndChanging: not called") } func waitForExistenceOfMainScreen() { From 1781affbf67b1731b4c537073c698d9ce8fa624f Mon Sep 17 00:00:00 2001 From: Dhiogo Ramos Brustolin Date: Wed, 3 May 2023 16:45:13 +0200 Subject: [PATCH 4/7] Update UIEventBreadcrumbTests.swift --- Samples/iOS-Swift/iOS-SwiftUITests/UIEventBreadcrumbTests.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Samples/iOS-Swift/iOS-SwiftUITests/UIEventBreadcrumbTests.swift b/Samples/iOS-Swift/iOS-SwiftUITests/UIEventBreadcrumbTests.swift index 978d54826a3..db5a14a7069 100644 --- a/Samples/iOS-Swift/iOS-SwiftUITests/UIEventBreadcrumbTests.swift +++ b/Samples/iOS-Swift/iOS-SwiftUITests/UIEventBreadcrumbTests.swift @@ -23,7 +23,7 @@ class UIEventBreadcrumbTests: XCTestCase { app.buttons["UI event tests"].tap() //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 app.staticTexts["performEditingChangedPressed:"].waitForExistence("performEditingChangedPressed: not called") From b9cc90b629b78890e30f9937705e3a0de819d7ac Mon Sep 17 00:00:00 2001 From: Dhiogo Ramos Brustolin Date: Wed, 3 May 2023 16:49:25 +0200 Subject: [PATCH 5/7] Update test.yml --- .github/workflows/test.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 79addd527e2..733e22689de 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -247,7 +247,7 @@ jobs: # that adds a significant overhead. thread-sanitizer: name: Unit iOS - Thread Sanitizer - runs-on: macos-12 + runs-on: macos-12 # When there are threading issues the tests sometimes keep hanging timeout-minutes: 20 @@ -281,7 +281,7 @@ jobs: ui-tests: name: UI Tests for ${{matrix.target}} on Simulators - runs-on: macos-12 + runs-on: macos-13 strategy: matrix: target: ['ios_swift', 'ios_objc', 'tvos_swift'] From c2c0fa7fab47c953d0880e6fc3fbe719f891da5e Mon Sep 17 00:00:00 2001 From: Dhiogo Ramos Brustolin Date: Wed, 3 May 2023 17:03:44 +0200 Subject: [PATCH 6/7] Update test.yml --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 733e22689de..23a1eda66d6 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -247,7 +247,7 @@ jobs: # that adds a significant overhead. thread-sanitizer: name: Unit iOS - Thread Sanitizer - runs-on: macos-12 + runs-on: macos-12 # When there are threading issues the tests sometimes keep hanging timeout-minutes: 20 From 209fcedc65a384fa78200f5ee536e984ee9d1eb2 Mon Sep 17 00:00:00 2001 From: Dhiogo Ramos Brustolin Date: Wed, 3 May 2023 17:15:37 +0200 Subject: [PATCH 7/7] Update test.yml --- .github/workflows/test.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 23a1eda66d6..b2f0922da77 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -282,13 +282,13 @@ jobs: ui-tests: name: UI Tests for ${{matrix.target}} on Simulators runs-on: macos-13 - strategy: + 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