vendredi 12 août 2016

How to cover ember-simple-auth with acceptance tests?

I am trying to cover sign in page with acceptance tests. Small example:

test('visiting /sign-in', function(assert) {
  visit('/sign-in');

  fillIn('.t_sign-in_email', 'tony.stark@example.com');
  fillIn('.t_sign-in_password', 'secret-password');
  click('.t_sign-in_submit');

  andThen(() => assert.equal(currentURL(), '/'));
});

But when it calls click function it immediately throws error:

SyntaxError: Unexpected token u in JSON at position 0

If I try sign in manually it works perfectly. Please help to find out what's wrong with this code?




Aucun commentaire:

Enregistrer un commentaire