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>
42 lines
1.4 KiB
Gherkin
42 lines
1.4 KiB
Gherkin
Feature: Items List
|
|
As a user I want to browse, search, and filter my inventory items.
|
|
|
|
Scenario: Empty inventory shows placeholder
|
|
Given the inventory is empty
|
|
And I am on the "items" page
|
|
Then I should see "No items yet"
|
|
|
|
Scenario: Items are listed with details
|
|
Given there is an item "Laptop" in category "Electronics"
|
|
And I am on the "items" page
|
|
Then I should see "Laptop"
|
|
And I should see "Electronics"
|
|
|
|
Scenario: Search filters items by name
|
|
Given there is an item "Laptop" in category "Electronics"
|
|
And there is an item "Toaster" in category "Kitchen"
|
|
And I am on the "items" page
|
|
When I type "Laptop" into the search field
|
|
Then I should see "Laptop"
|
|
And I should not see "Toaster"
|
|
|
|
Scenario: Item count is displayed
|
|
Given there are 5 items in the inventory
|
|
And I am on the "items" page
|
|
Then I should see "5 of 5 items"
|
|
|
|
Scenario: Filtered count reflects active filters
|
|
Given there is an item "Laptop" in category "Electronics"
|
|
And there is an item "Toaster" in category "Kitchen"
|
|
And I am on the "items" page
|
|
When I type "Laptop" into the search field
|
|
Then I should see "1 of 2 items"
|
|
|
|
Scenario: New item button is visible
|
|
Given I am on the "items" page
|
|
Then I should see "+ New"
|
|
|
|
Scenario: Items list visual appearance
|
|
Given there are 3 items in the inventory
|
|
And I am on the "items" page
|
|
Then the page should match the screenshot "items-list"
|