From bec4a9382e40785f78b775a870e7d8c6b1023f3b Mon Sep 17 00:00:00 2001 From: Jakub Freisler Date: Wed, 31 Aug 2022 19:52:11 +0200 Subject: [PATCH] docs: info about scaling screenshot to viewport --- README.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/README.md b/README.md index 29e37e45..51f7d221 100644 --- a/README.md +++ b/README.md @@ -22,6 +22,8 @@ · Usage · + FAQ + · File an Issue · Have a question or an idea? @@ -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 + +
Why screenshots doesn't conform to the `viewport` set in my Cypress configuration? + +Screenshots in Cypress do not scale to the viewport size by default. You can change this behavior: + +* globally, by changing default screenshot configuration: Cypress.Screenshot.defaults({ capture: 'viewport' }); +* locally, by passing screenshot configuration directly to the .matchImage command: cy.matchImage({ screenshotConfig: { capture: 'viewport' } }); + +
+ ## Questions Don’t hesitate to ask a question directly on the [discussions board](https://github.com/FRSOURCE/cypress-plugin-visual-regression-diff/discussions)!