Files
andris-carservice/aidoit-tests.md
T
Hermes f7a9906add
Build and publish images / docker (push) Canceled after 0s
carservice: initial commit
2026-07-20 20:51:23 +01:00

37 lines
5.5 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Regression test plan
- Dashboard search + clear: type a reg/owner in the dashboard search box → matching open orders shown with no console errors; click the × clear button → search resets and all open orders shown.
- Dashboard order card layout: open order cards split header link from status area; `order-card-progress-{id}` contains "No tasks added yet." or "X/Y done"; `order-card-status-{id}` contains "No tasks"/"All tasks done"/"N open"; Close button is full-width below.
- Quick task with parts and pricing: create a quick task with default labor hours/rate and a template part (e.g., oil filter); add it to an order → task appears with the part and pricing populated; order total updates.
- Private task parts stay private: create a quick task with a non-global part; the part does not appear in the global Parts library unless explicitly marked global.
- Order task edit with multiple template parts: add a quick task that requires oil (litres) and an oil filter; both parts appear under the task and count toward the total.
- Car detail shows performed tasks: each recent order card on /cars/[id] lists the task titles with status indicators (finished or open).
- Parts library table: /parts page renders a `<table data-testid="parts-table">` with `<tr data-testid="part-row-{id}">` rows, name, manufacturer, price, supplier link and delete action for each saved part.
- New order with lookup: enter a reg on /orders/new, click Look up → car created/loaded; create order → redirected to order detail with car/owner data.
- New order from car page: on /cars/[id] click New order → order created for that car and redirect to order detail (no reg lookup form).
- ROI reg lookup: enter an Irish reg on /orders/new, click Look up → year parsed from the reg and pre-filled.
- Add quick task: in order detail click Add task, pick from quick list or type custom → Add button enabled and task appears after save.
- Finish task: click the circle/check icon on a to-do task → task turns green and shows finished date/time.
- Attach parts and price: edit a task, select saved parts, set hours/rate → price updates; order total updates.
- Print by day/range: open order print, choose day or range and include/exclude prices → printed document lists car, owner, completed tasks and totals.
- Car history bundles + print: on /cars/[id]/history, tasks are grouped by title with a count; click a bundle to expand/collapse; prices are not shown; click Print → opens clean /cars/[id]/history/print page where tasks are still bundled and no prices appear.
- Car search: on /cars, search by reg or owner → matching cars and their service history shown.
- Car edit/delete: on /cars/[id] click Edit, change a field, Save → updated details shown; click Delete, confirm → car removed and redirected to Dashboard (/).
- Cars list click: click a car row on /cars → navigated to that car detail page.
- Parts scrape: on /parts, enter supplier URL, click Scrape → name/manufacturer populated if page parseable; save persists part.
# Regression test plan
- Dashboard search + clear: type a reg/owner in the dashboard search box (data-testid=dashboard-search) → matching open orders shown (data-testid=order-card-{id}) with no 404 console errors; click the × clear button (data-testid=dashboard-search-clear) → search resets and all open orders shown.
- New order with lookup: enter a reg on /orders/new (#reg-input), click Look up (data-testid=lookup-button) → car details form appears (data-testid=car-details-form); click Create order (data-testid=create-order-button) → redirected to order detail with car/owner data.
- New order from car page: on /cars/[id] click New order (data-testid=car-new-order-button) → creates order and redirects to order detail.
- ROI reg lookup: on /orders/new, enter an Irish reg (e.g. 191D12345) and click Look up → year notice (data-testid=year-prefill-notice) appears and year input is filled.
- Add quick task: on /orders/[id] click Add task (data-testid=show-add-task), type or pick a quick task, click Add task (data-testid=add-task-button) → task appears in list.
- Finish task: on /orders/[id] click the toggle circle (data-testid=task-toggle-{id}) → task marked finished, order total updates, all done highlights Close order green (data-testid=close-order-button).
- Attach parts and price: on /orders/[id] click edit (data-testid=task-edit-{id}), set labour hours/rate (data-testid=task-labor-hours / task-hourly-rate), pick parts and qty, click Save (data-testid=task-edit-save) → price recalculated and saved.
- Print by day/range: on /orders/[id] click Print (data-testid=order-print-button), choose day or range, confirm → print page opens.
- Car history bundles + print: on /cars/[id] click History (data-testid=car-history-link), view bundled tasks; click Print → printable history page opens.
- Car search on /cars: type in the search box (data-testid=car-search) → matching car cards shown (data-testid=car-card-{id}).
- Car edit/delete: on /cars/[id] click Edit (data-testid=car-edit-button), change a field (data-testid=car-*-input), click Save (data-testid=car-edit-save) → saved; click Delete (data-testid=car-delete-button) → car removed.
- Cars list click navigation: on /cars click a car card (data-testid=car-card-{id}) → navigates to /cars/{id}.
- Parts scrape: on /parts click Add part (data-testid=parts-add-button), paste a URL (data-testid=scrape-url-input), click Scrape (data-testid=scrape-button) → name/manufacturer/price populated, click Add (data-testid=part-modal-save) → saved to library.