Skip to content

Instantly share code, notes, and snippets.

@csouchet
Created March 24, 2021 16:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save csouchet/003ad914eca9c529fd300723d85cc67a to your computer and use it in GitHub Desktop.
Save csouchet/003ad914eca9c529fd300723d85cc67a to your computer and use it in GitHub Desktop.
Order the snapshots with Jest-image-snapshot 2
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