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>
46 lines
1.6 KiB
Gherkin
46 lines
1.6 KiB
Gherkin
Feature: Dashboard
|
|
As a user I want to see an overview of my inventory at a glance.
|
|
|
|
Background:
|
|
Given I am on the "dashboard" page
|
|
|
|
Scenario: Empty state shows call-to-action
|
|
Given the inventory is empty
|
|
And I am on the "dashboard" page
|
|
Then I should see "No items yet"
|
|
And I should see "Add First Item"
|
|
And the page title should be "SolidHaus"
|
|
|
|
Scenario: Stats grid shows inventory summary
|
|
Given there are 5 items in the inventory
|
|
And I am on the "dashboard" page
|
|
Then I should see "Total Items"
|
|
And I should see "Checked Out"
|
|
And I should see "Overdue"
|
|
And I should see "Low Stock"
|
|
|
|
Scenario: Checked-out section appears when items are out
|
|
Given there is a checked-out item "Drill"
|
|
And I am on the "dashboard" page
|
|
Then I should see "Checked Out"
|
|
And I should see "Drill"
|
|
|
|
Scenario: Low-stock section appears for depleted consumables
|
|
Given there is a consumable item "Batteries" with 2 of 10 remaining
|
|
And I am on the "dashboard" page
|
|
Then I should see "Low Stock"
|
|
And I should see "Batteries"
|
|
|
|
Scenario: Recently updated items are shown
|
|
Given there are 3 items in the inventory
|
|
And I am on the "dashboard" page
|
|
Then I should see "Recently Updated"
|
|
|
|
Scenario: Navigation bar is visible and accessible
|
|
Then all nav buttons should be touch-target sized
|
|
And the bottom nav should be within the viewport
|
|
|
|
Scenario: Dashboard visual appearance
|
|
Given there are 3 items in the inventory
|
|
And I am on the "dashboard" page
|
|
Then the page should match the screenshot "dashboard-with-items"
|