Skip to content

Commit b4c6617

Browse files
authored
docs: info about scaling screenshot to viewport (#105)
1 parent 3588901 commit b4c6617

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

README.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@
2222
·
2323
<a href="#usage">Usage</a>
2424
·
25+
<a href="#faq">FAQ</a>
26+
·
2527
<a href="https://github.com/FRSOURCE/cypress-plugin-visual-regression-diff/issues">File an Issue</a>
2628
·
2729
<a href="https://github.com/FRSOURCE/cypress-plugin-visual-regression-diff/discussions">Have a question or an idea?</a>
@@ -197,6 +199,17 @@ export default defineConfig({
197199

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

202+
## FAQ
203+
204+
<details><summary>Why screenshots doesn't conform to the `viewport` set in my Cypress configuration?</summary>
205+
206+
Screenshots in Cypress do not scale to the viewport size by default. You can change this behavior:
207+
208+
* globally, by changing default screenshot configuration: <code>Cypress.Screenshot.defaults({ capture: 'viewport' });</code>
209+
* locally, by passing screenshot configuration directly to the <code>.matchImage</code> command: <code>cy.matchImage({ screenshotConfig: { capture: 'viewport' } });</code>
210+
211+
</details>
212+
200213
## Questions
201214

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

0 commit comments

Comments
 (0)