Skip to content

feat(advanced): PER-8195 — advanced example for io.percy:percy-java-selenium#153

Merged
Shivanshu-07 merged 6 commits into
masterfrom
per-8195-phase-1-java-selenium
Jun 12, 2026
Merged

feat(advanced): PER-8195 — advanced example for io.percy:percy-java-selenium#153
Shivanshu-07 merged 6 commits into
masterfrom
per-8195-phase-1-java-selenium

Conversation

@Shivanshu-07

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

Copy link
Copy Markdown
Contributor

Summary

Adds an advanced/ example covering the full applicable io.percy:percy-java-selenium SDK feature surface. 11 JUnit 5 @Test methods in AdvancedTest.java exercising BOTH:

  • The typed-overload signatures (snapshot(name, widths, minHeight, enableJavaScript, percyCSS, scope)).
  • The Map<String, Object> options overload (responsive, readiness, labels, testCase, devicePixelRatio, browsers, regions, sync).

discovery marked N/A — per-build only in this SDK.

Issue: PER-8195.

CI shape

  • java 17 (temurin) + chrome headless
  • Own advanced/pom.xml (separate Maven module). AdvancedTest.java inlines a minimal HttpServer so it doesn't need the basic example's App.startServer.
  • make test-advanced-ci runs mvn test wrapped in percy exec --testing and captures /test/requests.
  • shared assertion helper (D8 placeholder URL)
  • @percy/cli pinned to ^1.31.13 via npm install --no-save

Open question (D8)

Same shared-helper hosting question.

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
…percy-java-selenium

Adds advanced/ exercising the full applicable Java SDK feature surface.
11 JUnit 5 @test methods in AdvancedTest.java exercising BOTH the typed
overloads (snapshot(name, widths, minHeight, enableJavaScript, percyCSS,
scope)) AND the Map<String, Object> options overload (responsive,
readiness, labels, testCase, devicePixelRatio, browsers, regions, sync).

discovery marked N/A — per-build only in this SDK.

CI advanced job uses chrome headless + mvn test wrapped in `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
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
…rcy (PER-8195)

The advanced Makefile installs @percy/cli with `npm install --no-save` and then
runs `$(NPM)/percy` (= advanced/node_modules/.bin/percy). With no
advanced/package.json, npm walked up to the repo-root package.json and
installed percy into root/node_modules, so advanced/node_modules/.bin/percy was
missing and `make test-advanced` failed with "node_modules/.bin/percy: No such
file or directory" (exit 127). A minimal advanced/package.json anchors the
install to advanced/.

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

The advanced test's HTTP server rooted at ../ (repo root), which has no
index.html, so every test errored in seed() with NoSuchElement for .new-todo
(11/11). The TodoMVC frontend lives in src/main/resources — serve that.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Resolves CodeQL "Workflow does not contain permissions" on test.yml.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@Shivanshu-07 Shivanshu-07 merged commit d55f405 into master Jun 12, 2026
12 checks passed
@Shivanshu-07 Shivanshu-07 deleted the per-8195-phase-1-java-selenium branch June 12, 2026 04:41
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.

4 participants