percy / percy-ember

Ember addon for visual regression testing with Percy

Home Page:https://docs.percy.io/docs/ember

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Create test helper that works in new ember test framework

habdelra opened this issue · comments

The current percySnapshot test helper should be updated to work in the new ember testing framework http://rwjblue.com/2017/10/23/ember-qunit-simplication/

One of the changes is that the way test helpers are created has changed. registerAsyncHelper is no longer used. Rather test helpers are just plain functions that use import { getContext } from '@ember/test-helpers'; to get access to the container.

Take a look here for an example of an async test helper using the new test framework:
https://github.com/ember-animation/ember-animated/blob/f9e4722ca54ffc163f0adfdb4f8fe2fb5a4dc949/addon-test-support/index.js#L11-L18

@habdelra I believe you can already do this with:

import { percySnapshot } from 'ember-percy';

Let me know if that doesn't work.

sure that worked. do you think you can update your docs for this? as the start-app.js and .eslintrc don't have to be modified in this scenario