[Playwright] Conditional Tests
- Run tests with a condition. In my case needed to run some of the tests on a specific environment (CI)
- Conditional tests with “test.only”
Techstack of my solution:
Add your condition before tests. As per my structure
describe() if() --> conditional implementation
Tests only run if condition passed with given value.
Hope this post may save your time when needed. Happy coding :)