infosum / cypress-tags

Use custom tags to slice up Cypress test runs
83 stars 20 forks source link

Tags are not working when tests are in loop #252

Open zbigniewkalinowski opened 1 year ago

zbigniewkalinowski commented 1 year ago

I'm using cypress-tags 1.1.2 plugin to run tests in different environments. I'm running few tests in loop (example code attached). The problem is that these tests always run, no matter what the tags are. My tags are added to desribe not to separate it so it should be filtered.

Test code: const modules = ['module1', 'module2', 'module3']

describe(['staging'], 'test', () => { modules.forEach(module => {

it('Test something in ' + module, () => {
  //my test
});

}); });

Cypress version: 12.5.1

Node version: 14.15.1

OS: Windows 10/11