.claude/skills/snapshot-testing-expert/SKILL.md
Expert guidance on snapshot testing with swift-snapshot-testing: writing snapshot tests, configuring strategies, device layouts, recording modes, Xcode Cloud CI compatibility, and reviewing snapshot test code. Use when writing new snapshot tests, adding snapshot coverage to features, debugging snapshot failures, reviewing snapshot test code, or configuring CI for snapshots.
npx skillsauth add adamayoung/popcorn snapshot-testing-expertInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Use this skill for authoritative guidance on snapshot testing in the Popcorn project using Point-Free's swift-snapshot-testing 1.18+. Covers writing snapshot tests with Swift Testing, configuring image strategies, device layouts, recording modes, Xcode Cloud CI compatibility, and reviewing snapshot test code.
@Suite, @Test, import Testing) — never XCTest for snapshot tests.verifySnapshot + Issue.record — not assertSnapshot — to support the snapshotDirectory parameter for Xcode Cloud CI compatibility.snapshotDirectory: Self.snapshotDirectory in every verifySnapshot call — this enables CI resolution from Bundle.module..snapshots(record: .missing) on the @Suite — records only missing snapshots, safe for CI.@MainActor — SwiftUI views require main thread rendering..image(layout: .device(config: .iPhone13Pro)) as the default strategy — consistent rendering across environments.NavigationStack when testing screens that appear within navigation — matches production context.EmptyReducer() for TCA stores in snapshot tests — snapshots capture visual state, not behavior.force_unwrapping rule).references/writing-tests.mdreferences/xcode-cloud.mdreferences/debugging.mdreferences/strategies.mdreferences/xcode-cloud.md — snapshot images must be bundled as .copy resources and resolved from Bundle.module in CI.assertSnapshot instead of verifySnapshot -> assertSnapshot lacks snapshotDirectory parameter — switch to verifySnapshot + Issue.record pattern.timeout parameter if async loading needed..iPhone13Pro), not .sizeThatFits which varies by host.Bundle.module.resourceURL! -> use optional chaining (resourceURL?).Bundle.module -> ensure Package.swift test target declares resources: [.copy("Views/__Snapshots__")].TestPlans/PopcornSnapshotTests.xctestplan.@Suite(.snapshots(record: .missing)) and @MainActor.verifySnapshot with snapshotDirectory: Self.snapshotDirectory, not assertSnapshot.snapshotDirectory computed property exists — returns nil locally, Bundle.module path in CI.resources: [.copy("Views/__Snapshots__")] on the snapshot test target.__Snapshots__/{TestTypeName}/{testName}.1.png.TestPlans/PopcornSnapshotTests.xctestplan.static var (not static let for @Model types).references/writing-tests.md — step-by-step guide to writing snapshot testsreferences/strategies.md — image strategies, device configs, layout optionsreferences/xcode-cloud.md — CI compatibility, Bundle.module, resource bundlingreferences/debugging.md — troubleshooting snapshot failuresdata-ai
Add properties to an existing domain model from TMDb
testing
Run all unit tests
testing
Run UI tests
testing
Run snapshot tests