Skip to content

feat(e2e): add wp-env-config-path and playwright-cmd inputs#19

Open
Hug0-Drelon wants to merge 3 commits into
mainfrom
e2e-action-inputs
Open

feat(e2e): add wp-env-config-path and playwright-cmd inputs#19
Hug0-Drelon wants to merge 3 commits into
mainfrom
e2e-action-inputs

Conversation

@Hug0-Drelon

@Hug0-Drelon Hug0-Drelon commented Jul 16, 2026

Copy link
Copy Markdown
Member

What?

  • Create wp-env-config-path to optionally pass a specific wp-env config file.
  • Create playwright-cmd to optionally pass a specific Playwright command (useful for non-usual config).

Why?

Callers need to override the default wp-env discovery and Playwright npm script without forking the composite action.

How?

  • Add the two optional inputs with defaults that preserve current behavior.
  • Pass --config to wp-env start when wp-env-config-path is set.
  • Run ${{ inputs.playwright-cmd }} instead of a hard-coded npm run test:e2e.

Split from #17 (inputs only; cache improvements follow in a separate PR).

Test plan

  • Run the e2e action without the new inputs — behavior matches main.
  • Pass wp-env-config-path to a custom config and confirm wp-env start -- --config=… is used.
  • Pass playwright-cmd to a custom command and confirm that command runs.

Warning

This requires to migrate consumer projects to @wordpress/env 11.

@Hug0-Drelon Hug0-Drelon self-assigned this Jul 16, 2026
@Hug0-Drelon Hug0-Drelon added the enhancement New feature or request label Jul 16, 2026
@Hug0-Drelon

Copy link
Copy Markdown
Member Author

Note: reverted the accidental merge of #20 into this branch. #20 will be reopened against main separately so inputs and cache stay independent.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant