Lucky-Fetch

Testing

Automated checks

Run:

npm run lint
npm run typecheck
npm run test
npm run build
npm run package

The unit and mocked-Chromium suites cover interval conversion/validation, bounded-operation timeouts, remaining-time calculation, badge formatting, deterministic reload/scan alarm creation, matching and whitespace normalization, Found/Lost transition semantics, detection actions/history, state migration/corruption repair, maximum-count completion, lifecycle transitions, Reload Now semantics, all interaction decisions, typing protection, recovery planning, delayed scan generation handling, duplicate completion suppression, scan cancellation, detection notification suppression/focus, missing-alarm restoration, alarm execution, reload rejection, tab-specific badge clearing, Pause/Resume/Stop alarm behavior, and monitor reset.

Load the extension

  1. Run npm run build.
  2. Load dist/ as an unpacked extension in Chrome or Edge.
  3. After rebuilding, use the extension page’s Reload action before retesting.

Interaction test page

  1. Run npm run dev.
  2. Open http://localhost:5173/test-page/.
  3. Start a 10-second LuckyFetch monitor for that tab.
  4. The page shows a per-tab load counter and load time.
  5. Enter distinctive unsaved text before testing protection.

The page includes regular text, a scroll box, text input, textarea, select, contenteditable region, button, and visible event log.

Manual verification matrix

Basic lifecycle

Intervals and limits

Cache

Interaction

For each behavior, interact using pointer, keyboard, scrolling, form input, and editable focus:

With typing protection enabled, type through a reload deadline and confirm the unsaved text remains until at least five seconds after the final typing/input event. A merely focused input must not block forever.

Tab and navigation lifecycle

Badge and accessibility

Worker failure and recovery

Phase 2A + Phase 2B.1 keyword monitoring

Packaging check

Run npm run package, extract the ZIP from package-output/, and load the extracted directory as an unpacked extension. manifest.json must be at the ZIP root.