Files
openclaw/apps/ios/Tests/SettingsNetworkingHelpersTests.swift
Sash Zats 17106b4844 fix(ios): clean up notification settings state (#91923)
Summary:
- The branch replaces iOS notification permission display-string state with a typed SettingsNotificationStatus ... n value, and opens the app notification Settings page with UIApplication.openNotificationSettingsURLString.
- PR surface: Other +51. Total +51 across 5 files.
- Reproducibility: yes. Current main has a source-level reproduction path where the Notifications settings act ... n display strings and opens the general app Settings URL instead of the notification-specific Settings URL.

Automerge notes:
- No ClawSweeper repair was needed after automerge opt-in.

Validation:
- ClawSweeper review passed for head 1a2fdeeac5.
- Required merge gates passed before the squash merge.

Prepared head SHA: 1a2fdeeac5
Review: https://github.com/openclaw/openclaw/pull/91923#issuecomment-4669439195

Co-authored-by: Sash Zats <sash@zats.io>
2026-06-19 05:51:28 +00:00

33 lines
1.1 KiB
Swift

import Testing
@testable import OpenClaw
@Suite struct SettingsNetworkingHelpersTests {
@Test func diagnosticsIssuesNameEachReviewerVisibleCheck() {
#expect(
SettingsDiagnostics.issues(
gatewayConnected: false,
discoveredGatewayCount: 0,
talkConfigLoaded: false,
notificationsAllowed: false) == [
.gatewayOffline,
.discoveryUnavailable,
.notificationsUnavailable,
])
}
@Test func diagnosticsIssuesRequireTalkConfigOnlyAfterGatewayConnects() {
#expect(
SettingsDiagnostics.issues(
gatewayConnected: true,
discoveredGatewayCount: 1,
talkConfigLoaded: false,
notificationsAllowed: true) == [.talkConfigMissing])
#expect(
SettingsDiagnostics.issueCount(
gatewayConnected: true,
discoveredGatewayCount: 1,
talkConfigLoaded: true,
notificationsAllowed: true) == 0)
}
}