feat(advanced): PER-8195 — advanced example for @percy/selenium-webdriver#17
Draft
Shivanshu-07 wants to merge 2 commits into
Draft
feat(advanced): PER-8195 — advanced example for @percy/selenium-webdriver#17Shivanshu-07 wants to merge 2 commits into
Shivanshu-07 wants to merge 2 commits into
Conversation
Phase 1 stub for PER-8195 (advanced example for every Percy SDK sample repo). matrix.yml populated from SDK API research, README placeholder notes test code is TO BE WRITTEN. Carries the Phase 0 pattern: per-SDK matrix.yml is the canonical machine-readable source of truth; advanced/README.md table + the aggregate docs/advanced-example-feature-matrix.md grid are generated downstream. No test code committed — needs per-SDK smoke-test validation against the matching SDK toolchain (next step). Most rows currently 'Planned'; some 'Covered' rows reflect behavior automatic via the basic SDK usage (cross-origin iframe handling, cookie capture, environmentInfo). See parent: docs/plans/2026-05-19-001-feat-per-8195-advanced-sdk-examples-plan.md
…lenium-webdriver Adds advanced/ exercising the full applicable @percy/selenium-webdriver SDK feature surface. 14 mocha it() blocks in tests/todomvc_advanced.spec.js, one per matrix row: widths, minHeight, percyCSS, enableJavaScript, responsiveSnapshotCapture, readiness preset, labels, testCase, devicePixelRatio, regions, browsers, sync, ignoreCanvasSerializationErrors, ignoreStyleSheetSerializationErrors. scope, domTransformation, discovery marked N/A — not exposed in @percy/selenium-webdriver 2.2.6 SnapshotOptions surface. CI advanced job uses firefox + geckodriver headless + `percy exec --testing` and asserts via the shared helper. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Comment on lines
+31
to
+69
| runs-on: ubuntu-latest | ||
| timeout-minutes: 10 | ||
| defaults: | ||
| run: | ||
| working-directory: advanced | ||
| steps: | ||
| - uses: actions/checkout@v3 | ||
| - uses: actions/setup-node@v3 | ||
| with: | ||
| node-version: 18 | ||
| - name: Install jq + yq | ||
| run: | | ||
| sudo apt-get update -qq | ||
| sudo apt-get install -y -qq jq | ||
| sudo wget -qO /usr/local/bin/yq https://github.com/mikefarah/yq/releases/latest/download/yq_linux_amd64 | ||
| sudo chmod +x /usr/local/bin/yq | ||
| - name: Install advanced/ dependencies | ||
| run: npm install | ||
| - name: Fetch shared advanced-snapshot assertion helper | ||
| # TODO(PER-8195 D8): pin to a tagged commit once percy-public-repos-parent | ||
| # publishes the scripts/ dir to a stable URL or to an npm package. | ||
| run: | | ||
| curl -fsSL -o /tmp/assert-advanced-snapshots.sh \ | ||
| https://raw.githubusercontent.com/percy/percy-public-repos-parent/main/scripts/assert-advanced-snapshots.sh | ||
| chmod +x /tmp/assert-advanced-snapshots.sh | ||
| - name: Run mocha advanced tests (--testing) + capture /test/requests | ||
| env: | ||
| PERCY_TOKEN: fake_token | ||
| run: | | ||
| npx --no-install percy exec --testing -- bash -c ' | ||
| npx --no-install mocha tests/ --exit | ||
| ec=$? | ||
| curl -fsS http://localhost:5338/test/requests > advanced-requests.json || true | ||
| exit $ec | ||
| ' | ||
| - name: Assert matrix-row coverage | ||
| env: | ||
| PERCY_REQUESTS_FILE: ${{ github.workspace }}/advanced/advanced-requests.json | ||
| run: /tmp/assert-advanced-snapshots.sh ./matrix.yml |
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
Adds an
advanced/example covering the full applicable@percy/selenium-webdriverSDK feature surface. 14 mochait()blocks intests/todomvc_advanced.spec.js: widths, minHeight, percyCSS, enableJavaScript, responsiveSnapshotCapture, readiness preset, labels, testCase, devicePixelRatio, regions, browsers, sync, ignoreCanvasSerializationErrors, ignoreStyleSheetSerializationErrors.scope,domTransformation,discoverymarkedN/Ain matrix.yml — not exposed in@percy/selenium-webdriver 2.2.6SnapshotOptions surface.Issue: PER-8195.
CI shape
percy exec --testing -- mocha tests/wrapped to capture/test/requests@percy/clipinned to^1.31.13Open question (D8)
Same shared-helper hosting question as the other Phase 1 PRs.
Test plan
advancedCI job to run green.🤖 Generated with Claude Code