Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] add tests #14

Closed
wants to merge 14 commits into from

Conversation

kota65535
Copy link
Contributor

@kota65535 kota65535 commented Feb 24, 2018

I experimentally added testing based on visual regression test with nightwatch.js.

Idea

In visual regression test, a baseline screenshot and a current screenshot of a target page url are expected to be the same image. Normally both screenshots are taken on the same url.
Borrowing this idea for testing PaperRenderer, screenshots of following pages should be compared.

  • Baseline: the page drawn by vanilla paper library
  • Current: the page drawn by PaperRenderer

What I Implemented

  • created testing app by create-react-app inside test folder
  • testing app has two pages showing a react logo. As I mentioned above, the one is drawn by vanilla paper and the other is by PaperRenderer.
  • running npm run test first launches testing app, and then run nightwatch to compare screenshots of the pages.

I confirmed it works on MacOS.

Reference

htps://github.com/Rykus0/nightwatch-visual-regression

@HriBB
Copy link
Collaborator

HriBB commented Feb 25, 2018

Awesome! I will review the changes when I get back home next week.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants