Search code examples
javascriptseleniumtestingprotractorend-to-end

protractor testing on token authorization pages


How can I test inner app pages with token authorization? It always throw me on login page with test failure. I added in config file 'accessToken' or 'tiken' with token value, but without success.


Solution

  • You have to write script, which will: 1. (optionally) install test user into application 2. login to application

    Put it either into protractor-conf.js::onPrepare function (to be executed only once before all tests), or into beforeEach block (to be executed each time before every test)