Open
Description
What would you like?
My tests are written as
import { TestLayer, TestSeverity } from 'utils/testTags';
describe('check tags result', { tags: [TestLayer.API] }, () => {
it('test1', { tags: [TestSeverity.CRITICAL] }, () => {
console.log('');
});
it('test2', { tags: [TestSeverity.NORMAL] }, () => {
console.log('');
});
});
I have an enum for tags
export enum TestSeverity {
BLOCKER = '@blocker',
CRITICAL = '@critical',
NORMAL = '@normal',
MINOR = '@minor'
}
export enum TestLayer {
UI = '@ui',
API = '@api'
}
When I run my cases with the below config
grepFilterSpecs: true,
grepOmitFiltered: true
I get the following console message and it cannot filter tests
Could not determine test names in file: ${fileName}
Will run it to let the grep filter the tests
While debugging I observed it printed cypress-grep found grep tags "@ui" in 51 specs +193ms
but only 2 files have a @ui
tag.
Why is this needed?
Grouping tags in enums is helping to have a centralized place to identify all the tags of a project and will not lead to spelling mistakes or duplicates/unnecessary tags.
identifying tags from enum will help to leverage this capability to the fullest.
Other
No response