Closed knownasilya closed 3 years ago
👋🏼 Hey @knownasilya! How is Percy being ran? That means the DOM lib can't be fetched from the percy server: https://github.com/percy/ember-percy/blob/master/addon-test-support/%40percy/ember/index.js#L12
Hello!
import percySnapshot from '@percy/ember';
module('Acceptance | password reset', function (hooks) {
setupApplicationTest(hooks);
setupMirage(hooks);
test('request password reset', async function (assert) {
let user = this.server.create('user', {
email: 'test@example.com',
resetPasswordToken: undefined,
});
await visit('/');
await click('[data-test-forgot-password]');
assert.equal(currentURL(), '/forgot-password');
await percySnapshot('forgot-password');
await fillIn('[data-test-forgot-email]', user.email);
await click('[data-test-request-reset');
let found = this.server.schema.users.findBy({ email: 'test@example.com' });
assert.equal(currentURL(), '/login');
assert.ok(found.resetPasswordToken);
});
This error would come from running Percy without percy exec -- ember test
. percy exec
starts the local Percy server. Step 4 here: https://docs.percy.io/docs/ember#setup -- is that missing? 🤔
Also, fully acknowledge the error message is terrible. That changes in the next version: https://github.com/percy/ember-percy/blob/ww/new-cli/addon-test-support/%40percy/ember/index.js#L30 (https://docs.percy.io/docs/migrating-to-percy-cli#wip)
Yes. Didn't see that. It would be better if the docs had code blocks below each step, instead of showing the code inline. Easier to miss. Closing since it was an error on my part 😄
Could the new error mention using percy exec
?
I don't think there is -- there's many ways to start the server now (via @percy/core
, percy exec:start
or percy exec -- [sub command
). So we can't assume how the consuming SDK is starting the server. Just that it's not available. It's also something that will be logged anytime tests are run without the Percy server running (a perfectly valid scenario), so verbosity is a consideration too.. 🤔 (Thinking about adding "did you mean to use percy exec
?" but that's too specific)
Yeah, understand. I wonder if there could be a help page about the different ways to run it, and that could be linked.
Getting this error in an Ember app. Both locally and in Github Actions.