feat(client): add visual-config support for create-build#2139
Open
shantanuk-browserstack wants to merge 4 commits intomasterfrom
Open
feat(client): add visual-config support for create-build#2139shantanuk-browserstack wants to merge 4 commits intomasterfrom
shantanuk-browserstack wants to merge 4 commits intomasterfrom
Conversation
…test expectations
…to meet 100% threshold
Contributor
There was a problem hiding this comment.
Pull request overview
Adds support in @percy/client for configuring build-level visual comparison behavior via a PERCY_VISUAL_CONFIG env var, including sanitization/validation and payload propagation to the create-build API.
Changes:
- Parse
PERCY_VISUAL_CONFIG, validate supported fields/types/ranges, and warn+strip unknown keys (including nestedintelliIgnorekeys). - Send sanitized
visual-configin the create-build API request attributes. - Add createBuild test coverage for valid propagation, unknown key stripping w/ warnings, and invalid input rejection.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
packages/client/src/client.js |
Implements env parsing/sanitization/validation for PERCY_VISUAL_CONFIG and includes visual-config in create-build payload. |
packages/client/test/client.test.js |
Adds tests for createBuild visual-config propagation, warnings/stripping, and validation error cases. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| 'testhub-build-uuid': this.env.testhubBuildUuid, | ||
| 'testhub-build-run-id': this.env.testhubBuildRunId | ||
| 'testhub-build-run-id': this.env.testhubBuildRunId, | ||
| ...(visualConfig ? { 'visual-config': visualConfig } : {}) |
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.
Summary
PERCY_VISUAL_CONFIGparsing and validation in@percy/clientvisual-configto create-build API payloadintelliIgnorebrowsersvalues before sendingTests
visual-configpayload propagationNotes