syndesisio / syndesis-ui

The front end application or UI for Syndesis - a flexible, customizable, cloud-hosted platform that provides core integration capabilities as a service. It leverages Red Hat's existing product architecture using OpenShift Online/Dedicated and Fuse Integration Services.
https://syndesis.io/
14 stars 28 forks source link

Reset state in e2e tests #340

Closed jludvice closed 7 years ago

jludvice commented 7 years ago

Use test rest endpoint introduced in https://github.com/redhat-ipaas/ipaas-rest/issues/177 Idea is to provide way to reset app state or to inject one.

It might be used in before / after or directly in *.feature:

Given some app state
jludvice commented 7 years ago

@dsimansk now we have way of fetching tokens and backend url from browser.

jludvice commented 7 years ago

For the reference, we might also hook into component state if we need to with:

// copy paste snippet into browser console 
ng.probe($('ipaas-root').get(0)).componentInstance

but it requires angular to run in debug mode

https://juristr.com/blog/2016/02/debugging-angular2-console/

jludvice commented 7 years ago

Now we can reset app state for instance with this:

  Background:
    Given credentials for "Camilla"
    And clean application state
jludvice commented 7 years ago

This is done by #381

Usage:

Given credentials for "Camilla"
And clean application state