✨ Harden Swift SDK package#252
Merged
Merged
Conversation
Split XCTest helpers into their own product so native app targets can depend on the core client without test APIs. Align Swift screenshot payloads with the server comparison contract and document the SPM integration path.
This comment has been minimized.
This comment has been minimized.
Run the Swift client against a real local Vizzly TDD server in an isolated temp workspace. Cover server discovery, PNG upload, new baseline creation, and repeated screenshot matching.
This comment has been minimized.
This comment has been minimized.
Adds the Swift package to the shared SDK E2E GitHub Actions workflow with both local TDD and cloud-mode coverage, using the Swift-specific project token secret.
This comment has been minimized.
This comment has been minimized.
Keeps the Swift E2E tests strict for TDD comparison metadata while accepting the leaner successful upload response returned by cloud mode.
Vizzly - Visual Test Results
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
The Swift SDK was doing the right high-level job, but its package shape made native app integration heavier than it needed to be. The core
Vizzlyproduct pulled in XCTest helpers, and Swift comparison options were sent at the top level even though the TDD server reads per-screenshot comparison settings fromproperties.We also did not have the same real E2E confidence for Swift that the other SDKs have. A green unit test could still miss server discovery, actual PNG upload, local baseline creation, repeated screenshot matching, or the cloud CI path.
What changed
VizzlyXCTestproduct while keeping the coreVizzlyclient lightweight.threshold,minClusterSize, andfullPageflow throughproperties, matching the server contract.VizzlyE2ETests, which upload real PNG bytes throughVizzlyClientagainst a real local TDD server.npm run test:swift:e2e, which builds the CLI, starts an isolated TDD run in a temp directory, and runs the Swift E2E suite..github/workflows/sdk-e2e.ymlwith both TDD-mode and cloud-mode runs.VIZZLY_SWIFT_CLIENT_TOKEN, matching the per-SDK token pattern used by the other SDKs.Validation
swift testnpm run test:swift:e2eswift build --sdk /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator26.5.sdk --triple arm64-apple-ios13.0-simulatorswift package describe --type jsongit diff --checkruby -e 'require "yaml"; YAML.load_file(".github/workflows/sdk-e2e.yml"); puts "ok"'VIZZLY_SWIFT_CLIENT_TOKENexists in repo Actions secrets.