Skip to content

Commit

Permalink
fix: Fixing the WebAuthn integration tests (#3933)
Browse files Browse the repository at this point in the history
  • Loading branch information
ruisebas authored Dec 9, 2024
1 parent 69d0159 commit 06207f4
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 12 deletions.
15 changes: 10 additions & 5 deletions .github/workflows/integ_test_auth.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,11 @@ on:
required: true
default: true
type: boolean
webauthn-ios:
description: '🔐 WebAuthn iOS'
required: true
default: true
type: boolean
workflow_call:

permissions:
Expand Down Expand Up @@ -59,8 +64,8 @@ jobs:
timeout-minutes: 30
secrets: inherit

# Disabling the integration test because the job is not able to connect to the local server
# auth-webauthn-integration-test-iOS:
# name: Auth WebAuthn Integration Tests (iOS)
# uses: ./.github/workflows/integ_test_auth_webauthn.yml
# secrets: inherit
auth-webauthn-integration-test-iOS:
if: ${{ inputs.webauthn-ios != 'false' }}
name: Auth WebAuthn Integration Tests (iOS)
uses: ./.github/workflows/integ_test_auth_webauthn.yml
secrets: inherit
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@ final class AuthWebAuthnAppUITests: XCTestCase {
private var deleteButton: XCUIElement!
private var deleteUserButton: XCUIElement!
private var springboard: XCUIApplication!
private var continueButton: XCUIElement!
private var continueButton: XCUIElement! {
springboard.otherElements["ASAuthorizationControllerContinueButton"]
}

private lazy var deviceIdentifier: String = {
let paths = Bundle.main.bundleURL.pathComponents
Expand Down Expand Up @@ -57,7 +59,6 @@ final class AuthWebAuthnAppUITests: XCTestCase {
signInButton = nil
deleteButton = nil
deleteUserButton = nil
continueButton = nil
springboard = nil
try await uninstallApp()
}
Expand Down Expand Up @@ -233,9 +234,6 @@ final class AuthWebAuthnAppUITests: XCTestCase {
signOutButton = app.buttons["SignOut"]

springboard = XCUIApplication(bundleIdentifier: "com.apple.springboard")
// The Continue button only appears when a FaceID operation is triggered,
// so we're also not checking for its existance
continueButton = springboard.otherElements["ASAuthorizationControllerContinueButton"]
}

@MainActor
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import Foundation

enum LocalServer {
static let endpoint = "http://127.0.0.1:9293"
static let endpoint = "http://127.0.0.1:9294"

case boot(String)
case enroll(String)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,6 @@ app.post('/match', async (req, res) => {
}
})

app.listen(9293, () => {
app.listen(9294, () => {
console.log("Simulator server started!")
})

0 comments on commit 06207f4

Please sign in to comment.