Skip to content

Commit b6382aa

Browse files
pftgclaude
andcommitted
fix: correct crop/skip_area YARD docs to edge coordinates
DSL docs said [x, y, width, height] but AreaCalculator uses Region.from_edge_coordinates which takes [left, top, right, bottom]. Fixed to match the actual implementation. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent b49d0b3 commit b6382aa

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

.github/actions/upload-screenshots/action.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,15 +43,15 @@ runs:
4343
- name: Prepare HTML report for inline preview
4444
if: steps.check-report.outputs.exists == 'true'
4545
shell: bash
46-
run: cp "${{ inputs.report-path }}/index.html" "${{ inputs.report-path }}/${{ inputs.name }}-screenshot-report.html"
46+
run: cp "${{ inputs.report-path }}/index.html" "${{ inputs.report-path }}/${{ inputs.name }}-snap_diff-report.html"
4747

4848
- name: Upload HTML report (inline preview)
4949
if: steps.check-report.outputs.exists == 'true'
5050
uses: actions/upload-artifact@v7
5151
with:
52-
name: ${{ inputs.name }}-report
52+
name: ${{ inputs.name }}-snap_diff-report
5353
retention-days: ${{ inputs.retention-days }}
54-
path: ${{ inputs.report-path }}/${{ inputs.name }}-screenshot-report.html
54+
path: ${{ inputs.report-path }}/${{ inputs.name }}-snap_diff-report.html
5555
archive: false
5656

5757
- name: Upload HTML report with images (full download)

lib/capybara_screenshot_diff/dsl.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,8 @@ def screenshot_group(name)
3838
# @param options [Hash] Additional options for taking the screenshot and comparison.
3939
# @option options [Boolean] :delayed (Capybara::Screenshot::Diff.delayed)
4040
# Whether to validate the screenshot immediately or delay validation.
41-
# @option options [Array<Integer>] :crop [x, y, width, height] Area to crop the screenshot to.
42-
# @option options [Array<Array<Integer>>] :skip_area Array of [x, y, width, height] areas to ignore.
41+
# @option options [Array<Integer>] :crop [left, top, right, bottom] Edge coordinates to crop the screenshot to.
42+
# @option options [Array<Array<Integer>>] :skip_area Array of [left, top, right, bottom] edge coordinates to ignore.
4343
# @option options [Numeric] :tolerance (0.001 for :vips driver) Color tolerance for comparison.
4444
# @option options [Numeric] :color_distance_limit Maximum allowed color distance between pixels.
4545
# @option options [Numeric] :shift_distance_limit Maximum allowed shift distance for pixels.

0 commit comments

Comments
 (0)