percy / percy-ember

Ember addon for visual regression testing with Percy
https://docs.percy.io/docs/ember
MIT License
73 stars 44 forks source link

v2.0.0-beta.1 seems to ignore breakpointsConfig #165

Closed EndangeredMassa closed 4 years ago

EndangeredMassa commented 4 years ago

We're testing out the new v2 beta and it works pretty well so far. Unfortunately, the breakpointsConfig we had before is no longer recognized. The documentation still says to do it the same way.

Does the documentation need to be updated or is this a bug in the beta?

Robdel12 commented 4 years ago

Hey Sean, the docs haven't been updated yet -- I should have included that in the breaking changes. We're no longer grabbing config from Ember at build time (or hooking into the build process at all).

Though, if it's easy to get access to the config via a function, that would be rad and I could add that back in

EndangeredMassa commented 4 years ago

We don't mind updating the config. Where does it go now? We'd rather not have to specify the same breakpoint config on every invocation of percySnapshot, if possible.

Robdel12 commented 4 years ago

Ah, right! You can configure the Percy CLI (which is what v2 is using -- the package name is @percy/agent) in a few different ways: https://docs.percy.io/docs/sdk-configuration The most common is usually a .percy.yml file in the projects root. Something like:

version: 1
snapshot:
  widths: [375, 780, 1280, 1440]
Robdel12 commented 4 years ago

Closing this out -- thanks for the heads up on this! We made sure to include it in the upgrade docs: https://docs.percy.io/docs/ember#section-upgrading-from-v-1