playwright icon indicating copy to clipboard operation
playwright copied to clipboard

[Feature]: --project-invert

Open gskierk opened this issue 1 year ago • 2 comments

🚀 Feature Request

Similar to --grep and --grep-invert: npx playwright test --project-invert <project>. It's just a proposal and there's life without it. If it doesn't make sense, feel free to close the issue without notice.

Example

// playwright.config.ts
export default defineConfig({
  projects: [
    { name: 'browser-desktop', /* blah blah */ },
    { name: 'browser-tablet', /* blah blah */ },
    { name: 'browser-mobile', /* blah blah */ },
    /* more blah blah */
    { name: 'api' }
  ]
});
// package.json
{
  "scripts": {
    "test:e2e": "playwright test ./tests/e2e --project-invert api",
    "test:api": "playwright test ./tests/api --project api"
  }
}

Motivation

CLI will be more flexible.

gskierk avatar Jan 19 '25 00:01 gskierk

An alternative would be --projects:

$ npx playwright test --projects browser-desktop,browser-tablet
$ npx playwright test --projects api

sdavids avatar Feb 01 '25 19:02 sdavids

An alternative would be --projects:

$ npx playwright test --projects chromium,firefox $ npx playwright test --projects chromium,safari

Actually, option --project can be passed multiple times. But maybe allowing regexps or expressions would be enough here, like --project !something.

gskierk avatar Feb 01 '25 19:02 gskierk

Why was this issue closed?

Thank you for your involvement. This issue was closed due to limited engagement (upvotes/activity), lack of recent activity, and insufficient actionability. To maintain a manageable database, we prioritize issues based on these factors.

If you disagree with this closure, please open a new issue and reference this one. More support or clarity on its necessity may prompt a review. Your understanding and cooperation are appreciated.

pavelfeldman avatar Sep 04 '25 01:09 pavelfeldman