Files
puter/src/puter-js/tests/e2e
Neal ShahandClaude Opus 5.5 237ff84cc5 feat(hosting): sites list their custom domains, and hosting.detach() removes them (#4651)
* feat(hosting): sites list their custom domains, attach names a moved domain's old site, and hosting.detach() removes domains

- puter-subdomains read/select return `custom_domains` ({ uuid, hostname,
  status }) per site, filled by a `site.customDomains` event listener. Only
  rows attached under the site's current owner count; the field is left out
  when the listener fails, so a failed lookup never reads as "no domains".
- The attach dialog's answer carries `previousSite` when the user moved the
  domain from another site, kept through a status check or switch to www.
- puter.hosting.detach(subdomain) opens the custom domain dialog in a
  remove-only mode (desktop message, frame, or popup) and resolves the
  domains the user removed, or []. Desktops advertise it as
  `custom-domains-detach`; older ones reject with not_supported.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* test(workers): expect the sandbox-owner message create() throws now

create() rejects another user's sandbox app with "The sandbox app '…'
belongs to another user…" since the workers name-cap fix; the deploy test
still expected the old wording and failed on main.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-15 21:02:07 -05:00
..
…

puter-js end-to-end tests

See ../../TESTING.md for the full guide: setup, how to set the admin password, how to run the tests, how it all works, and how to add new tests.

TL;DR

# one-time setup
cp tests/e2e/.env.example tests/e2e/.env
$EDITOR tests/e2e/.env   # set PUTER_ADMIN_PASSWORD from the npm start banner

# run
npm run test:e2e             # headless
npm run test:e2e:headed      # watch the browser
npm run test:e2e:record      # save video for every test