Commit Graph

41 Commits

Author SHA1 Message Date
Josh Creek 4af33709a3 test: make the suite's assertions falsifiable and its state isolated
Several assertions could not fail:

- "the catch update remains saved" was `caught.isChecked() || notes.includes(...)`
  shared by two scenarios, so either half satisfied both. Split into two steps
  that each assert the outcome their own scenario is about.
- The token-refresh check read a global counter with `> 0` and asserted an upload
  had happened `some(...)`, both already satisfied by the preceding scenario. It
  now asserts exactly one refresh, ordered before the upload.
- The box step ignored its box argument and asserted on the first N entries on
  the page; it now scopes to that box and checks its full contents.
- The filter step asserted on whichever entry was first after filtering; it now
  records the caught entry beforehand and names it, and checks the filter did not
  exclude everything.
- The empty-state precondition asserted emptiness instead of establishing it,
  which a fresh user satisfies for free.
- Offline coverage was `caches.keys().length > 0`. It now checks the precache
  contract: one workbox cache holding the shell and a revisioned web manifest,
  with _app/immutable assets cached without a revision query. The scenario that
  claimed to test a trailing slash did not; it is replaced with real offline
  client-side navigation.

The mock provider kept recorded requests, its refresh counter and the
fail-uploads switch in one process-wide object that only one step reset, so
scenario order was load-bearing and the failing-upload scenario poisoned
everything after it. An auto fixture now resets it per scenario, and the mock no
longer records its own control-plane calls. That reset is why the suite stays on
a single worker, which is now documented.

Coverage was gated at 90% per file over an allowlist of exactly the five files
that had tests, so new code was invisible to it permanently. It now measures all
of src/lib with global thresholds at the measured baseline, and no longer runs
the unit tests twice.

Also: a global teardown removes the users each run creates, the Supabase wrapper
distinguishes a stopped stack from a broken CLI call and detects an unseeded
database, the sign-in rate limit is raised above what one serial run needs, and
the integration suite no longer falls back to a hard-coded anon key that would
mask a misconfigured run.

The password-reset scenarios are renamed to what they actually cover: following a
real recovery link bounces to /signin, because the browser client persists no
cookies and so cannot keep the session it parses out of the URL. The helper for
the real flow is left in place and the gap is documented.
2026-09-13 17:38:42 +01:00
Josh Creek 7c32813cf2 fix: preserve default forms and complete dex mappings 2026-09-13 12:50:42 +01:00
Josh Creek 19e4d7b727 refactor(#91): Address PR comments 2026-06-16 15:46:12 +01:00
Josh Creek 8255fb4c67 fix(#91): correct form game coverage and fix canonical sort order 2026-06-16 15:28:07 +01:00
Josh Creek 069f7f41fa fix(data): add missing female form entries to pokemon_origin_games
Female Sneasel was absent from all 5 Gen 2 games (Gold, Silver, Crystal,
HeartGold, SoulSilver) and Female Indeedee was absent from Sword, despite
their base forms being present. Both found during QA of the form dex
game-scope feature.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-16 14:00:10 +01:00
Josh Creek 71cfbce7e3 feat(*): Add evolution data and notes 2026-01-25 17:19:51 +00:00
Josh Creek ab82f75dc6 feat(#89): Add backup functionality for google drive and dropbox 2026-01-24 13:32:10 +00:00
Josh Creek 3f5c14a8bc data(*): Add evolution info 2026-01-24 10:09:23 +00:00
Josh Creek e819929898 feat(#84): Improve data seeding performance 2026-01-19 12:17:40 +00:00
Josh Creek 6d54c93700 fix(*): Address PR comment 2026-01-18 13:38:22 +00:00
Josh Creek 07ce2b3421 fix(*): Address PR comment 2026-01-18 13:25:54 +00:00
Josh Creek eba34158fe data(*): Fix remaining sprites 2026-01-18 13:14:18 +00:00
Josh Creek 71df0de3df fix(*): Address PR comments 2026-01-18 10:41:12 +00:00
Josh Creek 46351c9af0 data(*): Add final data changes 2026-01-17 23:30:40 +00:00
Josh Creek 479b3ae7a0 data(*): Add native game dexes 2026-01-17 22:42:12 +00:00
Josh Creek a26f38bca1 data(*): Improve ordering of forms 2026-01-17 21:08:21 +00:00
Josh Creek f302721119 data(*): Add working regenerated data structure 2026-01-17 20:39:55 +00:00
Josh Creek ee73c01afe feat(*): Change how data is set up 2026-01-16 21:11:21 +00:00
Josh Creek 75f7161b7a fix(#64): Address PR feedback 2026-01-10 19:25:29 +00:00
Josh Creek 5657c2b2ab fix(#64): Address PR comments 2026-01-10 18:45:57 +00:00
Josh Creek f17b350e4e fix(#64): Address PR comments 2026-01-10 18:27:01 +00:00
Josh Creek 68cc2a0712 fix(#64): Address PR comments 2026-01-10 17:06:52 +00:00
Josh Creek 7c68d121ce fix(#64): Address PR comments 2026-01-10 16:27:23 +00:00
Josh Creek adc96baa90 feat(#64): Improve the about page 2026-01-10 15:27:00 +00:00
Josh Creek fb8dbdda3e fix(*): Fix migration issue 2026-01-10 13:26:09 +00:00
Josh Creek 070604fb89 fix(#56): Address PR comments 2026-01-10 12:47:27 +00:00
Josh Creek b30be24fd5 feat(#56): Address PR comments 2026-01-10 12:37:43 +00:00
Josh Creek b1b6e63b6f refactor(#56): Improve how the dex updating is handled and the error messaging around it 2026-01-10 12:07:05 +00:00
Josh Creek 07af29e6e6 chore(#67): Address pr comments 2026-01-09 18:45:47 +00:00
Josh Creek 28bb39d558 feat(*): Add improvements to the UX and the data seeding 2026-01-07 20:13:07 +00:00
Josh Creek b9a49686c1 refactor(*): Implement CSV-based seeding, dynamic box placement, and enforce forms from pokedex configuration 2026-01-05 09:44:15 +00:00
Josh Creek 19a571e315 feat(#67): Add support for multiple pokedexes per user 2026-01-04 22:06:36 +00:00
Josh Creek 0e2d7f7792 fix(#69): Use service role key for seeding 2026-01-02 20:35:38 +00:00
Josh Creek 78c3230b92 fix(#69): Set correct urls for local supabase 2026-01-02 20:17:33 +00:00
Josh Creek 2f5c0d68be feat(#69): Improve seeding process 2026-01-02 20:17:13 +00:00
Josh Creek 5b7fe52dc4 Merge branch 'chore/migrate-from-mongodb' of https://github.com/jcreek/LivingDexTracker into chore/migrate-from-mongodb 2025-07-26 22:35:04 +01:00
Josh Creek 8459ecf3fe fix(*): Resolve protocol mismatch 2025-07-26 22:13:01 +01:00
Josh Creek dd31a8d040 Update supabase/config.toml 2025-07-26 22:09:35 +01:00
Josh Creek 389f73d164 chore(*): Clean up migration artifacts and optimize data repository queries 2025-07-26 21:50:54 +01:00
Josh Creek fa38fa69ca refactor(*):Address PR comments 2025-07-26 19:42:04 +01:00
Josh Creek bc9ce84615 feat(*): Migrate from MongoDB to unified Supabase PostgreSQL architecture 2025-07-26 18:50:05 +01:00