Search code examples
testingprotractortheoryweb-testing

What is the best way test to test simple logout and automatically logout with Protractor


What is the best way to test those scenarios:

  • Simple logout

    • How we can configure protractor to run some spec as latest? (Login configured in onPrepare())
    • Or Its ok, to do login, logout and after it login again because we have another test to run.
  • Logout by timeout

    • Just wait for time out and find some on the web? Or Protractor has some features to do it nice?

And the main question how to combine those test together?


Solution

  • I resolved this issue with my application-specific tests:

    • Login with OnPrepare()
    • Test the logout options
    • Test the login alternative login function
    • Do all tests
    • After it: test auto-logout.