-
Notifications
You must be signed in to change notification settings - Fork 196
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
kie-issues#1114: Containerize Playwright end-to-end tests to resolve screenshot comparison issues caused by OS differences #2866
base: main
Are you sure you want to change the base?
Conversation
Thank you @ljmotta . Please, let us know this is ready for a verification. I will try on non-MAC environment. |
@jomarko This PR can be tested for macOS and Linux. I still need to make some adjustments for native Windows (non WSL). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome PR @ljmotta! This will make our e2e tests more stable and concise!
I've made some comments below about the package.json scripts; let me know what you think.
packages/online-editor/package.json
Outdated
"test-e2e": "run-script-if --ignore-errors \"$(build-env endToEndTests.ignoreFailures)\" --bool \"$(build-env endToEndTests.run)\" --then \"pnpm rimraf ./dist-tests-e2e\" \"pnpm test-e2e:run\" --else \"pnpm test-e2e:container\"", | ||
"test-e2e:container": "run-script-if --bool \"$(build-env containerizedEndToEndTests.run)\" --then \"pnpm rimraf ./dist-tests-e2e\" \"pnpm test-e2e:container:check\"", | ||
"test-e2e:container:bash": "docker exec -it kie-tools-playwright-containerization-online-editor /bin/bash -c \"cd kie-tools/packages/online-editor && exec /bin/bash\"", | ||
"test-e2e:container:build": "cross-env KIE_TOOLS_BUILD__buildContainerImages=true pnpm -F playwright-base image:docker:build", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should handle the playwright-base image as a dependency, and as long as the dependencies are built, this image should exist.
It seems wrong to call the build script of a different package here, wdyt?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This would simplify a lot!
Co-authored-by: Thiago Lugli <[email protected]>
Status update regarding Windows. My current setup with Docker CLI + Docker WSL didn't work, as WSL doesn't handle Windows symlinks [1][2], which is heavily used by |
Maybe try hard links @ljmotta? I think we had a similar issue with |
Closes apache/incubator-kie-issues#1114
Closes #2839
Description
This PR introduces containerized end-to-end (E2E) Playwright tests to ensure consistent and reliable test execution across environments.
Tests were executed in the following environments:
Known Issues
Trying it out
@kie-tools/playwright-base
image with the following command:Updating screenshots
To update screenshots, use the
pnpm test-e2e:container:shell
script to open a shell inside the container:To improve performance, you can filter which tests will run by adding the
-g
flag:pnpm test-e2e:run -u -g "test name"