kammer/e2e/features/flows/create-item.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

35 lines
1.2 KiB
Gherkin

Feature: Create Item Flow
As a user I want to create a new item and see it in my inventory.
Scenario: Create a basic durable item
Given the inventory is empty
And I am on the "new item" page
When I fill in "Name *" with "Electric Drill"
And I fill in "Category" with "Tools"
And I fill in "Brand" with "Bosch"
And I click the "Create Item" button
Then I should be on "/items/"
And I should see "Electric Drill"
And I should see "Tools"
Scenario: Created item appears in items list
Given the inventory is empty
And I am on the "new item" page
When I fill in "Name *" with "Hammer"
And I click the "Create Item" button
Then I should be on "/items/"
When I click "Back"
And I am on the "items" page
Then I should see "Hammer"
Scenario: Create a consumable with quantity tracking
Given the inventory is empty
And I am on the "new item" page
When I fill in "Name *" with "Printer Paper"
And I select "consumable" from "Type"
And I fill in "Current" with "8"
And I fill in "Original" with "10"
And I fill in "Unit" with "reams"
And I click the "Create Item" button
Then I should be on "/items/"
And I should see "Printer Paper"