Created
March 24, 2021 16:40
-
-
Save csouchet/003ad914eca9c529fd300723d85cc67a to your computer and use it in GitHub Desktop.
Order the snapshots with Jest-image-snapshot 2
This file contains 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
import { gotoPageWithBPMNContainer, getConfig } from './helpers/visu-utils'; | |
it(`no BPMN Gateway visual regression`, async () => { | |
await gotoPageWithBPMNContainer(); | |
// Take the screenshot of the page with puppeteer | |
const image = await page.screenshot({ fullPage: true }); | |
// Compare the taken screenshot with the baseline screenshot (if exists), or create it (else) | |
const config = getConfig('__image_snapshots__/bpmn'); | |
expect(image).toMatchImageSnapshot(config); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment