ASO tooling: compositores de marketing + captura UITest
- testCaptureScreenshots en PortfolioJournalUITests: captura tabs con datos demo, idioma vía SCREENSHOT_LANG (usa el modo --screenshots del commit siguiente) - Scripts/aso: compositores de screenshots de App Store (frame_layout con perspectiva 3D + panorama multi-panel, variantes premium/tilt), layouts JSON iPhone/iPad, y asc.py (helper API App Store Connect para estado/screenshots) - Fix test roto pre-existente: OnboardingQuickStartView.appSettingsURL restaurado Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015qUZrBusG82T37R7PeokqJ
This commit is contained in:
@@ -116,4 +116,47 @@ final class PortfolioJournalUITests: XCTestCase {
|
||||
dashboardTab.tap()
|
||||
}
|
||||
}
|
||||
|
||||
// MARK: - App Store Screenshot Capture
|
||||
|
||||
/// Captures full-screen screenshots of the main tabs with demo data for App Store
|
||||
/// marketing. Launches the app in `--screenshots` mode (onboarding/lock skipped,
|
||||
/// SampleDataService seeded). Language can be driven via the SCREENSHOT_LANG env var
|
||||
/// (e.g. "es", "de"). Screenshots are attached to the test result and extracted from
|
||||
/// the .xcresult afterwards by the framing pipeline.
|
||||
func testCaptureScreenshots() throws {
|
||||
let capture = XCUIApplication()
|
||||
capture.launchArguments = ["--screenshots"]
|
||||
if let lang = ProcessInfo.processInfo.environment["SCREENSHOT_LANG"], !lang.isEmpty {
|
||||
capture.launchArguments += ["-AppleLanguages", "(\(lang))", "-AppleLocale", lang]
|
||||
}
|
||||
capture.launch()
|
||||
|
||||
let tabBar = capture.tabBars.firstMatch
|
||||
guard tabBar.waitForExistence(timeout: 20) else {
|
||||
XCTFail("Tab bar not found in screenshot mode")
|
||||
return
|
||||
}
|
||||
// Let demo data seed and charts render.
|
||||
Thread.sleep(forTimeInterval: 3.0)
|
||||
|
||||
func snap(_ name: String) {
|
||||
let shot = XCTAttachment(screenshot: capture.screenshot())
|
||||
shot.name = name
|
||||
shot.lifetime = .keepAlways
|
||||
add(shot)
|
||||
}
|
||||
|
||||
// Dashboard is already selected on launch.
|
||||
snap("01_Dashboard")
|
||||
|
||||
for (index, tabName) in ["Sources", "Goals", "Journal", "Settings"].enumerated() {
|
||||
let tab = tabBar.buttons[tabName]
|
||||
if tab.waitForExistence(timeout: 5), tab.isHittable {
|
||||
tab.tap()
|
||||
Thread.sleep(forTimeInterval: 1.5)
|
||||
snap(String(format: "%02d_%@", index + 2, tabName))
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user