Is it possible to generate dynamically test scenarios for each element in array?
I've got two arrays with elements (each for an environment against which I run test suite), like that:
devEnv = ['link1', 'link2', 'link3', 'link4']
testEnv = ['link1', 'link2', 'link3']
In dev env there are 4 link available, in test env only 3.
In protractor + jasmine you can get it
s in a loop like that: https://stackoverflow.com/a/35114139/6331748
I'm using protractor + cucumber.
When I hardcode in feature file date like that:
Scenario Outline:
Given I am on main page
When I click "<linkToGo>" link
Then I should be on "<linkToGo>" page
Examples:
|linkToGo |
|link1 |
|link2 |
|link3 |
|link4 |
The tests will pass for dev env - all 4 links will be clicked, but on test env there's not link4
.
Any ideas how to solve case like that?