Repository navigation
test(e2e): Add Gallery block front-end delivery spec - #1306
Open
utkarshcloudinary wants to merge 1 commit into
Open
utkarshcloudinary wants to merge 1 commit into
utkarshcloudinary wants to merge 1 commit into
Conversation
Publish a post with a Cloudinary Gallery block and assert the front end renders exactly N images, that every src/srcset is served from res.cloudinary.com/<cloud_name>/, and that switching the layout from expanded to classic in the editor and saving changes the rendered widget markup. Move expectCloudinaryUrl() to utils/delivery.js so the image and gallery delivery specs share one assertion.
utkarshcloudinary
marked this pull request as ready for review
October 5, 2026 15:17
This branch has not been deployed
This file contains hidden or 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
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.
Adds a Playwright spec that checks the Cloudinary Gallery block on the front end. It covers the image count, Cloudinary delivery URLs, and a layout change made in the editor.
Approach
tests/e2e/cloudinary-gallery-delivery.spec.js(@serial, needsCLOUDINARY_E2E_URL):beforeAlluploads 3 images. It syncs them through the plugin'scloudinary/v1/image_dataendpoint, which is the same call the block editor makes. Then it publishes a post with acloudinary/galleryblock set to the expanded layout with 3 columns.<img>in the widget, including thumbnails, has asrc/srcsetonres.cloudinary.com/<cloud_name>/.mode="classic", a carousel viewer, no scroll viewer, and N thumbnails. All URLs are still Cloudinary URLs.data-testhooks anddata-ready="true". It does not use fixed timeouts. The widget loads fromproduct-gallery.cloudinary.com, so its waits allow 30s.expectCloudinaryUrl()from the image delivery spec totests/e2e/utils/delivery.jsso both specs share it.QA notes
cp .env.example .envand setCLOUDINARY_E2E_URLto a test account.npm run env:start, ornpx wp-env start --config .wp-env.ci.jsonfor the plain HTTP setup that CI uses.npm run test:e2e:serial -- cloudinary-gallery-delivery, or with the CI config:WP_BASE_URL=http://localhost:8889 ./.wp-env/scripts/run-e2e.sh cloudinary-gallery-delivery --workers=1.cloudinary-image-deliveryshould still pass.