惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
U
Unit 42
Google DeepMind News
Google DeepMind News
博客园 - 司徒正美
Y
Y Combinator Blog
F
Fortinet All Blogs
云风的 BLOG
云风的 BLOG
T
Tailwind CSS Blog
G
Google Developers Blog
酷 壳 – CoolShell
酷 壳 – CoolShell
罗磊的独立博客
D
DataBreaches.Net
T
The Blog of Author Tim Ferriss
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
MyScale Blog
MyScale Blog
N
Netflix TechBlog - Medium
Microsoft Security Blog
Microsoft Security Blog
GbyAI
GbyAI
P
Proofpoint News Feed
Jina AI
Jina AI
B
Blog RSS Feed
腾讯CDC
阮一峰的网络日志
阮一峰的网络日志
D
Docker

Recent Commits to openclaw:main

test: merge chat side-result checks · openclaw/openclaw@ddd2c2a test: merge cron history checks · openclaw/openclaw@f7eb746 test: merge responsive navigation shell checks · openclaw/openclaw@c2e4b47 docs(changelog): add codex oauth fixes · openclaw/openclaw@628e6cd test: merge navigation routing cases · openclaw/openclaw@5d8cecb Tests: mock channel registry bundled fallback · openclaw/openclaw@2b08233 Secrets: avoid broad web search discovery for single plugin config · openclaw/openclaw@a464f59 test: merge config view browser checks · openclaw/openclaw@20cf511 fix(status): align oauth health with runtime · openclaw/openclaw@eed7116 feat: add macOS screen snapshots for monitor preview (#67954) thanks … · openclaw/openclaw@f377db1 fix: report shared auth scopes in hello-ok (#67810) thanks @BunsDev · openclaw/openclaw@0b6c39b Auto-reply: avoid eager bundled route fallback · openclaw/openclaw@3ea1bf4 Tests: narrow session binding contract setup · openclaw/openclaw@54e4e16 fix(macOS): enable undo/redo in webchat composer text input (#34962) · openclaw/openclaw@00951dc Tests: speed up channel setup promotion · openclaw/openclaw@82b529a Docs: refresh agent instructions · openclaw/openclaw@5775fe2 fix(auth): serialize OAuth refresh across agents to fix #26322 (#67876) · openclaw/openclaw@8e79080 test: allow ollama public surface boundary test · openclaw/openclaw@7d4f1a6 Docs: add test performance guardrails · openclaw/openclaw@89706d3 Tests: restore context-engine usage proof · openclaw/openclaw@e4c4f95 Tests: slim context engine runtime coverage · openclaw/openclaw@74c198f ci: retry failed custom checkouts · openclaw/openclaw@0ee5baf test: trim duplicate provider auth onboarding cases · openclaw/openclaw@1ffc02e matrix: fix sessions_spawn --thread subagent session spawning (#67643) · openclaw/openclaw@1ce2596 test: reduce auth choice fixture churn · openclaw/openclaw@857b9cd test: mock health status config boundaries · openclaw/openclaw@9d5ab4a test: mock onboard config io boundary · openclaw/openclaw@299694d test: mock legacy state plugin boundaries · openclaw/openclaw@2713089 test: mock channel install boundaries · openclaw/openclaw@b945248 test: mock doctor preview channel boundaries · openclaw/openclaw@b1a3ad4
fix: unblock ios release upload metadata · openclaw/openc...
joshavant · 2026-06-23 · via Recent Commits to openclaw:main

@@ -15,13 +15,12 @@

1515

import Foundation

1616

import XCTest

171718-

var deviceLanguage = ""

19-

var locale = ""

20-18+

@MainActor

2119

func setupSnapshot(_ app: XCUIApplication, waitForAnimations: Bool = true) {

2220

Snapshot.setupSnapshot(app, waitForAnimations: waitForAnimations)

2321

}

242223+

@MainActor

2524

func snapshot(_ name: String, waitForLoadingIndicator: Bool) {

2625

if waitForLoadingIndicator {

2726

Snapshot.snapshot(name)

@@ -33,6 +32,7 @@ func snapshot(_ name: String, waitForLoadingIndicator: Bool) {

3332

/// - Parameters:

3433

/// - name: The name of the snapshot

3534

/// - timeout: Amount of seconds to wait until the network loading indicator disappears. Pass `0` if you don't want to wait.

35+

@MainActor

3636

func snapshot(_ name: String, timeWaitingForIdle timeout: TimeInterval = 20) {

3737

Snapshot.snapshot(name, timeWaitingForIdle: timeout)

3838

}

@@ -52,13 +52,16 @@ enum SnapshotError: Error, CustomDebugStringConvertible {

5252

}

53535454

@objcMembers

55+

@MainActor

5556

open class Snapshot: NSObject {

5657

static var app: XCUIApplication?

5758

static var waitForAnimations = true

5859

static var cacheDirectory: URL?

5960

static var screenshotsDirectory: URL? {

6061

return cacheDirectory?.appendingPathComponent("screenshots", isDirectory: true)

6162

}

63+

static var deviceLanguage = ""

64+

static var currentLocale = ""

62656366

open class func setupSnapshot(_ app: XCUIApplication, waitForAnimations: Bool = true) {

6467

@@ -103,17 +106,17 @@ open class Snapshot: NSObject {

103106104107

do {

105108

let trimCharacterSet = CharacterSet.whitespacesAndNewlines

106-

locale = try String(contentsOf: path, encoding: .utf8).trimmingCharacters(in: trimCharacterSet)

109+

currentLocale = try String(contentsOf: path, encoding: .utf8).trimmingCharacters(in: trimCharacterSet)

107110

} catch {

108111

NSLog("Couldn't detect/set locale...")

109112

}

110113111-

if locale.isEmpty && !deviceLanguage.isEmpty {

112-

locale = Locale(identifier: deviceLanguage).identifier

114+

if currentLocale.isEmpty && !deviceLanguage.isEmpty {

115+

currentLocale = Locale(identifier: deviceLanguage).identifier

113116

}

114117115-

if !locale.isEmpty {

116-

app.launchArguments += ["-AppleLocale", "\"\(locale)\""]

118+

if !currentLocale.isEmpty {

119+

app.launchArguments += ["-AppleLocale", "\"\(currentLocale)\""]

117120

}

118121

}

119122

@@ -165,7 +168,7 @@ open class Snapshot: NSObject {

165168

}

166169167170

let screenshot = XCUIScreen.main.screenshot()

168-

#if os(iOS)

171+

#if os(iOS) && !targetEnvironment(macCatalyst)

169172

let image = XCUIDevice.shared.orientation.isLandscape ? fixLandscapeOrientation(image: screenshot.image) : screenshot.image

170173

#else

171174

let image = screenshot.image

@@ -181,7 +184,7 @@ open class Snapshot: NSObject {

181184182185

let path = screenshotsDir.appendingPathComponent("\(simulator)-\(name).png")

183186

#if swift(<5.0)

184-

UIImagePNGRepresentation(image)?.write(to: path, options: .atomic)

187+

try UIImagePNGRepresentation(image)?.write(to: path, options: .atomic)

185188

#else

186189

try image.pngData()?.write(to: path, options: .atomic)

187190

#endif

@@ -281,6 +284,7 @@ private extension XCUIElementQuery {

281284

return self.containing(isNetworkLoadingIndicator)

282285

}

283286287+

@MainActor

284288

var deviceStatusBars: XCUIElementQuery {

285289

guard let app = Snapshot.app else {

286290

fatalError("XCUIApplication is not set. Please call setupSnapshot(app) before snapshot().")

@@ -306,4 +310,4 @@ private extension CGFloat {

306310307311

// Please don't remove the lines below

308312

// They are used to detect outdated configuration files

309-

// SnapshotHelperVersion [1.27]

313+

// SnapshotHelperVersion [1.30]