question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Visual regression? `expect(page).toMatchScreenshot()`?

See original GitHub issue

🚀 Feature Proposal

I’t be great to have a toMatchSnapshot() like API for visual regression tests.

Motivation

There are cases where visual regression is very useful.

Example

await expect(page).toMatchScreenshot();

Pitch

It belongs to jest-puppeteer because it’s a Jest-like API to take advantage of a Puppeteer feature.

Issue Analytics

  • State:open
  • Created 4 years ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
rodoabadcommented, Jun 22, 2019
0reactions
FezVrastacommented, Jun 18, 2019

Yeah I’m just proposing to leave the screenshots in the filesystem/git, and let the user do whatever they want with them.

One could have a workflow like the following:

  1. download screenshots from S3
  2. put screenshots in right folder
  3. run tests
  4. update screenshots
  5. upload screenshots to S3
Read more comments on GitHub >

github_iconTop Results From Across the Web

Snapshot Testing - Jest
Visual regression testing tools take screenshots of web pages and compare the resulting images pixel by pixel. With Snapshot testing values are ...
Read more >
Automated visual regression testing with TypeScript ...
There are libraries available to take screenshots of current web pages and compare generated screenshots to find regressions in the UI.
Read more >
Set up visual regression testing - Meticulous
toJSON(); expect(tree).toMatchSnapshot(); }); }); });. The renderer() function from react-test-renderer helps render the given component and ...
Read more >
How to Perform Visual Regression Testing Using Playwright
toMatchSnapshot(). Inside the newly created javascript file, create a new test that performs the visual comparison like below. // example.
Read more >
Snapshot Testing with Jest - Bambielli's Blog
Visual regression testing, also known as screenshot testing, involves taking automated screenshots of views under test, and performing a pixel ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found