Skip to content

feat(advanced): PER-8195 — advanced example for percy-selenium (Ruby gem)#7

Draft
Shivanshu-07 wants to merge 2 commits into
masterfrom
per-8195-phase-1-ruby-selenium
Draft

feat(advanced): PER-8195 — advanced example for percy-selenium (Ruby gem)#7
Shivanshu-07 wants to merge 2 commits into
masterfrom
per-8195-phase-1-ruby-selenium

Conversation

@Shivanshu-07
Copy link
Copy Markdown

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

Summary

Adds an advanced/ example covering the full applicable percy-selenium Ruby gem feature surface. 12 RSpec examples in spec/todomvc_advanced_spec.rb, one per matrix row: widths, min_height, enable_javascript, responsive_snapshot_capture, readiness, labels, test_case, device_pixel_ratio, browsers, regions, sync, plus a snake_case + camelCase dual-naming demo.

scope, dom_transformation, per-snapshot discovery marked N/A — not exposed in percy-selenium 1.1.2 options hash.

Issue: PER-8195.

CI shape

  • ruby 3.4 (ruby/setup-ruby@v1) + firefox + selenium-webdriver
  • WEBrick-based server (mirrors basic example)
  • make test-advanced-ci runs bundle exec rspec spec/ 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
…enium (Ruby gem)

Adds advanced/ exercising the full applicable Ruby SDK feature surface.
12 RSpec examples in spec/todomvc_advanced_spec.rb, one per matrix row:
widths, min_height, enable_javascript, responsive_snapshot_capture,
readiness, labels, test_case, device_pixel_ratio, browsers, regions,
sync, snake_case + camelCase dual-naming demo.

scope, dom_transformation, discovery marked N/A — not exposed in
percy-selenium ruby 1.1.2 options hash.

CI advanced job uses ruby/setup-ruby@v1 (3.4) + bundle exec rspec
wrapped in `percy exec --testing` and asserts via the shared helper.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Comment on lines +37 to +73
runs-on: ubuntu-latest
timeout-minutes: 15
defaults:
run:
working-directory: advanced
steps:
- uses: actions/checkout@v4
- uses: ruby/setup-ruby@v1
with:
ruby-version: 3.4
bundler-cache: false
- uses: actions/setup-node@v4
with:
node-version: 20
- 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: make 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 rspec advanced (--testing) + capture /test/requests
env:
PERCY_TOKEN: fake_token
run: make test-advanced-ci
- name: Assert matrix-row coverage
env:
PERCY_REQUESTS_FILE: ${{ github.workspace }}/advanced/advanced-requests.json
run: /tmp/assert-advanced-snapshots.sh ./matrix.yml
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.

2 participants