test(e2e): add subscriptions recipe e2e tests#3545
Open
itsjustriley wants to merge 8 commits intorecipe-test-combined-listingsfrom
Open
test(e2e): add subscriptions recipe e2e tests#3545itsjustriley wants to merge 8 commits intorecipe-test-combined-listingsfrom
itsjustriley wants to merge 8 commits intorecipe-test-combined-listingsfrom
Conversation
Contributor
|
Oxygen deployed a preview of your
Learn more about Hydrogen's GitHub integration. |
5 tasks
|
🤖 Code Review · #projects-dev-ai for questions ✅ Complete - No issues 📋 History✅ 1 findings → ✅ 1 findings → ✅ No issues → ✅ 1 findings → ✅ 1 findings → ✅ No issues → ✅ No issues → ✅ No issues |
itsjustriley
added a commit
that referenced
this pull request
Mar 9, 2026
…ives Addresses binks-code-reviewer feedback on PR #3545: - Fix selling plan URL parameter switching to properly wait for value changes instead of just checking existence. Previously could capture same value twice if navigation was fast. - Replace overly-broad cart assertion regex with specific getByText check for 'subscription' marker. Original regex matched any single word like 'every', 'month', 'week' which could appear in unrelated UI copy. - Scope cart assertion to specific line item using getByText().toBeVisible() instead of textContent() to avoid matching hidden text. All 6 tests passing locally.
kdaviduik
requested changes
Mar 10, 2026
|
|
||
| test.describe('Cart - Subscription Product', () => { | ||
| test('displays subscription details in cart line item', async ({page}) => { | ||
| const cart = new CartUtil(page); |
Contributor
There was a problem hiding this comment.
non-blocking: This test repeats the full add-to-cart flow (~17 lines) that the previous test already exercises. CartUtil.addItem() encapsulates this with robustness guards (waits for Remove button). That said, explicit setup in each test is a valid e2e philosophy — fine either way.
aaf0bcc to
d4cf926
Compare
ad9efb6 to
33aded1
Compare
itsjustriley
added a commit
that referenced
this pull request
Mar 11, 2026
…ives Addresses binks-code-reviewer feedback on PR #3545: - Fix selling plan URL parameter switching to properly wait for value changes instead of just checking existence. Previously could capture same value twice if navigation was fast. - Replace overly-broad cart assertion regex with specific getByText check for 'subscription' marker. Original regex matched any single word like 'every', 'month', 'week' which could appear in unrelated UI copy. - Scope cart assertion to specific line item using getByText().toBeVisible() instead of textContent() to avoid matching hidden text. All 6 tests passing locally.
d4cf926 to
21cf381
Compare
33aded1 to
c5e7e6d
Compare
Add comprehensive tests for subscription product functionality including selling plan selector display, subscription frequency options, cart integration, and verification that regular products don't show subscription UI.
Convert 'Note: This test does NOT cover...' to a TODO for future work, since auth tests should be added to this file later.
Remove verbose and redundant comments from doc block and const declarations.
Tests that users can switch between subscription frequencies (monthly ↔ weekly) and URL parameters update correctly for each selection. Addresses audit recommendation for edge case coverage.
…ives Addresses binks-code-reviewer feedback on PR #3545: - Fix selling plan URL parameter switching to properly wait for value changes instead of just checking existence. Previously could capture same value twice if navigation was fast. - Replace overly-broad cart assertion regex with specific getByText check for 'subscription' marker. Original regex matched any single word like 'every', 'month', 'week' which could appear in unrelated UI copy. - Scope cart assertion to specific line item using getByText().toBeVisible() instead of textContent() to avoid matching hidden text. All 6 tests passing locally.
21cf381 to
ab4981c
Compare
itsjustriley
added a commit
that referenced
this pull request
Mar 11, 2026
…ives Addresses binks-code-reviewer feedback on PR #3545: - Fix selling plan URL parameter switching to properly wait for value changes instead of just checking existence. Previously could capture same value twice if navigation was fast. - Replace overly-broad cart assertion regex with specific getByText check for 'subscription' marker. Original regex matched any single word like 'every', 'month', 'week' which could appear in unrelated UI copy. - Scope cart assertion to specific line item using getByText().toBeVisible() instead of textContent() to avoid matching hidden text. All 6 tests passing locally.
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.
WHY are these changes introduced?
Adds e2e test coverage for the subscriptions recipe, which enables selling subscription-based products using selling plan groups from the Shopify Subscriptions app. This continues the systematic testing of recipes to ensure all user-facing changes are validated.
This PR is stacked on #3544 (combined-listings tests).
WHAT is this pull request doing?
Adds
e2e/specs/recipes/subscriptions.spec.tswith 5 tests covering:Tests use role-based selectors,
.toHaveCount(0)for robust absence testing, reuseCartUtilfor cart operations, and follow established patterns from existing recipe tests.The subscriptions recipe implements selling plan groups, allowing customers to choose between one-time purchases or recurring subscriptions for products with available selling plans.
Note: These tests do NOT cover the /account/subscriptions management page, as that requires customer authentication.
HOW to test your changes?
All tests pass (30 total: 6 bundles + 6 combined-listings + 5 subscriptions + 7 infinite-scroll + 6 markets).
Checklist