Add support for pseudoClassEnabledElements in percySnapshot options#1133
Add support for pseudoClassEnabledElements in percySnapshot options#1133Manoj-Katta wants to merge 6 commits intomasterfrom
Conversation
There was a problem hiding this comment.
Pull request overview
Adds support for passing pseudoClassEnabledElements through percySnapshot, with a fallback to global Percy snapshot config, to enable capturing pseudo-class states for specific elements in Ember app snapshots.
Changes:
- Resolve
pseudoClassEnabledElementsfrom per-callpercySnapshotoptions with fallback toutils.percy.config.snapshot. - Include the resolved
pseudoClassEnabledElementsin snapshot options sent with the snapshot request. - Add acceptance tests covering config fallback behavior and per-call precedence.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| addon-test-support/@percy/ember/index.js | Adds resolution logic for pseudoClassEnabledElements from options/config and forwards it with snapshot options. |
| tests/acceptance/index-test.js | Adds acceptance tests validating config fallback and per-call precedence for pseudoClassEnabledElements. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Adds support for passing pseudoClassEnabledElements through percySnapshot, with a precedence order of explicit per-call options over global Percy config, and verifies the behavior via acceptance tests.
Changes:
- Resolve
pseudoClassEnabledElementsfrompercySnapshotoptions or fall back toutils.percy.config.snapshot.pseudoClassEnabledElements. - Forward the resolved
pseudoClassEnabledElementsin snapshot options/payload. - Add acceptance tests covering config fallback and per-call precedence.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| tests/acceptance/index-test.js | Adds tests asserting config fallback + per-call override precedence for pseudoClassEnabledElements. |
| addon-test-support/@percy/ember/index.js | Implements option resolution and injection of pseudoClassEnabledElements into snapshot options. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 2 out of 2 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
@Manoj-Katta Can you also attach some screenshots to show, the dev testing done
@rahulXbrowserstack Since I can't attach the staging builds I have written the tests that I have done in the jira ticket itself
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Description
This PR adds support for the
pseudoClassEnabledElementsoption inpercySnapshotto allow capturing snapshots with pseudo-class states enabled on specific elements.Changes
pseudoClassEnabledElementsoption support inpercySnapshotfunctionpercySnapshotor configured globally via Percy configutils.percy.config.snapshot.pseudoClassEnabledElementswhen not explicitly providedImplementation Details
The implementation follows a two-tier configuration approach:
pseudoClassEnabledElementsis passed in theoptionsparameterTesting
Added comprehensive test coverage:
pseudoClassEnabledElementsis used when option is not passedpseudoClassEnabledElementsoption takes precedence over global configJira: https://browserstack.atlassian.net/browse/PPLT-5015