Add browser tests for editing and deleting users #57

Open
opened 2026-08-18 23:53:34 +02:00 by myrmidex · 0 comments
Owner

Gap

tests/Browser/Users/ contains only CreateUserTest.php. The UsersList Livewire component exposes full CRUD — create, store, edit, update, confirmDelete, delete, cancel — so edit and delete are untested in a browser.

Delete goes through a confirmation modal (confirmDeletedelete, with cancel), which is exactly the kind of multi-step Livewire interaction that feature tests do not fully exercise.

Compare tests/Browser/Dishes/, which has 6 tests including DeleteDishTest and DishDeletionSafetyTest — users deserve the same treatment.

Scope

In tests/Browser/Users/:

  • Edit: open the edit form, change a name, save, see the row update
  • Edit validation: invalid input shows errors, record unchanged
  • Delete: confirmation modal appears, confirming removes the row
  • Cancel: dismissing the modal leaves the user intact

Consider whether deleting a user with scheduled dishes needs a safety test, mirroring DishDeletionSafetyTest.

Blocked by #54

Write in Pest browser syntax after the Dusk → Pest migration.

Acceptance

  • Edit success and validation covered
  • Delete confirmation and cancel covered
  • Green in CI
## Gap `tests/Browser/Users/` contains only `CreateUserTest.php`. The `UsersList` Livewire component exposes full CRUD — `create`, `store`, `edit`, `update`, `confirmDelete`, `delete`, `cancel` — so edit and delete are untested in a browser. Delete goes through a confirmation modal (`confirmDelete` → `delete`, with `cancel`), which is exactly the kind of multi-step Livewire interaction that feature tests do not fully exercise. Compare `tests/Browser/Dishes/`, which has 6 tests including `DeleteDishTest` and `DishDeletionSafetyTest` — users deserve the same treatment. ## Scope In `tests/Browser/Users/`: - **Edit**: open the edit form, change a name, save, see the row update - **Edit validation**: invalid input shows errors, record unchanged - **Delete**: confirmation modal appears, confirming removes the row - **Cancel**: dismissing the modal leaves the user intact Consider whether deleting a user with scheduled dishes needs a safety test, mirroring `DishDeletionSafetyTest`. ## Blocked by #54 Write in Pest browser syntax after the Dusk → Pest migration. ## Acceptance - [ ] Edit success and validation covered - [ ] Delete confirmation and cancel covered - [ ] Green in CI
myrmidex added this to the v0.9.0 milestone 2026-08-18 23:53:34 +02:00
myrmidex added the
testing
label 2026-08-18 23:53:34 +02:00
myrmidex added a new dependency 2026-08-18 23:54:12 +02:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference: lvl0/dishplanner#57
No description provided.