-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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 test to verify image appears on frontend #50472
Add test to verify image appears on frontend #50472
Conversation
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.
Nice, this is a good start before we start covering other use cases with the lightbox enabled 😀
@gziolo Thanks for the review! I added a check for the child |
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 looks good to start with.
It’s very likely that you need to set an alt
attribute on the image for the licator to be able to find it. The img
without the alt
is not accessible.
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.
LGTM 👍
I wonder why we don't automatically set an empty |
What?
This PR adds a test to confirm that the image block actually outputs the expected element in the frontend published post content.
Why?
While we've done a good job of testing to make sure the image behaves as expected in the editor, this adds extra verification so we can catch if the image block ever breaks.
This will be especially important as we look to extend the image functionality with a lightbox #50373
How?
It adds to a test to the image.spec.js
Testing Instructions
Run
npm run test:e2e:playwright -- image.spec.js
to test the single test file locally.Testing Instructions for Keyboard
N/A
Screenshots or screencast