Ember Visual Test (npm: `ember-visual-test`) is an Ember addon designed to integrate visual regression testing directly into Ember.js applications' acceptance and integration test suites. Its current stable version is 0.3.2. The package captures screenshots of rendered components or full pages during tests and compares them against predefined baseline images, failing tests if significant visual differences are detected. This allows developers to catch unintended UI changes across different deployments or code modifications. The release cadence for this project appears moderate, with the last significant feature additions occurring around v0.3.0. A key differentiator is its seamless integration with the existing Ember testing framework, leveraging standard `ember-qunit` or `ember-mocha` setups for visual validation rather than requiring a separate, external testing harness. It aims to make visual testing an integral part of the development and CI/CD workflow.
npm install ember-visual-testVerified import paths — ran on the pinned version, not inferred.
Demonstrates setting up `ember-visual-test` in an Ember acceptance test and using `assertVisualTest` to capture and compare UI snapshots after page loads and user interactions.
Ensure your Node.js environment is `v8.*` or `v10.*` or newer. Consider using an NVM-like tool to manage Node.js versions.
Upgrade your Ember.js application to at least v3.4 and Ember CLI to v2.13 before installing and using this addon. Refer to the official Ember upgrade guides.
If tests fail in CI with Chromium-related errors, try adding `noSandbox: true` to your `config/environment.js` visual test configuration:
```javascript
ENV['ember-visual-test'] = {
noSandbox: true
};
```Ensure your CI environment has necessary dependencies for Puppeteer (e.g., `libatk-bridge2.0-0`, `libgbm-dev`, `libasound2`, etc., depending on OS). Check network access for downloading Chromium. For Docker, consider using a base image that already includes these or a pre-installed Chromium/Node.js combination.
If the change is intentional, run `ember visual-test:approve` to update the baseline images. If unintentional, investigate the UI changes and fix the regression before re-running tests.
Ensure `ember-visual-test` is installed and updated to at least version 0.3.0. Run `npm install ember-visual-test@latest` or `yarn add ember-visual-test@latest` and then `ember install ember-visual-test` to ensure blueprints are correctly applied.