[Question] Is there a way to list all the tags via CLI?
The new tags feature introduced in version 1.42.0 is fantastic!
I am curious if there is a way to list all tags, similar to the command below that lists all the tests:
npx playwright test --list
Perhaps something like:
npx playwright test --list-tags
This would be beneficial for our large team, including both on-site and offshore engineers. It can help address potential discrepancies where engineers may use similar tags like 'E2E,' 'End2End,' or 'EndToEnd' interchangeably. Thus, making it easy for us to consolidate the tags.
There is not, I marked it as a feature request. In the meantime you could create a custom reporter which will get invoked with --reporter=./customTagListReporter.ts --list and in there you store all the tags you have in your project and list them afterwards.
I want to have access to tags in the tests, maybe through testInfo like testInfo.title, testInfo.annotations. There can be testInfo.tags
Exposing tags in TestInfo was merged last week as per https://github.com/microsoft/playwright/pull/29794. But this request is different, instead the value can be used inside the reporter land via the existing TestCase.tags.