mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-04 01:20:12 +00:00
improved location sharing handler
This commit is contained in:
@@ -16,11 +16,11 @@ final class AccessibilityTests: XCTestCase {
|
|||||||
app = Application.launch(viewID: name)
|
app = Application.launch(viewID: name)
|
||||||
await client.waitForApp()
|
await client.waitForApp()
|
||||||
defer { try? client.stop() }
|
defer { try? client.stop() }
|
||||||
|
|
||||||
// To handle location sharing popup
|
|
||||||
allowLocationPermissions()
|
|
||||||
|
|
||||||
try client.send(.accessibilityAudit(.nextPreview))
|
try client.send(.accessibilityAudit(.nextPreview))
|
||||||
|
|
||||||
|
// To handle location sharing popup in CI
|
||||||
|
allowLocationPermissions()
|
||||||
forLoop: for await signal in client.signals.values {
|
forLoop: for await signal in client.signals.values {
|
||||||
switch signal {
|
switch signal {
|
||||||
case .accessibilityAudit(let auditSignal):
|
case .accessibilityAudit(let auditSignal):
|
||||||
@@ -44,7 +44,7 @@ final class AccessibilityTests: XCTestCase {
|
|||||||
private func allowLocationPermissions() {
|
private func allowLocationPermissions() {
|
||||||
let springboard = XCUIApplication(bundleIdentifier: "com.apple.springboard")
|
let springboard = XCUIApplication(bundleIdentifier: "com.apple.springboard")
|
||||||
let notificationAlertAllowButton = springboard.buttons["Allow While Using App"].firstMatch
|
let notificationAlertAllowButton = springboard.buttons["Allow While Using App"].firstMatch
|
||||||
if notificationAlertAllowButton.waitForExistence(timeout: 10.0) {
|
if notificationAlertAllowButton.exists {
|
||||||
notificationAlertAllowButton.tap()
|
notificationAlertAllowButton.tap()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user