I've got a single page that takes a user through a flow of different panels and a number of tests that are almost all identical aside from a couple different inputs I want to give. I tried an approach similar to this question but I have more than 1 it
block and only the first one is ever ran, while the following tests after are all ignored.
describe('Page flow test', function() {
var page = require('../PageObjects/SomePage.js');
var configs = require('../Configs.js');
for(var i = 0; i < configs.length; i++) {
(function(config) {
it('should do something', function() {
expect( config.name ).toEqual( config.nameToExpect );
});
it('should find an email', function() {
page.emailInput.sendKeys( config.email );
page.emailSearchSubmitButton.click();
expect( page.emailSearchResult ).toEqual( config.emailToExpect );
});
// More tests...
})( configs[i] );
}
});
Found somewhat of a workaround although it's less than ideal.