Repository navigation
Conversation
…tor handler Add the `padding` option to the Playwright, Puppeteer, Cypress and Vitest references, and document that Playwright's `argosScreenshot` accepts a `Locator` as its handler (ARG-515). Update the Playwright FAQ and the migration guide, which said padding and Locator handlers weren't supported. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
5 of 6 tasks
This branch has not been deployed
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.
Documents ARG-515 (argos-ci/argos-javascript#410): the new
paddingoption for element screenshots in the Playwright, Puppeteer, Cypress and Vitest SDKs, and Playwright'sargosScreenshotnow accepting aLocatoras its first argument.Important
Merge only after the
@argos-ci/*release that includes argos-ci/argos-javascript#410 (ARG-515). The SDK change isn't released yet (npm has playwright 7.8.0, puppeteer 6.2.0, cypress 7.4.0, vitest 0.9.0), and this PR removes statements that are true until then: the Playwright FAQ says there is no padding option, and the migration guide says the first argument can't be a locator.Changes
handlercan be aLocator:argosScreenshot(page.getByRole("dialog"), "dialog")is the same as passing the page withelement, so it can't be combined withoptions.element.options.padding: a number or a CSS-shorthand array of 1–4 numbers. It requireselement(or aLocatorhandler), can't be combined withclip, and is clamped to the page, or to the frame when the handler is aFrameor aLocatorinside an iframe.argosCSSand the helpers run inside that frame. The SDK resolves the locator's owner frame.options.paddingrequireselement, can't be combined withclip, and is clamped to the page.options.paddingonly applies when chained off an element. Argos clamps it to the page, whilecy.screenshot's ownpaddingshifts the area back inside the page near its edges. I also moved the "chain the command from an element" sentence above the option list, where it had been splitting the list in two.paddingrequireselementand is clamped to the test's content.paddingis mentioned for shadows and focus rings. This replaces "The first argument must be aPageor aFrame, not a locator."Checked against the SDK changes in argos-ci/argos-javascript#410:
ElementPadding/getPaddedClip/clampPaddingin@argos-ci/util, the validation errors in the Playwright and PuppeteerargosScreenshot, and the Cypress clamping beforecy.screenshot.Not changed
argosAriaSnapshotstill takes aPageorFrameonly, so its reference is unchanged.paddingin ARG-515.🤖 Generated with Claude Code