Skip to content

test(SDK-553): add PolicyList integration tests#1414

Draft
krisxcrash wants to merge 1 commit intokw/feat/sdk-553-policy-list-functionalfrom
kw/test/sdk-553-policy-list-tests
Draft

test(SDK-553): add PolicyList integration tests#1414
krisxcrash wants to merge 1 commit intokw/feat/sdk-553-policy-list-functionalfrom
kw/test/sdk-553-policy-list-tests

Conversation

@krisxcrash
Copy link
Copy Markdown
Contributor

@krisxcrash krisxcrash commented Mar 30, 2026

Summary

  • Adds integration tests for the PolicyList functional component using MSW and renderWithProviders

Changes

6 test cases covering:

  • Renders policies fetched from the API
  • Renders empty state when no policies exist
  • Fires TIME_OFF_CREATE_POLICY event on "Create policy" click
  • Shows "Finish setup" button for incomplete policies
  • Fires TIME_OFF_VIEW_POLICY with correct { policyId, policyType } payload on "Finish setup" click
  • Opens delete confirmation dialog from the overflow menu

Related

Testing

npm run test -- --run src/components/TimeOff/PolicyList/PolicyList.test.tsx

@krisxcrash krisxcrash marked this pull request as draft March 30, 2026 20:44
@krisxcrash krisxcrash self-assigned this Mar 30, 2026
@krisxcrash krisxcrash force-pushed the kw/feat/sdk-553-policy-list-functional branch from a4110ff to 8a68f32 Compare March 30, 2026 20:46
Tests cover: rendering policies from API, empty state, create policy
event, finish setup button visibility and event payload, and delete
confirmation dialog via overflow menu.

Made-with: Cursor
@krisxcrash krisxcrash force-pushed the kw/test/sdk-553-policy-list-tests branch from 14f255b to e816471 Compare March 30, 2026 20:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant