Skip to content

Commit c97a290

Browse files
committed
Fix iOS 18 advanced auth UI tests and add iOS 18 to CI
- Update LoginPageObject to handle iOS 18 button label change from "Close" to "Cancel" - Add iOS 18 (Xcode 16) to UI test matrix in pr.yaml workflow - Add iOS 18 (Xcode 16) to UI test matrix in ui-test-nightly.yaml workflow The advancedAuthCloseButton() method now checks for "Close" first (earlier iOS versions), then falls back to "Cancel" (iOS 18+) to ensure compatibility across simulators.
1 parent d5f2d47 commit c97a290

3 files changed

Lines changed: 29 additions & 3 deletions

File tree

.github/workflows/pr.yaml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,9 +138,20 @@ jobs:
138138

139139
ui-tests-pr:
140140
needs: [test-orchestrator]
141+
strategy:
142+
fail-fast: false
143+
matrix:
144+
ios: [^26, ^18]
145+
include:
146+
- ios: ^26
147+
xcode: ^26
148+
- ios: ^18
149+
xcode: ^16
141150
uses: ./.github/workflows/reusable-ui-test-workflow.yaml
142151
with:
143152
is_pr: true
153+
ios: ${{ matrix.ios }}
154+
xcode: ${{ matrix.xcode }}
144155
pr_test: "AuthFlowTesterUITests/LegacyLoginTests/testCAOpaque_DefaultScopes_WebServerFlow"
145156
short_timeout: "2"
146157
long_timeout: "7"

.github/workflows/ui-test-nightly.yaml

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,19 @@ on:
77

88
jobs:
99
ios-ui-test-nightly:
10+
strategy:
11+
fail-fast: false
12+
matrix:
13+
ios: [^26, ^18]
14+
include:
15+
- ios: ^26
16+
xcode: ^26
17+
- ios: ^18
18+
xcode: ^16
1019
uses: ./.github/workflows/reusable-ui-test-workflow.yaml
1120
with:
12-
ios: "^26"
13-
xcode: "^26"
21+
ios: ${{ matrix.ios }}
22+
xcode: ${{ matrix.xcode }}
1423
short_timeout: "2"
1524
long_timeout: "7"
1625
secrets: inherit

native/SampleApps/AuthFlowTester/AuthFlowTesterUITests/PageObjects/LoginPageObject.swift

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,13 @@ class LoginPageObject {
221221
}
222222

223223
private func advancedAuthCloseButton() -> XCUIElement {
224-
return app.otherElements["TopBrowserBar"].buttons["Close"]
224+
let topBar = app.otherElements["TopBrowserBar"]
225+
let closeButton = topBar.buttons["Close"]
226+
if closeButton.exists {
227+
return closeButton
228+
}
229+
// Earlier iOS versions use "Close", iOS 18+ uses "Cancel"
230+
return topBar.buttons["Cancel"]
225231
}
226232

227233
// MARK: - Actions

0 commit comments

Comments
 (0)