Suppose I have the following spec containing 2 it blocks, one checks the menu items for teacher role, and another one checks for student role. The variable rolesToCheck contains the roles on which basis it block will be activated, Currently, the rolesToCheck variable only contains the student hence it will run only the second it block. Is it possible to do so?
describe('side menu check', () => {
var sideMenuHelper;
var rolesToCheck = ['student'];
beforeEach(() => {
cy.login();
cy.wait(5000);
});
it('menu item check for teacher', () => {
.....
})
it('menu item check for student', () => {
.....
})
})