fix(e2e): decouple smoke home test from featured collection image#3797
Merged
Conversation
Contributor
|
Oxygen deployed a preview of your
Learn more about Hydrogen's GitHub integration. |
graygilmore
reviewed
Jun 10, 2026
| .getByRole('img'); | ||
|
|
||
| await expect(heroImage).toBeVisible(); | ||
| await expect(featuredCollection).toBeVisible(); |
Contributor
There was a problem hiding this comment.
Should we test the actual content of this? I'm not sure how valuable testing that an h1 is present on the page is.
Contributor
Author
There was a problem hiding this comment.
changing the e2e to assert on featured collection presence (via collection title) rather than collection image as image is optional (flakey)
The smoke home test asserted that the featured collection hero rendered an
`<img>`. The featured collection is the most-recently-updated collection in
the preview store (`sortKey: UPDATED_AT`), and its image is optional in the
template (`{image && ...}` in _index.tsx). When the newest collection has no
image (currently "Freeride"), the hero renders only its heading and the test
times out waiting for an image that is never present.
Assert the featured collection heading (`h1`, the collection title, which is
always present) instead, per the "Dynamic Store Data" guidance in
e2e/CLAUDE.md. The product grid image assertion still verifies Image rendering
against reliable product data.
21cced7 to
3b5aad5
Compare
graygilmore
approved these changes
Jun 10, 2026
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.
Problem
[smoke] home.spec.tswas failing onmainbecause it asserted the home hero's collection image. The hero is the most-recently-updated collection (sortKey: UPDATED_AT) and its image is optional. A bulk collection update in the preview store left every collection tied onupdatedAt, so the tie now surfaces Freeride, which has no image — the hero renders only its heading and the test times out.Fix
Assert the collection heading (always present) instead of the optional image, per the "Dynamic Store Data" guidance in
e2e/CLAUDE.md. The product-grid image assertion still coversImagerendering.Test-only; no changeset.