Repository navigation
checkout-check: walk no-grid shops via category archive or product link - #298
Merged
Merged
Conversation
…link A shop landing that is an order form or a curated page made step 1 fail with 'no products listed' and skip the whole walk. When the grid selector finds nothing, fall back first to the product-category archive the page links to - when it lists products it acts as the shop - then to any product link on the page. --product and --category keep priority and are only needed when the page has neither. Steps 2 and 3 now resolve the discovered hrefs against the base URL; relative hrefs were invalid page.goto targets before. Resolves #293.
This was referenced Nov 17, 2026
Merged
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.
checkout-checkno longer aborts its walk on a store whose shop page shows no product grid, resolving #293. Some production stores make the shop landing a curated or order-form page (page-builder stores especially): step 1 failed withno products listedand every later step was skipped, even though the store was walkable via its category archives and product pages.No-grid fallback chain (step 1):
product-categoryarchive the shop page links to. If that archive lists products, it acts as the shop for the remaining steps — step 2 loads it and step 3 takes a product from it, so the run goes fully green with no flags.a[href*="/product/"]link on the page as the product source.--productand--categorykeep priority throughout and only become necessary when the page has neither; the existingSKIPbehavior then applies unchanged.Relative-href fix (steps 2 and 3):
hrefs are now resolved against the base URL via the existingabs()helper. A relativehrefwas passed straight topage.gotobefore, which failed withCannot navigate to invalid URL— exposed by the fake-store test below.Docs:
scripts/README.mdand the script header no longer tell operators to pass--productfor every order-form shop; the fallback handles it unless the page has no product or category links at all.Verification (run on this branch):
node --check scripts/monitoring/checkout-check.js— clean;go test ./...passes.FAIL 1. shop page — no products listed, everything else skipped.PASS 1. shop page — no product grid on the shop page; 3 products on a category archive,PASS 2. category page — 3 products listed; step 3 proceeded to the product URL as expected (the fake server has no product page, so the HTTP 404 there is the test fixture, not the tool).PASS 1. shop page — no product grid on the shop page; using a product link from it.--place-order, unchanged.Files changed (3):
scripts/monitoring/checkout-check.jsscripts/README.mdCHANGELOG.md