fixture |
---|
fixtures/png.js |
Note: this page is a fully executable spec for the options it demonstrates. If you are reading this on GitHub, it will render the page nicely and hide all the technical details, so check out the raw markdown to see the actual test configuration.
If a fixture returns a PNG file path, appraise will load the PNG directly instead of using headless Chrome for screenshots.
By default, Appraise will load the whole file returned by the fixture. You can configure a clip region to make tests simpler, more focused or avoid random changes that should not impact the outcome of your test.
- Set the
clip-x
andclip-y
parameters to start the clip at a particular offset. - Set the
clip-width
andclip-height
parameters to control the width and height of the clip.
Without any arguments, the entire result gets used as the actual outcome:
height: 100
width: 200
height: 100
width: 200