Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Fixing the WebAuthn integration tests #3933

Merged
merged 1 commit into from
Dec 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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!")
})
Loading