mirror of
https://github.com/openclaw/openclaw.git
synced 2026-03-12 07:20:45 +00:00
* fix(ios): hide quick setup when gateway is configured * fix: note ios quick setup gating for configured gateways (#38964) (thanks @ngutman)
41 lines
1.3 KiB
Swift
41 lines
1.3 KiB
Swift
import Testing
|
|
@testable import OpenClaw
|
|
|
|
@Suite struct RootCanvasPresentationTests {
|
|
@Test func quickSetupDoesNotPresentWhenGatewayAlreadyConfigured() {
|
|
let shouldPresent = RootCanvas.shouldPresentQuickSetup(
|
|
quickSetupDismissed: false,
|
|
showOnboarding: false,
|
|
hasPresentedSheet: false,
|
|
gatewayConnected: false,
|
|
hasExistingGatewayConfig: true,
|
|
discoveredGatewayCount: 1)
|
|
|
|
#expect(!shouldPresent)
|
|
}
|
|
|
|
@Test func quickSetupPresentsForFreshInstallWithDiscoveredGateway() {
|
|
let shouldPresent = RootCanvas.shouldPresentQuickSetup(
|
|
quickSetupDismissed: false,
|
|
showOnboarding: false,
|
|
hasPresentedSheet: false,
|
|
gatewayConnected: false,
|
|
hasExistingGatewayConfig: false,
|
|
discoveredGatewayCount: 1)
|
|
|
|
#expect(shouldPresent)
|
|
}
|
|
|
|
@Test func quickSetupDoesNotPresentWhenAlreadyConnected() {
|
|
let shouldPresent = RootCanvas.shouldPresentQuickSetup(
|
|
quickSetupDismissed: false,
|
|
showOnboarding: false,
|
|
hasPresentedSheet: false,
|
|
gatewayConnected: true,
|
|
hasExistingGatewayConfig: false,
|
|
discoveredGatewayCount: 1)
|
|
|
|
#expect(!shouldPresent)
|
|
}
|
|
}
|