I'm not sure if this is possible. I want to have 1 file per test (spec/it), and have a separate file wich only has the test suite defined (describe funciont), that includes all my other files with my "its" specs. Something like this:
Suite1.js has the test suite configuration:
describe('Account test suite', function () {
beforeEach(function () {
bla bla bla
}
afterEach(function () {
bla bla bla
}
require('test_case1');
require('test_case2');
require('test_case3');
});
test_case1.js has only the specs like:
it('Betting Successful Win', function () {
onLoginContainer
.given.openedLoginForm()
.when.loginIsAttempted(browser.params.account.id, browser.params.account.pin, browser.params.state);
onLoginContainer
.then.itShouldBeLoggedIn();
});
And when I run Suite1.js, it runs all the required tests. Is this possible ? Thanks