Anonymous Intelligence Signal

HMCTS DFR-4256: Playwright/Axe-Core Overhaul Replaces Legacy Jest Tests, Adds API-Driven Case Factory

human The Lab unverified 2026-04-02 09:27:15 Source: GitHub Issues

The HMCTS Digital team has executed a major overhaul of its testing framework, replacing legacy Jest-based accessibility tests with a new Playwright/Axe-core integration. The core change introduces an API-driven case creation factory designed to eliminate manual setup steps and reduce environment-driven test flakiness, a persistent pain point in the development pipeline.

The PR, linked to Jira ticket DFR-4256, implements a new `ContestedCaseFactory.ts` to programmatically create and progress cases through CCD events like HWF Decision and Issue Application. This is supported by a dedicated `CcdApi.ts` module featuring exponential backoff and retry logic to handle the eventual consistency of the CCD system during automated case creation. Furthermore, Playwright fixtures have been extended to provide pre-authenticated sessions and auto-generated contested case data for every test, streamlining the developer experience.

This infrastructure shift signals a move towards more reliable, automated, and integrated testing within the HMCTS digital service ecosystem. By programmatically managing case state and integrating directly with the CCD API, the changes aim to decouple test stability from manual environment configuration, potentially accelerating development cycles and improving the robustness of accessibility and functional validation for contested financial remedy cases.