Files
LivingDexTracker/tests/bdd/features/progress-tracking.feature
T
Josh Creek de39dc78ea test: replace ad-hoc tests with a layered suite and CI workflow
Splits testing into five layers so a failure points at the responsible one:

- tests/unit    isolated utility, repository and service tests
- tests/data    validates the tracked Pokémon, game, region and dex files
- tests/integration  schema, views, constraints, RLS and repositories
- tests/bdd     executable Gherkin for user-visible behaviour
- tests/build   service worker and manifest artifacts per build variant

Replaces the two Playwright specs in client-test/ and the two Vitest files in
test/. Adds a GitHub Actions workflow running the layers as separate jobs, a
mock OAuth provider server so the Drive and Dropbox scenarios never touch real
accounts, and a wrapper that reads the local Supabase keys from
`supabase status` rather than hard-coding them.

Extracts the pure formatting helpers out of PokedexExportService so they can be
unit tested, and makes the provider endpoints configurable so the mock server
can stand in for Google and Dropbox.
2026-09-13 17:38:41 +01:00

39 lines
1.3 KiB
Gherkin

Feature: Progress tracking
As a trainer
I want to record collection state
So that my Pokédex shows what remains
Background:
Given I am signed in
And I have a Living Dex named "Progress"
And I view the Pokédex
Scenario: Mark a Pokémon caught
When I mark the first Pokémon as caught
Then the first Pokémon is shown as caught after reloading
Scenario: Keep caught and needs-to-evolve mutually exclusive
When I mark the first Pokémon as caught
And I mark the first Pokémon as needing evolution
Then the first Pokémon needs evolution and is not marked caught
Scenario: Record HOME state and notes
When I mark the first Pokémon as in HOME
And I add the note "Caught, traded, and checked" to the first Pokémon
Then its HOME state and note persist after reloading
Scenario: Update an entire box
When I mark box 1 as caught
Then box 1 contains 30 caught Pokémon
Scenario: Filter collection progress
When I mark the first Pokémon as caught
And I filter to Pokémon that are not caught
Then the caught Pokémon is filtered out
Scenario: Remember box layout density
When I select the "Compact" box layout
And I reload the Pokédex
Then the "Compact" box layout remains selected