jeudi 12 novembre 2015

Handling redirects via window.location in Ember acceptance tests

I'm struggling with setup for acceptance tests run in subdomains. I'd like to be able to test using:

ember test, ember test --serve with at least PhantomJS.

Case

user logs in at http://ift.tt/20PiJ0s

app is the default subdomain.

User is redirected to dashboard where he can select his organizations (accounts). Accounts are in subdomains like http://ift.tt/1HKBPJH

Flow

app subdomain => login => dashboard (accounts) => account in subdomain

It works but for acceptance tests as redirect or url change causes tests to re-run.

I tried to use windowProxy from this thread on http://ift.tt/170tcap where I also described the issue.

If url can't be changed for acceptance tests, what setup would work? Is it possible to run only acceptance tests on a given subdomain (myorg)?




Aucun commentaire:

Enregistrer un commentaire