describe('describe 1', function () {
beforeEach(async () => {
await browser.sleep(3000);
await browser.navigate().to(URL);
});
it('Edit Client', async () => {
await browser.wait(until.presenceOf(SpadesPageObj.ClientEdit), 50000, 'Client Edit');
await SpadesPageObj.ClientEdit.click();
});
})
describe('describe 2', function () {
beforeEach(async () => {
await browser.sleep(3000);
await browser.navigate().to(URL);
})
it('Edit Client', async () => {
await browser.wait(until.presenceOf(SpadesPageObj.ClientEdit), 50000, 'Client Edit');
await SpadesPageObj.ClientEdit.click();
});
})
Is the above code correct? Can I have two describe block in one spec file? My problem is I do not want to run beforeEach for all the IT blocks so I created a two describe, Is there any workaround in which I can skip beforeEach for some of the test cases?
I tried to run the above code and the only 1st describe runs and it skips the 2nd describe.