Skip to content

Replace RevenueCatUITestsDev with PaywallScreenshotTests Tuist project#6744

Merged
facumenzella merged 16 commits into
mainfrom
worktree-optimized-swinging-journal
May 8, 2026
Merged

Replace RevenueCatUITestsDev with PaywallScreenshotTests Tuist project#6744
facumenzella merged 16 commits into
mainfrom
worktree-optimized-swinging-journal

Conversation

@facumenzella

@facumenzella facumenzella commented May 7, 2026

Copy link
Copy Markdown
Member

Summary

  • Introduces PaywallScreenshotTests as a dedicated Tuist project to replace the manually maintained RevenueCatUITestsDev scheme in RevenueCat.xcodeproj
  • The new name clearly communicates the purpose: rendering paywall templates and capturing screenshots for visual validation
  • Scoped to only the source files needed for screenshot generation (vs. the old target which mirrored all of RevenueCatUITests)
  • Gated behind TUIST_INCLUDE_TEST_DEPENDENCIES, consistent with other test projects
  • References UnitTestsHostApp from RevenueCatTests via a cross-project Tuist dependency
  • Updates the Paywall-Screenshots.xctestplan to reference the Tuist-generated project GUIDs
  • Updates the record_paywall_screenshots Fastlane lane to use RevenueCat-Tuist.xcworkspace
  • Adds tuist install + generate (with TUIST_INCLUDE_TEST_DEPENDENCIES=true) to the CircleCI screenshot job
  • Fully removes RevenueCatUITestsDev target and scheme from RevenueCat.xcodeproj

Test plan

🤖 Generated with Claude Code


Note

Medium Risk
Touches CI/Fastlane test execution and Xcode project configuration for screenshot validation; misconfiguration could break screenshot generation or CI jobs, but no production runtime code paths change.

Overview
Moves paywall screenshot rendering/validation off the manually maintained RevenueCatUITestsDev Xcode target and onto a new Tuist project/scheme, PaywallScreenshotTests, with a slimmed set of sources/resources needed for screenshot capture.

Updates automation to use the Tuist-generated workspace: record_paywall_screenshots now runs PaywallScreenshotTests in RevenueCat-Tuist.xcworkspace, the Paywall-Screenshots.xctestplan points at the new host app/test target IDs, and CircleCI generates the Tuist workspace with test dependencies enabled for the screenshot job.

Cleans up RevenueCat.xcodeproj by removing the RevenueCatUITestsDev target/scheme and related embedded frameworks/resources, and extends tuist-generate-workspace to optionally include test/dev dependencies via a new parameter.

Reviewed by Cursor Bugbot for commit 7ea0b68. Bugbot is set up for automated code reviews on this repo. Configure here.

facumenzella and others added 4 commits May 7, 2026 10:04
Replaces the manually maintained RevenueCatUITestsDev scheme in
RevenueCat.xcodeproj with a self-contained Tuist project whose name
clearly communicates its purpose: rendering paywall templates and
capturing screenshots for visual validation.

The new project is gated behind TUIST_INCLUDE_TEST_DEPENDENCIES and
references UnitTestsHostApp from RevenueCatTests via a cross-project
dependency, keeping it self-contained without duplicating infrastructure.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
The screenshot job now uses RevenueCat-Tuist.xcworkspace instead of the
manually maintained RevenueCat.xcworkspace, so it needs tuist install +
generate before running tests. TUIST_INCLUDE_TEST_DEPENDENCIES=true is
required to include the PaywallScreenshotTests project.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Now superseded by the PaywallScreenshotTests Tuist project.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@facumenzella

Copy link
Copy Markdown
Member Author

heads up @ajpallares I am exploring removing this once and for all 🤓

Tuist validates folder reference paths at generate time. Running tuist
generate before the fetch meant paywall-preview-resources didn't exist
yet, so it was silently dropped from the bundle and the screenshot tests
failed with "Could not locate paywall-preview-resources".

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@facumenzella

facumenzella commented May 7, 2026

Copy link
Copy Markdown
Member Author

@facumenzella facumenzella marked this pull request as ready for review May 7, 2026 12:45
@facumenzella facumenzella requested review from a team as code owners May 7, 2026 12:45
facumenzella and others added 4 commits May 7, 2026 14:45
The screenshot tests only run on iOS simulator and Mac Catalyst —
there is no mac-native platform in the Fastfile. Including .mac triggered
a native macOS build of UnitTestsHostApp (deployment target 10.15) which
fails because @main/Scene require macOS 11.0+. Drop .mac and narrow the
deployment target to iOS 15.0 to match what the tests actually need.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Without an explicit macOS deployment target, Tuist leaves
MACOSX_DEPLOYMENT_TARGET unset and Xcode fills it with the current SDK
version (15.5), which is newer than the CI machine (15.3.2). macOS 12.0
is the correct minimum for Mac Catalyst paired with iOS 15.0.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Tuist 4.x rejects multiplatform(macOS:) without .mac in destinations,
and .mac breaks UnitTestsHostApp (macOS 10.15 + @main/Scene = error).
Using .iOS("15.0") alone leaves MACOSX_DEPLOYMENT_TARGET unset, and
Tuist/Xcode fills it with the current SDK version (15.5), which fails
on CI machines running an older macOS. Inject MACOSX_DEPLOYMENT_TARGET
= 12.0 directly as a raw build setting — correct minimum for Catalyst
paired with iOS 15.0, and bypasses Tuist's destination validator.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 4244b89. Configure here.

Comment thread Tests/RevenueCatUITests/TestPlans/Paywall-Screenshots.xctestplan Outdated
Tuist generates xcodeproj files inside Projects/*/  subdirectories,
so bare names like container:RevenueCatTests.xcodeproj cannot be
resolved from the workspace root. Using container: (empty) tells
Xcode to search the entire workspace for the target by its GUID,
which is the pattern used by all other Tuist-aware test plans.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@facumenzella facumenzella requested review from ajpallares May 7, 2026 13:48

@ajpallares ajpallares left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for doing this! It's amazing to be able to get rid of RevenueCatUITestsDev from the main Xcode workspace, which has been a source of build errors for us... Thanks!

I have some small comments though

Comment thread .circleci/default_config.yml Outdated
Comment thread Projects/PaywallScreenshotTests/Project.swift
facumenzella and others added 5 commits May 8, 2026 09:23
…6751)

Adds an `include_test_dependencies` boolean parameter (default: false) to
the shared `tuist-generate-workspace` command, then uses it in the
screenshot job with `query: "PaywallScreenshotTests"` so only that project
is generated.

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
The Paywall-Screenshots.xctestplan references target GUIDs captured
from a full workspace generation. Using query: "PaywallScreenshotTests"
triggers targeted generation, which produces different GUIDs — xcodebuild
builds the scheme successfully but finds no test bundles because the GUID
in the test plan no longer matches the generated project.

Drop the query so tuist generate runs without a filter (full workspace),
matching what passed at pipeline 37463.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@facumenzella facumenzella enabled auto-merge (squash) May 8, 2026 13:02

@ajpallares ajpallares left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Amazing cleanup! 🚀

@facumenzella facumenzella merged commit ffa6c18 into main May 8, 2026
16 of 18 checks passed
@facumenzella facumenzella deleted the worktree-optimized-swinging-journal branch May 8, 2026 15:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants