Skip to content

test: add Playwright coverage for token category set default flowΒ #16132

@Rahwulkumar

Description

@Rahwulkumar

Is your feature request related to a problem? Please describe.
tests/facility/settings/tokenCategory/ already has Playwright coverage for
token category create, edit, and list flows, but there is no coverage for the
Set as Default action on the token category detail page.

This leaves the default-selection flow untested even though it changes visible
UI state in both the detail and list views.

Describe the solution you'd like
Add a focused Playwright spec:

tests/facility/settings/tokenCategory/tokenCategoryDefault.spec.ts

The spec should:

  • create a token category within the test
  • open its detail page
  • click Set as Default
  • assert the Set as Default button is no longer visible on the detail page
  • navigate back to the token category list page
  • assert the selected token category row shows the Default badge

This flow should assert UI state changes rather than a success toast, because
the current Set as Default action invalidates queries and refreshes UI state
without showing a toast.

Describe alternatives you've considered

  • Expanding tokenCategoryList.spec.ts to include the default flow
  • Expanding tokenCategoryEdit.spec.ts to include the default flow

A separate spec is preferable because Set as Default is a distinct action on
the detail page and can remain an atomic PR.

Additional context
Relevant source files:

  • src/pages/Facility/settings/tokenCategory/TokenCategoryView.tsx
  • src/pages/Facility/settings/tokenCategory/TokenCategoryList.tsx
  • src/pages/Facility/settings/layout.tsx

Existing adjacent coverage:

  • tests/facility/settings/tokenCategory/tokenCategoryCreate.spec.ts
  • tests/facility/settings/tokenCategory/tokenCategoryEdit.spec.ts
  • tests/facility/settings/tokenCategory/tokenCategoryList.spec.ts

🚨 DO NOT EDIT BELOW THIS LINE 🚨

Instructions for Requesting Assignment:

To request assignment, please clearly outline your solution and timeline by commenting on the issue using the format below:

Describe your solution clearly:
Provide a detailed explanation of your proposed solution, including your approach, key implementation steps, and relevant examples or references. Mention any dependencies, assumptions, or risks you foresee that might affect your timeline or implementation.

Expected Timeline:

  • End date: [Expected submission date of a completed Pull Request]

Additional Context:
Include any other relevant context, links, screenshots, or resources that support your proposed solution.

🚨 Your assignment may be unassigned if there is no activity or progress within the stated timeline unless communicated clearly and agreed upon.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Status

    Triage

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions