I'm currently using protractor jasmine to test our Angular4 application. Our application has 2 modules (Form1 and Form2). Form1 needs to be completed first before an applicant can proceed to Form2. In e2e, how can I chain my Form2 to Form1 so that after Form1 is finished it will call the Form2 spec test (Form 2 will not login anymore). Note: I need the form1 and form2 tests in its own separated spec file.
form1.test-spec.ts
describe('Form 1 Test', function() {
beforeAll(() => {
commonService.doLogin();
});
it('scenario1' () => {
//test for form1
//Call form2.test-spec.ts
});
});
form2.test-spec.ts
describe('Form 2 Test', function() {
it('scenario1' () => {
//test for form2
});
});