Skip to content

docs: info about scaling screenshot to viewport #105

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 1, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@
·
<a href="#usage">Usage</a>
·
<a href="#faq">FAQ</a>
·
<a href="https://github.com/FRSOURCE/cypress-plugin-visual-regression-diff/issues">File an Issue</a>
·
<a href="https://github.com/FRSOURCE/cypress-plugin-visual-regression-diff/discussions">Have a question or an idea?</a>
Expand Down Expand Up @@ -197,6 +199,17 @@ export default defineConfig({

For more ways of setting environment variables [take a look here](https://docs.cypress.io/guides/guides/environment-variables#Setting).

## FAQ

<details><summary>Why screenshots doesn't conform to the `viewport` set in my Cypress configuration?</summary>

Screenshots in Cypress do not scale to the viewport size by default. You can change this behavior:

* globally, by changing default screenshot configuration: <code>Cypress.Screenshot.defaults({ capture: 'viewport' });</code>
* locally, by passing screenshot configuration directly to the <code>.matchImage</code> command: <code>cy.matchImage({ screenshotConfig: { capture: 'viewport' } });</code>

</details>

## Questions

Don’t hesitate to ask a question directly on the [discussions board](https://github.com/FRSOURCE/cypress-plugin-visual-regression-diff/discussions)!
Expand Down