Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Scripts: Deprecated or remove Puppeteer as e2e test handler #60357

Open
Mamaduka opened this issue Apr 2, 2024 · 4 comments
Open

Scripts: Deprecated or remove Puppeteer as e2e test handler #60357

Mamaduka opened this issue Apr 2, 2024 · 4 comments
Labels
[Package] Scripts /packages/scripts [Type] Enhancement A suggestion for improvement.

Comments

@Mamaduka
Copy link
Member

Mamaduka commented Apr 2, 2024

Extracted from #59311.

Now that core is fully migrated to Playwright and is the recommended library for running e2e tests, let's consider gracefully deprecating or fully removing Puppeteer from the scripts package.

@Mamaduka Mamaduka added [Type] Enhancement A suggestion for improvement. [Package] Scripts /packages/scripts labels Apr 2, 2024
@youknowriad
Copy link
Contributor

I think it should be ok to remove and mark the change as breaking change. People will have to update the package manually anyway.

That said, we need to answer the fact that some people would want to continue using puppeteer while updating scripts package. In that case, I think it's a documentation thing. It should be possible to install puppeteer and run it directly for them without needing us to provide it in wp-scripts.

@Mamaduka
Copy link
Member Author

Mamaduka commented Sep 4, 2024

We could update the test-e2e.js script and print some helpful upgrade guide - install puppeteer, etc.

This seems like the right place to do it.

const result = spawn( 'node', [ require.resolve( 'puppeteer-core/install' ) ], {
stdio: 'inherit',
} );
if ( result.status > 0 ) {
process.exit( result.status );
}

@youknowriad
Copy link
Contributor

Shouldn't we update test-e2e to use playwright instead? and if we detect puppeteer tests somehow render the upgrade guide?

@Mamaduka
Copy link
Member Author

Mamaduka commented Sep 4, 2024

That would be nice, but we need to figure out how to detect puppeteer tests.

I guess if we're going for a breaking change, we could:

  • Fully move to Playwright in wp-scripts. Making test-e2e and test-playwright aliases.
  • Write up migration guide for the puppeteer and legacy test runner.
  • Mention the migration guide in the changelog.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Package] Scripts /packages/scripts [Type] Enhancement A suggestion for improvement.
Projects
None yet
Development

No branches or pull requests

2 participants