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

[ci] Visual regression testing using backstopjs #1157

Merged
merged 6 commits into from
Jan 21, 2019

Conversation

kristofferjs
Copy link
Contributor

@kristofferjs kristofferjs commented Jan 10, 2019

  • Dedicated studio
  • Chrome headless is running in docker for exact render across platforms

For designers:

npm backstop-test-studio to view studio and edit data
npm test:backstop (while studio is running) to test local changes. (docker required)
npm test:backstop:approve to approve visual changes

Copy link
Member

@rexxars rexxars left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@kristofferjs
Copy link
Contributor Author

Did som changes before we merge

  • Moved the backstop folder to test
  • No need to run backstop-test-studio before running test (it starts and quits on npm run test:backstop )

@mariuslundgard
Copy link
Member

Hm, when I run npm run test:backstop I get

@sanity/core not installed in current project
Project-specific commands not available until you run `sanity install`
"start" is not available outside of a Sanity project context.
Run the command again within a Sanity project directory, where "@sanity/core"
is installed as a dependency.

@kristofferjs
Copy link
Contributor Author

@mariuslundgard Did you run npm install and npm run bootstrap first?

@mariuslundgard
Copy link
Member

mariuslundgard commented Jan 21, 2019

Yes, it works! (6 tests failing)

@@ -20,13 +20,17 @@
"start": "npm run test-studio",
"ecommerce-studio": "gulp ecommerce-studio",
"test-studio": "gulp test-studio",
"backstop-test-studio": "gulp backstop-test-studio",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this script still used or can it be removed?

Copy link
Member

@mariuslundgard mariuslundgard Jan 21, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, it's used for updating content.

PS. Would be nice to document how to use these tests in the root README as part of this PR.

@kristofferjs kristofferjs merged commit 4c29c0b into next Jan 21, 2019
@kristofferjs kristofferjs deleted the visual-regression-testing branch January 21, 2019 11:57
bjoerge pushed a commit that referenced this pull request Feb 1, 2019
* [test] Adding studio
* [test] Adding backstop visual regression testing
* [test] Adding reference files
* [test] Move backstop to test folder and run backstop-test-studio on test
* [test] Check that docker is installed and give error message if not
@skogsmaskin skogsmaskin mentioned this pull request Feb 1, 2019
skogsmaskin pushed a commit that referenced this pull request Feb 1, 2019
* [test] Adding studio
* [test] Adding backstop visual regression testing
* [test] Adding reference files
* [test] Move backstop to test folder and run backstop-test-studio on test
* [test] Check that docker is installed and give error message if not
@bjoerge bjoerge restored the visual-regression-testing branch August 13, 2019 14:04
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.

3 participants