kammer/e2e/features/pages/item-detail.feature
Christopher Mühl 307ef24b78 test: E2E test suite + handoff documentation
50 Playwright E2E tests across 13 spec files covering all routes and
user flows (items CRUD, check-out/in, locations, labels, scanning,
search/filter). Uses vitest as runner with playwright-core for browser
automation (bun-compatible alternative to @playwright/test).

Includes Gherkin .feature files as living documentation, test support
infrastructure (IDB seeding, item factories, assertion helpers, layout
measurement), and HANDOFF.md covering project state, deployment, and
open design decisions.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-26 20:53:08 +01:00

53 lines
1.7 KiB
Gherkin

Feature: Item Detail
As a user I want to view and manage an individual item's details.
Scenario: Item details are displayed
Given there is an item "Drill" in category "Tools"
And I am on the "items" page
When I click "Drill"
Then I should see "Drill"
And I should see "Tools"
And I should see "Type"
And I should see "Storage Tier"
Scenario: Custody badge shows checked-in state
Given there is an item "Drill" in category "Tools"
And I am on the "items" page
When I click "Drill"
Then I should see "Home"
Scenario: Check out form appears on button click
Given there is an item "Drill" in category "Tools"
And I am on the "items" page
When I click "Drill"
And I click the "Check Out" button
Then I should see "Reason"
And I should see "Destination"
And I should see "Note"
Scenario: Edit button enters edit mode
Given there is an item "Drill" in category "Tools"
And I am on the "items" page
When I click "Drill"
And I click the "Edit" button
Then I should see "Edit Item"
And I should see "Save Changes"
Scenario: Delete requires confirmation
Given there is an item "Drill" in category "Tools"
And I am on the "items" page
When I click "Drill"
And I click the "Delete" button
Then I should see "Confirm Delete"
Scenario: Quantity bar shown for consumables
Given there is a consumable item "Coffee Beans" with 3 of 10 remaining
And I am on the "items" page
When I click "Coffee Beans"
Then I should see "Quantity"
And I should see "3"
Scenario: Item not found shows error
Given I navigate to "/items/nonexistent"
Then I should see "Item not found"
And I should see "Back to items"