-
Notifications
You must be signed in to change notification settings - Fork 12
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
feat: Integrated Visual Regression with ember-backstop #94
Merged
Conversation
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
Add these to
|
@robin-thomas-e1391 @aslam-fw We need to get this into our engines repo. @shibulijack-fd @sharath-sriram Would be a great idea for you to post a talk/blog on this! |
Sure, we are still ironing out some bugs. Once its functioning properly, we will write about it. |
… visual-regression
packages/modal/tests/integration/components/nucleus-modal-test.js
Outdated
Show resolved
Hide resolved
packages/inline-banner/tests/integration/components/nucleus-inline-banner-test.js
Show resolved
Hide resolved
rajasegar-c
suggested changes
Jan 31, 2020
packages/banner/ember-backstop/backstop_data/engine_scripts/puppet/overrideCSS.js
Show resolved
Hide resolved
rajasegar-c
approved these changes
Jan 31, 2020
shibulijack-fd
approved these changes
Jan 31, 2020
shibulijack-fd
pushed a commit
that referenced
this pull request
Feb 3, 2020
shibulijack-fd
pushed a commit
that referenced
this pull request
Feb 6, 2020
* master: feat(banner): additional props for banner localisation (#103) chore: Lint workflow checks and cleanup (#102) fix: Changed Responsive design (#98) feat: Integrated Visual Regression with ember-backstop (#94) fix: Refactored Github action CI workflow (#96) Removed since (#95) fix(modal): modal patch for safari (#91) fix(nucleus): removed classic decorator dependency (#87) fix(icon): fixed failing tests (#89) [RELEASE] 0.3.0 (#79) # Conflicts: # packages/banner/package.json # packages/button/package.json # packages/inline-banner/package.json # packages/modal/package.json # packages/toast-message/package.json
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Visual Regression for Nucleus Component Library using ember-backstop
Motive
A high performing component library like Nucleus needs to meet high development standards. One of the primary needs during the development of a Component Library is to ensure consistency with the Design System's Specifications during the development process. Human error can often lead to slight deviations in component look and feel which might go unnoticed by the developers. Visual Regression Testing solves this problem by automating the process of testing and identifying the differences in the appearances of components.
Why ember-backstop ?
ember-backstop is an open-source Visual Regression testing tool developed as an Ember Adddon using the foundations of the popular BackstopJS Visual Regression Testing Library.
ember-backstop promises visual regression using pixel by pixel diff comparison with parallelisation capabilities for performant testing. It works using Chrome Headless with Puppeteer as the underlying engine. Almost all of the features of BackstopJS such as advanced scenario handling for animations using hover and clicked selector mechanisms, setting customised threshold limits, customised delay before taking the screenshot are available for use directly in ember backstop for a case-by-case basis.
It is worthwhile to note that while ember-backstop does not provide sophisticated approval mechanisms over CI like ember-percy, it seamlessly works with locally approved reference images to perform the CI tests.
Architecture
As the Nucleus Component Library is a mono repo, we had to make deliberate choices on where to position our Visual Regression Tests. With the goal of ensuring highly independent packages within the mono repo, Visual Regression tests have been written inside each individual package and they run separately.
ember-backstop is installed as an addon for each individual package thus creating a backstop-remote for each of the packages. The reference images for the package are stored within the backstop folder within the package.
As multiple instances of backstop-remote cannot run at the same time, the tests for the packages have been serialised. Once the reference images are approved, any differences made to the components are caught by the tests. The changes can then be viewed by the report created by ember-backstop and further action can be taken.
Future Work