Reputation: 11585
I would like to run the same suite of tests with multiple configurations, but I don't know how to queue the same test. A simple loop will cause tests to try and execute at the same time, which messes up with you are clicking and waiting for modals etc.
e.g. this does not work (coffeescript)
["Apple", "Microsoft"].forEach (e,i,l) ->
describe "Page is working...", ->
it "...has correct title", ->
expect browser.getTitle()
.toBe e + "'s website"
I see that describe returns an object, which I hoped was promise but its not. I started writing the same based on promises but its looking messy. Is there any other way I'm missing?
Upvotes: 0
Views: 212
Reputation: 6034
I'm not familiar with coffeescript (think that's what you're using right?), but I believe what you're asking is how to write parametrized tests with protractor.
There is an issue open requesting for this: https://github.com/angular/protractor/issues/620
For now that issue is still unresolved but this question should give you some ideas about how to approach the issue in your code: How do I open multiple windows or operate multiple instances
Upvotes: 1