kammer/e2e/features/pages/item-new.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

37 lines
1.1 KiB
Gherkin

Feature: New Item Form
As a user I want to create new inventory items.
Background:
Given I am on the "new item" page
Scenario: Form displays all required fields
Then I should see "New Item"
And I should see "Name *"
And I should see "Type"
And I should see "Create Item"
Scenario: Submit button disabled without name
Then the page should match the screenshot "new-item-empty"
Scenario: Cancel returns to items list
When I click the "Cancel" button
Then I should be on "/items"
Scenario: Consumable type shows quantity fields
When I select "consumable" from "Type"
Then I should see "Quantity Tracking"
And I should see "Current"
And I should see "Original"
Scenario: Perishable type shows expiry date
When I select "perishable" from "Type"
Then I should see "Expiry Date"
Scenario: Durable type hides quantity fields
When I select "durable" from "Type"
Then I should not see "Quantity Tracking"
Scenario: Storage tier buttons are visible
Then I should see "Hot"
And I should see "Warm"
And I should see "Cold"