Skip to content

Commit daf0b35

Browse files
authored
Merge pull request #4014 from wmathurin/fix/ios18-advanced-auth-ui-tests
Fix iOS 18 advanced auth UI tests and add iOS 18 to CI
2 parents 60b1739 + 4eef211 commit daf0b35

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 "Cancel"
230+
return topBar.buttons["Cancel"]
225231
}
226232

227233
// MARK: - Actions

0 commit comments

Comments
 (0)