Tuesday, April 21, 2026

Cover the approve and reject actions with automated tests

Cover the approve and reject actions with automated tests

Canadian Elite Volleyball Academy — Development Update • April 21, 2026

--- title: Cover the approve and reject actions with automated tests ---

Cover the approve and reject actions with automated tests

## What & Why The search and filter behavior in the pending coach connections panel is now fully tested (Task #110), but the Approve and Reject buttons are not covered by any automated test. Adding these tests would catch regressions in the mutation flow — for example, if clicking Approve fails to call the right API or fails to remove the item from the list.

## Done looks like - Vitest RTL test: clicking the Approve button calls PATCH with status "APPROVED" - Vitest RTL test: clicking the Reject button calls DELETE - After a successful mutation, the connection is removed from the list (cache invalidated) - Tests mock the fetch/mutation and verify the UI updates correctly

## Relevant files - (component under test — approve/reject mutations at lines 77–112) - (existing RTL tests to extend) - (existing E2E tests to extend)

Canadian Elite Volleyball Academy
elitevolleyball.training

No comments:

Post a Comment