Reputation: 945
I have two files "test.js" and "gmail.js"(Mail listener 2). I need to run "test.js" file first and then after 2 minutes i need to run "gmail.js" file.
Is it possible?
Upvotes: 1
Views: 1089
Reputation: 473863
One option would be to properly configure your specs
parameter in the Protractor config:
specs: [
"path/to/test.js",
"path/to/gmail.js",
],
specs
are executed sequentially one by one.
As far as adding a time delay, you can put it under the beforeAll
into gmail.js
:
describe("Should test something", function () {
beforeAll(function () {
browser.sleep(120000); // wait for 2 minutes
});
it("should do something", function () {
// your test logic here
});
}, 300000); // adjusting the default timeout interval -- 5 minutes for this spec
Upvotes: 2