From eb4db20277ba1c980da00341f2f56232d6a36cd8 Mon Sep 17 00:00:00 2001 From: "Marc @keasbeexd" <234014364+keasbeexd@users.noreply.github.com> Date: Fri, 13 Nov 2026 14:35:18 -0500 Subject: [PATCH 1/2] Screenshots: capture the tip jar with a StoreKit test configuration The App Review screenshot for the three tips. Co-Authored-By: Claude Opus 5.5 --- config/project.yml | 3 + .../ScreenshotTests.swift | 20 ++++++ tests/CloudrollScreenshots/Tips.storekit | 63 +++++++++++++++++++ 3 files changed, 86 insertions(+) create mode 100644 tests/CloudrollScreenshots/Tips.storekit diff --git a/config/project.yml b/config/project.yml index 213277a..593efa9 100644 --- a/config/project.yml +++ b/config/project.yml @@ -94,6 +94,9 @@ targets: platform: iOS sources: - path: ../tests/CloudrollScreenshots + excludes: ["*.storekit"] + - path: ../tests/CloudrollScreenshots/Tips.storekit + buildPhase: resources dependencies: - target: Cloudroll settings: diff --git a/tests/CloudrollScreenshots/ScreenshotTests.swift b/tests/CloudrollScreenshots/ScreenshotTests.swift index 635b007..602fd06 100644 --- a/tests/CloudrollScreenshots/ScreenshotTests.swift +++ b/tests/CloudrollScreenshots/ScreenshotTests.swift @@ -1,3 +1,4 @@ +import StoreKitTest import XCTest /// Captures the App Store screenshots against the App Review demo account. @@ -14,6 +15,9 @@ final class ScreenshotTests: XCTestCase { private let springboard = XCUIApplication(bundleIdentifier: "com.apple.springboard") private var outputDir: URL! private var problems: [String] = [] + /// Serves the three tips from Tips.storekit, so the tip jar shows its prices + /// (the App Review screenshot for the in-app purchases). + private var storeKit: SKTestSession? override func setUpWithError() throws { continueAfterFailure = true @@ -30,6 +34,14 @@ final class ScreenshotTests: XCTestCase { } func testCaptureScreenshots() throws { + do { + let session = try SKTestSession(configurationFileNamed: "Tips") + session.resetToDefaultState() + session.disableDialogs = true + storeKit = session + } catch { + problems.append("StoreKit test session: \(error)") + } app.launch() guard waitForTimeline() else { save("00-not-loaded") @@ -86,6 +98,14 @@ final class ScreenshotTests: XCTestCase { if tap(app.buttons.matching(NSPredicate(format: "label CONTAINS %@", "App Icon")).firstMatch, "App Icon") { pause(3) save("05-app-icons") + app.navigationBars.buttons.firstMatch.tap() + pause(1) + } + if tap(app.buttons.matching(NSPredicate(format: "label CONTAINS %@", "Support Cloudroll")).firstMatch, "Support Cloudroll") { + pause(6) // products load + save("06-tip-jar") + app.navigationBars.buttons.firstMatch.tap() + pause(1) } // The viewer logs why a Live Photo's motion didn't load. if liveFailed { diff --git a/tests/CloudrollScreenshots/Tips.storekit b/tests/CloudrollScreenshots/Tips.storekit new file mode 100644 index 0000000..52c12be --- /dev/null +++ b/tests/CloudrollScreenshots/Tips.storekit @@ -0,0 +1,63 @@ +{ + "identifier" : "6E1B5A7C", + "nonRenewingSubscriptions" : [ + + ], + "products" : [ + { + "displayPrice" : "1.99", + "familyShareable" : false, + "internalID" : "6834540159", + "localizations" : [ + { + "description" : "A tip for Cloudroll. It doesn't unlock anything.", + "displayName" : "Small tip", + "locale" : "en_US" + } + ], + "productID" : "io.github.keasbeexd.cloudroll.tip.small", + "referenceName" : "Small tip", + "type" : "Consumable" + }, + { + "displayPrice" : "4.99", + "familyShareable" : false, + "internalID" : "6834540708", + "localizations" : [ + { + "description" : "A tip for Cloudroll. It doesn't unlock anything.", + "displayName" : "Medium tip", + "locale" : "en_US" + } + ], + "productID" : "io.github.keasbeexd.cloudroll.tip.medium", + "referenceName" : "Medium tip", + "type" : "Consumable" + }, + { + "displayPrice" : "9.99", + "familyShareable" : false, + "internalID" : "6834541367", + "localizations" : [ + { + "description" : "A tip for Cloudroll. It doesn't unlock anything.", + "displayName" : "Large tip", + "locale" : "en_US" + } + ], + "productID" : "io.github.keasbeexd.cloudroll.tip.large", + "referenceName" : "Large tip", + "type" : "Consumable" + } + ], + "settings" : { + "_storefront" : "USA" + }, + "subscriptionGroups" : [ + + ], + "version" : { + "major" : 3, + "minor" : 0 + } +} From baa992a6f804779830eaa95f51b0da8c092dd43d Mon Sep 17 00:00:00 2001 From: "Marc @keasbeexd" <234014364+keasbeexd@users.noreply.github.com> Date: Fri, 13 Nov 2026 14:41:08 -0500 Subject: [PATCH 2/2] Screenshots: don't fail when picsum.photos is down Co-Authored-By: Claude Opus 5.5 --- .github/workflows/screenshots.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/screenshots.yml b/.github/workflows/screenshots.yml index d330394..1e520cc 100644 --- a/.github/workflows/screenshots.yml +++ b/.github/workflows/screenshots.yml @@ -57,11 +57,15 @@ jobs: run: | # Unsplash photos via picsum.photos, free to use. They're dated today, so they # sit at the top of the timeline above the demo account's server photos. + # Optional: if picsum.photos is down, the timeline just shows server photos. mkdir -p phone-photos for id in 1018 1043 1050; do - curl -sfL -o "phone-photos/phone-$id.jpg" "https://picsum.photos/id/$id/1600/1200.jpg" + curl -sfL --retry 3 -m 30 -o "phone-photos/phone-$id.jpg" "https://picsum.photos/id/$id/1600/1200.jpg" \ + || echo "Couldn't download photo $id" done - xcrun simctl addmedia "$DEVICE_ID" phone-photos/*.jpg + if ls phone-photos/*.jpg >/dev/null 2>&1; then + xcrun simctl addmedia "$DEVICE_ID" phone-photos/*.jpg + fi # Signed ad hoc ("Sign to Run Locally") rather than unsigned: the simulator only # grants Keychain access to a signed app. - name: Capture