Skip to content
Merged
Changes from 1 commit
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
Original file line number Diff line number Diff line change
Expand Up @@ -309,6 +309,37 @@ class AuthenticationExampleUITests: XCTestCase {
)
}

func testPasskeyList() {
signOut()
let testEmail = "[email protected]"
let testPassword = "sample.ios.auth"
let testPasskeyName = "sampleiosauth"
app.staticTexts["Email & Password Login"].tap()
app.textFields["Email"].tap()
app.textFields["Email"].typeText(testEmail)
app.textFields["Password"].tap()
app.textFields["Password"].typeText(testPassword)
app.buttons["Login"].tap()
wait(forElement: app.navigationBars["User"], timeout: 5.0)
XCTAssertTrue(app.navigationBars["User"].exists)
XCTAssertTrue(
app.staticTexts[testEmail].exists,
"The user should be signed in and the email field should display their email."
)
let userTable = app.tables.firstMatch
XCTAssertTrue(userTable.waitForExistence(timeout: 5.0), "User detail list should exist")
let passkeyLabel = userTable.staticTexts[testPasskeyName]
if !passkeyLabel.exists {
for _ in 0 ..< 5 where !passkeyLabel.exists {
userTable.swipeUp()
}
}
XCTAssertTrue(
passkeyLabel.waitForExistence(timeout: 5.0),
"Passkey named '\(testPasskeyName)' should be visible in the Passkeys section."
)
}

// MARK: - Private Helpers

private func signOut() {
Expand Down
Loading