mirror of
https://github.com/openclaw/openclaw.git
synced 2026-08-27 21:07:01 -06:00
fix(ios): generate light app store screenshots only
This commit is contained in:
@@ -3,11 +3,6 @@ import XCTest
|
||||
|
||||
@MainActor
|
||||
final class OpenClawSnapshotUITests: XCTestCase {
|
||||
private enum ScreenshotAppearance: String, CaseIterable {
|
||||
case light
|
||||
case dark
|
||||
}
|
||||
|
||||
private struct ScreenshotTarget {
|
||||
let initialTab: String
|
||||
let initialDestination: String
|
||||
@@ -36,12 +31,9 @@ final class OpenClawSnapshotUITests: XCTestCase {
|
||||
}
|
||||
|
||||
func testConnectedGatewayTabs() {
|
||||
for appearance in ScreenshotAppearance.allCases {
|
||||
for target in Self.screenshotTargets {
|
||||
self.launchApp(for: target, appearance: appearance)
|
||||
let name = appearance == .light ? target.name : "\(target.name)-dark"
|
||||
snapshot(name, timeWaitingForIdle: 5)
|
||||
}
|
||||
for target in Self.screenshotTargets {
|
||||
self.launchApp(for: target)
|
||||
snapshot(target.name, timeWaitingForIdle: 5)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -183,18 +175,13 @@ final class OpenClawSnapshotUITests: XCTestCase {
|
||||
XCTAssertEqual(app.state, .runningForeground)
|
||||
}
|
||||
|
||||
private func launchApp(
|
||||
for target: ScreenshotTarget,
|
||||
appearance: ScreenshotAppearance = .light)
|
||||
{
|
||||
private func launchApp(for target: ScreenshotTarget) {
|
||||
self.app?.terminate()
|
||||
|
||||
let app = XCUIApplication()
|
||||
setupSnapshot(app)
|
||||
app.launchArguments += [
|
||||
"--openclaw-screenshot-mode",
|
||||
"--openclaw-appearance",
|
||||
appearance.rawValue,
|
||||
"--openclaw-initial-tab",
|
||||
target.initialTab,
|
||||
"--openclaw-initial-destination",
|
||||
|
||||
Reference in New Issue
Block a user