samedi 11 avril 2015

Ember acceptance-test with browser redirect

My app login works with redirects.


flow: 1 - The user clicks in a first button. 2- Browser redirects to another app 3 - return to /login with a token 4 - clickc in a second button 5- Browser redirects to another app 6 - return to /login with a token 7 - after that, the user is logged


I was trying this:



test('visiting /login click all btns', function(assert) {
visit('/login');
click('.btn-connect-twitter');
click('.btn-connect-facebook');

andThen(function() {
assert.equal(currentPath(), 'posts', 'should return to /posts');
});
});




Aucun commentaire:

Enregistrer un commentaire