feat: add manual browser testing for the built bundle - #954
Conversation
b4ca0ef to
184ea3f
Compare
graygilmore
left a comment
There was a problem hiding this comment.
🎩 went well couple of questions both here and in Slack
|
|
||
| ```bash | ||
| # 1. Install dependencies (if not already done) | ||
| pnpm install |
There was a problem hiding this comment.
Can we leverage dev instead? Or since it's a public repo we want to stay generic?
| pnpm install | |
| dev up |
There was a problem hiding this comment.
I agree leveraging dev would be helpful, I'll add dev support in the future as a separate PR
184ea3f to
0a28643
Compare
0a28643 to
2fea265
Compare
EvilGenius13
left a comment
There was a problem hiding this comment.
Thanks @kdaviduik, this seems like a helpful addition!
Quick note that I tophatted myself and due to port conflicts the server automatically adjusted to 8082 for me. Not sure if we want to be more loose on the info surrounding the ports or just say to use the server info that the terminal spits out on start up. (maybe dev up could solve this by outputting the final address to click aswell).
2fea265 to
78fc869
Compare
Adds test-manual/index.html that loads the locally built bundle (lib/buybutton.umd.js) and renders real buy buttons from live stores. This enables reviewers to verify changes don't break real-world rendering before merging. Key details: - Uses ShopifyBuy.UI.init() API (not onReady - that's buy-button-storefront wrapper) - Tests 3 components: product, collection, product from different store - Includes .catch() error handlers for visible failure feedback - Excluded from npm publish via .npmignore - Documents the difference between buy-button-js and buy-button-storefront APIs This is an interim solution until automated browser testing (Playwright/Vitest) is added. Co-Authored-By: Claude <noreply@anthropic.com> Co-authored-by: AI (Pi/GLM 5.2 Fast (Fireworks) [1m]) <noreply@pi.dev>
78fc869 to
4e65a9b
Compare
|
Thanks @EvilGenius13, good callout! Updated the places that mentioned a specific port in this PR. There is more work to do on that front as a separate PR (like updating the port in dev.yml for the open command) but that's out of scope for this PR and will be a follow up |

What
Adds
test-manual/index.htmlthat loads the locally built bundle (lib/buybutton.umd.js) instead of the CDN script and renders real buy buttons from live stores.Why
The unit test suite (794 tests) verifies component logic, but doesn't render actual buy buttons in a browser. This enables reviewers to:
This is especially important given the scale of changes we will be making to this package.
Interim Solution
This manual testing approach is an interim solution in the complete absence of automated browser testing. The codebase currently uses Testem/Mocha for unit tests only — no e2e or browser rendering tests exist.
Adding Playwright or Vitest now would complicate the ongoing modernization work (TypeScript migration, ESLint 9, browser targets). Once this stack lands and the foundation stabilizes, automated browser testing can be added as a follow-up:
This manual test page provides a foundation for future Playwright tests.
How to Use
Screen.Recording.2026-08-10.at.10.54.58.AM.mov
Tests Included