I am currently utilizing protractor for running e2e tests on my angular application.
My goal is to synchronize actions between describe
or it
blocks like this:
describe('My spec', function () {
doMyAction();
describe('My sub spec 1', function () {
...
});
describe('My sub spec 2', function () {
...
});
doAnotherAction();
});
The issue I'm facing is that these actions are being executed in the following order:
- doMyAction
- doAnotherAction
- describe1
- describe2
Is there a way to ensure that the describe blocks are executed before doAnotherAction
?
I have looked into the control flow feature here: https://code.google.com/p/selenium/wiki/WebDriverJs#Control_Flows
What I'm trying to determine is whether the describe blocks return a promise that can be synchronized with?