[daily-playwright] Add tests for Appointment Detail page - #16709
Draft
github-actions[bot] wants to merge 1 commit into
Draft
[daily-playwright] Add tests for Appointment Detail page#16709github-actions[bot] wants to merge 1 commit into
github-actions[bot] wants to merge 1 commit into
Conversation
- Add 8 test cases for appointment detail page - Test page load, status display, patient info card - Test actions menu, navigation, success alerts - Test scheduling details and tags display - Uses role-based selectors and web-first assertions - Gracefully handles missing appointment data
| @@ -0,0 +1,326 @@ | |||
| import { faker } from "@faker-js/faker"; | |||
| @@ -0,0 +1,326 @@ | |||
| import { faker } from "@faker-js/faker"; | |||
| import { expect, test } from "@playwright/test"; | |||
| import { format } from "date-fns"; | |||
Deploying care-preview with
|
| Latest commit: |
213c8a8
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://d1c63115.care-preview-a7w.pages.dev |
| Branch Preview URL: | https://daily-playwright-2026-08-18.care-preview-a7w.pages.dev |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds comprehensive Playwright E2E tests for the Appointment Detail page (
/facility/:facilityId/patient/:patientId/appointments/:appointmentId).What Was Tested
This PR adds 8 test cases covering the full appointment detail page functionality:
showSuccess=trueparamWhy This Matters
The appointment detail page is critical for:
Despite having 14 source files in the appointments feature, the detail page had zero test coverage before this PR.
Test Quality
✅ Follows all best practices:
getByRole,getByText, semantic attributes)toBeVisible,not.toContain)test.skip()How to Run Locally
Coverage Progress
Appointments Feature:
Overall Stats:
Tracking Issue
Part of incremental coverage improvement tracked in #16623
Test File Details
File:
tests/facility/appointments/appointmentDetail.spec.tsLines of Code: ~326 lines
Test Framework: Playwright with TypeScript
Auth State:
tests/.auth/user.json(admin user)Key Dependencies:
getFacilityId()fromtests/support/facilityIdgetPatientId()fromtests/support/patientIdfakerfor data generation (not used in this file but imported for consistency)Graceful Degradation:
All tests use
test.skip(!appointmentId, "No appointment available for testing")to gracefully skip when no appointments exist in the system, making the tests robust for different environment states.