Files
openclaw/apps/ios/Tests/RootTabsPresentationTests.swift
Colin Johnson f6e51ff99a feat(ios): refresh pro UI and gateway flows (#87367)
Summary:
- Replace the legacy iOS shell with Pro Command, Chat, Agents, and Settings tabs.
- Wire iOS chat/session/settings/diagnostics and realtime Talk flows through gateway-backed APIs.
- Add gateway/session and shared chat coverage for the new iOS flow.

Verification:
- git diff --check
- node scripts/run-vitest.mjs src/gateway/server.sessions.create.test.ts src/gateway/talk-realtime-relay.test.ts
- swift test --filter ChatViewModelTests (apps/shared/OpenClawKit)
- xcodebuild build for Nimrod's iPhone succeeded; install succeeded; launch was blocked because the phone was locked

Known follow-up:
- Preserve traceLevel in sessions.create parent runtime inheritance and keep the changelog credit in the follow-up patch.
2026-05-28 17:23:26 +03:00

42 lines
1.3 KiB
Swift

import Testing
@testable import OpenClaw
@MainActor
@Suite struct RootTabsPresentationTests {
@Test func quickSetupDoesNotPresentWhenGatewayAlreadyConfigured() {
let shouldPresent = RootTabs.shouldPresentQuickSetup(
quickSetupDismissed: false,
showOnboarding: false,
hasPresentedSheet: false,
gatewayConnected: false,
hasExistingGatewayConfig: true,
discoveredGatewayCount: 1)
#expect(!shouldPresent)
}
@Test func quickSetupPresentsForFreshInstallWithDiscoveredGateway() {
let shouldPresent = RootTabs.shouldPresentQuickSetup(
quickSetupDismissed: false,
showOnboarding: false,
hasPresentedSheet: false,
gatewayConnected: false,
hasExistingGatewayConfig: false,
discoveredGatewayCount: 1)
#expect(shouldPresent)
}
@Test func quickSetupDoesNotPresentWhenAlreadyConnected() {
let shouldPresent = RootTabs.shouldPresentQuickSetup(
quickSetupDismissed: false,
showOnboarding: false,
hasPresentedSheet: false,
gatewayConnected: true,
hasExistingGatewayConfig: false,
discoveredGatewayCount: 1)
#expect(!shouldPresent)
}
}