Is it ok to have a nested describe for the purpose of read ability? Example:
describe('Atlas Search ', () => {
beforeEach(() => browser.pause(20));
before(()=> {
searchPage.home();
searchPage.searchBtn.click();
});
describe('When searching for items', () => {
before(() => searchPage.searchBox.setValue('Darth'));
it('should give 2 drop down hints', () => {
browser.pause(800);
[
'Star Wars - Darth Vader',
'Star Wars - Darth Maul',
].forEach((assertion, i) => {
const el = searchPage.searchHints[i+1];
const elText = searchPage.getHintText(el);
elText.should.equal(assertion);
});
});
});
})
[chrome linux #0-0] Atlas Search
[chrome linux #0-0] When searching for items
[chrome linux #0-0] ✓ should give 2 drop down hints
[chrome linux #0-0]
[chrome linux #0-0] 1 passing (5.2s)