Skip to content

fix(e2e): reuse discovery browser + fix purchase-journey single-site check (#167 #168) - #169

Merged
JonasJesus42 merged 2 commits into
mainfrom
issue-163-v2
Jul 29, 2026
Merged

fix(e2e): reuse discovery browser + fix purchase-journey single-site check (#167 #168)#169
JonasJesus42 merged 2 commits into
mainfrom
issue-163-v2

Conversation

@JonasJesus42

@JonasJesus42 JonasJesus42 commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

Summary

Test plan

  • bun test tests/checks/purchase-journey-flow.test.ts — 12 tests pass
  • On a machine with ~1.4 GB free RAM: parity e2e --url http://localhost:5173/ no longer exits 137
  • parity e2e report shows actual step counts for purchase-journey (not 0)

🤖 Generated with Claude Code


Summary by cubic

Reuses the discovery Chromium instance to avoid a second launch that can OOM low‑RAM machines, and fixes single‑site purchase‑journey detection to stop false “no capture” errors. Also bumps @decocms/parity to 0.17.7.

  • Performance

    • Reuse the discovery browser for the main flow; launch only if discovery was skipped.
    • runLiveSelectorValidation now returns the open browser; runSelectorDiscoveryPass returns Browser | null.
    • Spinner text updated to reflect reuse.
  • Bug Fixes

    • Single-site check now requires a purchase-journey capture via candFlows.some(f => f.flow === 'purchase-journey').
    • Skip categoryLink discovery and validation when plpUrlHint is set to avoid false failures on mobile.

Written for commit d8f0fa5. Summary will update on new commits.

Review in cubic

JonasJesus42 and others added 2 commits July 29, 2026 01:13
…167 #168)

#167 - Eliminate the double Chromium launch that OOMs machines with ~1.4 GB
free RAM. runLiveSelectorValidation now returns the open browser instead of
closing it; runSelectorDiscoveryPass returns Browser|null; e2e.ts reuses the
discovery browser for the main flow run, falling back to launchBrowser() only
when discovery was skipped. Also skip categoryLink discovery when plpUrlHint
is configured.

#168 - Fix spurious 'prod nao produziu captura da purchase-journey' in parity
e2e single-site mode. candFlows carries ALL flow captures (homepage, plp, pdp)
not only purchase-journey, so candFlows.length > 0 could be true even when no
purchase-journey capture exists. The single-site guard now checks
candFlows.some(f => f.flow === 'purchase-journey').

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
@JonasJesus42
JonasJesus42 merged commit 1336f73 into main Jul 29, 2026
1 check failed
JonasJesus42 added a commit that referenced this pull request Jul 29, 2026
…#170)

* fix(e2e): reuse discovery browser + fix single-site check detection (#167 #168)

#167 - Eliminate the double Chromium launch that OOMs machines with ~1.4 GB
free RAM. runLiveSelectorValidation now returns the open browser instead of
closing it; runSelectorDiscoveryPass returns Browser|null; e2e.ts reuses the
discovery browser for the main flow run, falling back to launchBrowser() only
when discovery was skipped. Also skip categoryLink discovery when plpUrlHint
is configured.

#168 - Fix spurious 'prod nao produziu captura da purchase-journey' in parity
e2e single-site mode. candFlows carries ALL flow captures (homepage, plp, pdp)
not only purchase-journey, so candFlows.length > 0 could be true even when no
purchase-journey capture exists. The single-site guard now checks
candFlows.some(f => f.flow === 'purchase-journey').

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>

* chore(publish): bump to 0.17.7 (#169)

* fix(ts): return null instead of undefined in runSelectorDiscoveryPass

---------

Co-authored-by: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

parity e2e hangs at browser launch (exit 144) on macOS with localhost

1 participant