-
-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
ci(e2e): node canvas visual tests #9134
Conversation
Build Stats
|
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.
not bad...
could be better.
for now I think we can move forward
Thoughts?
Ahh coverage |
i think this would be great, but you have to give me time to digest it. I lost track of all the playwrigth changes. I need to write a test to recover some comfort with it |
tests are becoming flaky already we need to be careful of how we run them. |
There is something that doesn't make this test pass and i don't understand what it is. |
Did you try to change the parallel config? |
I also saw jest has a plugin for image diffs... |
the reporting features of playwright are great imho, but anyway, why is this failing? did it ever pass to you in the CI? |
I will look into it when I am back |
commit bdbb33d8e75fa7cb3e927440a3c45a6192f5f510 Author: ShaMan123 <shacharnen@gmail.com> Date: Sun Sep 10 13:10:52 2023 +0530 fix test flakiness commit dba358c55e68358fc590c47ba92fc430afcc1c55 Author: ShaMan123 <shacharnen@gmail.com> Date: Sun Sep 10 13:07:21 2023 +0530 Update setupSelectors.ts
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.
e2e/setup/index.ts
Outdated
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.
seems that importing these files is what made tests flaky.
Calling the setup as a method seems to fix it
e2e/setup/setupSelectors.ts
Outdated
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 is also flaky, fixed by trycatch
@asturur please merge this asap |
i wonder if this also solves the issue i was having on text tests. |
Motivation
Use playwright to do visual diffs with browser and node.
This PR add a test example that is structured as follow:
to make this possible an util has been added
createNodeSnapshot
that will take as argument the setup function from the test, running the same function in node, and returning the buffer of the canvas that is what the matchSnapshot function would expectDescription
Added a template that demonstrates how to do use e2e with node canvas.
Fairly simple.
TODO:
Changes
Gist
In Action