Skip to content

Implement dialog handling tests for system-level permission and alert dialogs. #18

@mobilinkd

Description

@mobilinkd

Implement dialog handling tests for system-level permission and alert dialogs.

Test case

  1. testBluetoothPermissionDialog() — first-run flow, handle system "Allow Bluetooth?" alert

Implementation

Uses addUIInterruptionMonitor:

addUIInterruptionMonitor(withDescription: "Bluetooth Permission") { alert in
    if alert.buttons["Allow"].exists {
        alert.buttons["Allow"].tap()
        return true
    }
    return false
}

Notes

  • System pairing/bonding dialog (CoreBluetooth sheet) is not reliably handled by XCUITest — full pairing flow remains manual
  • This test verifies only the permission dialog, not the pairing dialog

Acceptance criteria

  • Test passes on first-run or after resetting Bluetooth permission
  • Interruption monitor is registered in setUp() and unregistered in tearDown()

Parent: #12

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions