Files
LivingDexTracker/tests/bdd/features/pokedex-lifecycle.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

58 lines
1.9 KiB
Gherkin

Feature: Pokédex lifecycle
As a trainer
I want to configure and manage Pokédexes
So that each collection matches my goal
Background:
Given I am signed in
Scenario: See the empty state
Given I have no Pokédexes
When I visit my Pokédex list
Then I see the empty Pokédex message
Scenario: Validate a new Pokédex
When I open the new Pokédex form
Then I cannot create a Pokédex without a name and type
Scenario Outline: Create each supported Pokédex type
When I create a Pokédex named "<name>" of type "<type>"
Then the Pokédex "<name>" is available to view
Examples:
| name | type |
| Living | Living Dex |
| Shiny | Shiny Dex |
| Origin | Origin Dex |
| Every Form | Form Dex |
Scenario: Create a game and dex scoped Pokédex
When I create a Living Dex named "Black Regional" scoped to game "Black" and dex "Unova"
Then the Pokédex "Black Regional" is available to view
Scenario: Reject a duplicate name
Given I have a Living Dex named "My Collection"
When I try to create another Living Dex named "My Collection"
Then I am told that the Pokédex name is already used
Scenario: Edit a Pokédex
Given I have a Living Dex named "Before Editing"
When I rename it to "After Editing" and enable forms
Then the Pokédex "After Editing" is available to view
Scenario: Cancel deleting a Pokédex
Given I have a Living Dex named "Keep Me"
When I cancel deleting "Keep Me"
Then the Pokédex "Keep Me" is available to view
Scenario: Delete a Pokédex
Given I have a Living Dex named "Delete Me"
When I confirm deleting "Delete Me"
Then the Pokédex "Delete Me" is no longer listed
Scenario: Keep another user's Pokédex private
Given another trainer has a Pokédex
When I request the other trainer's Pokédex
Then the Pokédex is not disclosed