Commit Graph
3 Commits
Author SHA1 Message Date
google-labs-jules[bot]andPR0M3TH3AN d59eec4653 Refactor tests/ui/uploadModal-reset.test.mjs to use beforeEach/afterEach
Refactored the test suite to use `beforeEach` for mocking `global.fetch` and `afterEach` for cleaning up `document.body`. This ensures that `fetch` is available for all tests and that DOM state (specifically elements with duplicate IDs) does not leak between tests, resolving `TypeError: Cannot read properties of null` failures in `UploadModal.bindEvents`.

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-01-27 20:53:29 +00:00
google-labs-jules[bot]andPR0M3TH3AN 3aafcf93d5 Fix nostr-tools bootstrapping, UploadModal zombie callbacks, and service error handling
- Add fallback mock to `js/nostrToolsBootstrap.js` for test environments.
- Add guards to `js/ui/components/UploadModal.js` to prevent stale state updates.
- Ensure service calls are awaited in `js/ui/tagPreferenceMenuController.js`.
- Fix `tests/ui/uploadModal-reset.test.mjs` setup and environment.

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-01-27 03:15:32 +00:00
google-labs-jules[bot] d4433fb886 fix(UploadModal): cancel and reset uploads on exit, preserve metadata 2026-01-25 21:24:01 +00:00