Skip to content

Commit dc0fe58

Browse files
authored
fix: testNoBreadcrumbForTextFieldEditingChanged flakiness (#2992)
Solving testNoBreadcrumbForTextFieldEditingChanged flakiness in the CI simulator.
1 parent fd6a31c commit dc0fe58

File tree

2 files changed

+7
-8
lines changed

2 files changed

+7
-8
lines changed

.github/workflows/test.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -281,14 +281,14 @@ jobs:
281281

282282
ui-tests:
283283
name: UI Tests for ${{matrix.target}} on Simulators
284-
runs-on: macos-12
285-
strategy:
284+
runs-on: macos-13
285+
strategy:
286286
matrix:
287287
target: ['ios_swift', 'ios_objc', 'tvos_swift']
288288

289289
steps:
290290
- uses: actions/checkout@v3
291-
- run: ./scripts/ci-select-xcode.sh
291+
- run: ./scripts/ci-select-xcode.sh "14.3"
292292

293293
# GitHub Actions sometimes fail to launch the UI tests. Therefore we retry
294294
- name: Run Fastlane

Samples/iOS-Swift/iOS-SwiftUITests/UIEventBreadcrumbTests.swift

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,17 +22,16 @@ class UIEventBreadcrumbTests: XCTestCase {
2222
app.buttons["Extra"].tap()
2323
app.buttons["UI event tests"].tap()
2424

25-
let label = app.staticTexts["breadcrumbLabel"]
26-
2725
//Trigger a change in textfield
28-
app.buttons["editingChangedButton"].tap()
26+
app.buttons["editingChangedButton"].afterWaitingForExistence("Did not find editingChangedButton").tap()
27+
2928
//Check the last breadcrumb is the button being pressed
30-
XCTAssertEqual(label.label, "performEditingChangedPressed:")
29+
app.staticTexts["performEditingChangedPressed:"].waitForExistence("performEditingChangedPressed: not called")
3130

3231
//Trigger an endEditing in textfield
3332
app.buttons["editingDidEndButton"].tap()
3433
//Check the last breadcrumb is the endEditing from the textfield and not the button being pressed
35-
XCTAssertEqual(label.label, "textFieldEndChanging:")
34+
app.staticTexts["textFieldEndChanging:"].waitForExistence("textFieldEndChanging: not called")
3635
}
3736

3837
func waitForExistenceOfMainScreen() {

0 commit comments

Comments
 (0)