-
Notifications
You must be signed in to change notification settings - Fork 1
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
Add playwright end-to-end tests #322
Merged
+930
−9
Merged
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
c397ca0
[𝘀𝗽𝗿] initial version
yamadapc 2cbe2f6
Fixed flow types on test file
yamadapc fa8df04
Fix mocharc to ignore e2e tests on unit-tests
yamadapc dbc2a96
Fix CI set-up commands
yamadapc 4ca3bc2
Rename to E2E
yamadapc 735d733
Remove commented out delays
yamadapc 8c631ea
Extract shared testing code to shared function
yamadapc f9d9708
Fix mocharc ignore
yamadapc 982c9ff
Fix package.json CI E2E test command
yamadapc 6569092
Fix missing await statement
yamadapc 70cf298
Fix-up helper function
yamadapc File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
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.
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.
If the idea is to test the built artifacts, should we test more targets?
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 thought the artefacts would hopefully be guaranteed to be the same across environments (and that other tests would aim to guarantee that). So then it'd be a waste to run playwright tests on all OSs/versions.
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.
Depends on what you mean by artifacts in this case, but the Rust artifacts would be per platform. They get copied per arch / os in the release workflow.
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.
Sorry. Let me clarify;
So by 'built artefact' I mean: HTML, CSS, JavaScript, Images, built by atlaspack itself.
It is true that atlaspack itself might be running on different versions of Node.js or running binaries compiled for different operating systems or architectures. Those compiled binaries could also be called 'build artefacts'.
I do not think it's necessary to test the 'bundler artefacts' (HTML/CSS/JavaScript) for each compiled binary/node.js version target (Linux/v22/macOS/v18), because unless there is a platform specific bug or a compiler bug the 'bundler artefacts' (HTML/CSS/JavaScript) should be the same across platforms.
Since we already have "integration tests" running per platform and version, I thought those tests can be thought to/aim to guarantee that the output (the 'bundler artefacts' HTML/CSS/JavaScript) is correct and the same regardless of the environment (Linux/v22/macOS/v18).
Browser based E2E tests would guarantee that provided the bundler runs, its outputs also work on a web browser.
Because these are browser based tests, which ought to be slow and have certain drawbacks, I thought it'd be enough to run them on their own job on linux only.
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.
We may add more browsers / OSs too, but I'd want to avoid adding 4 new jobs for this. I can instead just copy this into the integration test suite if that seems better, I'll just need to provision playwright onto the integration test jobs.
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.
Yeah, the terminology is ambiguous which is why I was confused. What you've said makes sense, all good.