Skip to content

[daily-playwright] Add tests for Appointments page - #16811

Closed
github-actions[bot] wants to merge 1 commit into
developfrom
daily-playwright/2026-09-14-9c5cd0a17dbc1835
Closed

github-actions[bot] wants to merge 1 commit into
developfrom
daily-playwright/2026-09-14-9c5cd0a17dbc1835

Conversation

@github-actions

@github-actions github-actions Bot commented Sep 14, 2026

Copy link
Copy Markdown

https://entire.io/gh/ohcnetwork/care_fe/trails/3

Overview

Added comprehensive E2E test coverage for the Appointments page, which was previously completely untested (0 tests).

What's being tested

  • 10 test cases covering core Appointments functionality:
    1. Page load with header and filters
    2. Board view display (default view)
    3. View switching (board ↔ table)
    4. Status filter options
    5. Date filter handling
    6. Appointment list or empty state
    7. Responsive mobile layout
    8. Filter state persistence
    9. Navigation structure
    10. Graceful error handling

Test approach

  • User role: Facility admin (facilityAdmin.json auth state)
  • Selectors: Role-based (getByRole, getByLabel, getByText) with graceful fallbacks
  • Patterns: Follows existing test patterns from facility/services tests
  • Resilience: Uses isVisible() checks with timeouts; tests don't assume specific content

Run tests locally

# Run just the new tests
npx playwright test tests/appointments/appointments.spec.ts

# Run with UI mode for debugging
npx playwright test tests/appointments/appointments.spec.ts --ui

Coverage impact

  • New test file: tests/appointments/appointments.spec.ts (181 lines)
  • Test count: +10 tests (97 → 107 total files)
  • Coverage gap closed: Appointments page now has foundational test coverage

Related tracking

Closes #16803 (Daily Playwright Test Coverage Tracker)

Next priorities for future runs:

  • PublicAppointments (patient-facing booking flow)
  • Scheduling (internal schedule management)
  • Patient page core workflows

Generated by Daily Playwright Test Improver

AI generated by Daily Playwright Test Improver

- 10 comprehensive test cases covering Appointments page functionality
- Tests cover: page load, view switching, filtering, responsive design
- Uses established patterns from existing facility/service tests
- Graceful fallbacks for optional UI elements
- Follows role-based selector best practices

Closes: #16803
Component: Appointments/AppointmentsPage.tsx
@github-actions github-actions Bot added enhancement New feature or request testing labels Sep 14, 2026
@coderabbitai

coderabbitai Bot commented Sep 14, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Bot user detected.

To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: ASSERTIVE

Plan: Advanced

Run ID: 863cbee5-b64b-4ee5-952f-23be687fc69b

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Comment @coderabbitai help to get the list of available commands.

@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying care-preview with  Cloudflare Pages  Cloudflare Pages

Latest commit: adfff4f
Status: ✅  Deploy successful!
Preview URL: https://35b20e59.care-preview-a7w.pages.dev
Branch Preview URL: https://daily-playwright-2026-09-14.care-preview-a7w.pages.dev

View logs

await page.waitForTimeout(500);

// Verify we're in table view (look for table element)
const table = page.locator("table");
await page.waitForTimeout(1000);

// Get initial state of page title/content
const initialContent = await page.locator("main, [role='main']").innerHTML();
@github-actions github-actions Bot added the stale label Sep 21, 2026
@Jacobjeevan

Copy link
Copy Markdown
Contributor

Closing as part of resetting the daily Playwright workflow: its open PRs overlapped heavily and were written under older authoring rules. The reworked workflow will pick this area up again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request stale testing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant