Skip to content

feat(advanced): PER-8195 — advanced example for @percy/selenium-webdriver#17

Open
Shivanshu-07 wants to merge 8 commits into
masterfrom
per-8195-phase-1-selenium-javascript
Open

feat(advanced): PER-8195 — advanced example for @percy/selenium-webdriver#17
Shivanshu-07 wants to merge 8 commits into
masterfrom
per-8195-phase-1-selenium-javascript

Conversation

@Shivanshu-07

@Shivanshu-07 Shivanshu-07 commented May 21, 2026

Copy link
Copy Markdown

Summary

Adds an advanced/ example covering the full applicable @percy/selenium-webdriver SDK feature surface. 14 mocha it() blocks in tests/todomvc_advanced.spec.js: widths, minHeight, percyCSS, enableJavaScript, responsiveSnapshotCapture, readiness preset, labels, testCase, devicePixelRatio, regions, browsers, sync, ignoreCanvasSerializationErrors, ignoreStyleSheetSerializationErrors.

scope, domTransformation, discovery marked N/A in matrix.yml — not exposed in @percy/selenium-webdriver 2.2.6 SnapshotOptions surface.

Issue: PER-8195.

CI shape

  • firefox + geckodriver headless
  • percy exec --testing -- mocha tests/ wrapped to capture /test/requests
  • shared assertion helper (D8 placeholder URL)
  • @percy/cli pinned to ^1.31.13

Open question (D8)

Same shared-helper hosting question as the other Phase 1 PRs.

Test plan

  • Wait for the advanced CI job to run green.
  • Verify matrix-row coverage assertion exits 0.

🤖 Generated with Claude Code

Shivanshu-07 and others added 2 commits May 20, 2026 10:52
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 thread .github/workflows/test.yml Fixed
@Shivanshu-07 Shivanshu-07 marked this pull request as ready for review May 27, 2026 13:41
@Shivanshu-07 Shivanshu-07 requested a review from a team as a code owner May 27, 2026 13:41
… helper (PER-8195)

The advanced job fetched an assertion helper from
percy/percy-public-repos-parent/main/scripts/ — that repo is private and the
script was never published, so curl -f 404d and failed every advanced run.

Master has no --testing mode / matrix-coverage gate; it just runs the spec
under percy exec with the repo PERCY_TOKEN. Mirror that: run the advanced
suite (which already wraps percy exec) with PERCY_TOKEN, dropping the jq/yq
install, the external curl helper, the --testing /test/requests capture, and
the matrix assertion.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Comment thread .github/workflows/test.yml Fixed
Shivanshu-07 and others added 2 commits June 2, 2026 18:12
… removed in selenium-webdriver 4 (PER-8195)

CI's fresh npm install pulls selenium-webdriver 4.36 where firefox.Options().headless() no longer exists (TypeError: .headless is not a function), so the advanced spec never took a snapshot. Use addArguments('-headless'), matching the modern API.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Resolves CodeQL "Workflow does not contain permissions" finding by adding
a top-level permissions: contents: read block.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…PER-8195)

The advanced suite serves the app from its served root, but index.html
linked node_modules/todomvc-app-css/index.css which only exists after a
repo-root npm install the advanced flow never runs -> CSS 404'd and
snapshots rendered unstyled. Vendor index.css beside index.html and point
the href at css/index.css (matches java-selenium's existing approach).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…rovisioning (PER-8195)

The 45s hook timed out in CI while Selenium Manager provisioned geckodriver.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants