chore: refactor e2e tests to playwright#5080
Open
mahdikhashan wants to merge 166 commits intowebpack:mainfrom
Open
chore: refactor e2e tests to playwright#5080mahdikhashan wants to merge 166 commits intowebpack:mainfrom
mahdikhashan wants to merge 166 commits intowebpack:mainfrom
Conversation
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Final Report GSoC 2024
Project
The project has been to substitute Puppeteer framework with MS Playwright in webpack-dev-server project and refactor tests afterward.
I have set up Playwright and configured it in a way to be similar to the existing code, I have extended the default
testobject and added a custom matcher for snapshot comparison of objects and arrays. Since previously Jest was used as Puppeteer's test runner and Playwright has its own runner, I have added Sinon.js as a mock / stubbing library.Tests are ran over Linux, Mac and Windows using node 18, 20 and 22. The code coverage is calculated using
nycandinstanbuland it's babel plugin and pushed to CodeCov.Constraints and Future Improvement
Since by using the Playwright we could benefit from its flaky test marking mechanism, some tests are labeled as flaky which we may want to refactor them later.
Additionally, some tests were failing which I decided to do a root-cause analysis and figured out that by replacing
default-gatewaynpm package, it could pass them successfully. (link to pr)Thank you
I want to sincerely thank Webpack team member @evenstensberg for taking the time to review my proposal for the project in advance. Special thanks to my mentors @snitin315 and @alexander-akait which helped me when I ran into any issues or had questions.
WIP: will refactors tests one by one and rename the e2e-playwright folder to e2e after its done
For Bugs and Features; did you add new tests?
Motivation / Use-Case
It will introduce playwright in the project to replace the existing puppeteer end to end framework.
Breaking Changes
Additional Info