Files
LivingDexTracker/tests/bdd/features/account-access.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

48 lines
1.5 KiB
Gherkin

Feature: Account access
As a trainer
I want secure access to my account
So that only I can update my collection
Scenario: Register a new account
Given I am a new visitor
When I register with valid account details
Then I am told to confirm my email
And a confirmation email is captured locally
Scenario: Sign in with valid credentials
Given I have a confirmed account
When I sign in with my credentials
Then I arrive at my Pokédex list
Scenario: Reject invalid credentials
Given I have a confirmed account
When I sign in with an incorrect password
Then I see a sign-in error
Scenario: Redirect an authenticated visitor
Given I am signed in
When I visit the public home page
Then I arrive at my Pokédex list
Scenario: Sign out
Given I am signed in
When I sign out
Then I return to the public home page
Scenario: Request a password reset
Given I have a confirmed account
When I request a password reset
Then a password reset email is captured locally
@product-review
Scenario: Reject mismatched replacement passwords
Given I am on the password reset page with a recovery session
When I enter two different replacement passwords
Then I am told that the passwords do not match
Scenario: Complete a password reset
Given I am on the password reset page with a recovery session
When I enter a valid replacement password
Then I am told that my password was updated