Added a Playwright test reproducer for the known issue where the 'Show anyway' button fails to render in headless environments. The reproducer is located in `examples/reproducers/issue-moderation-ui/` and includes: - `repro.spec.ts`: The test script derived from `tests/visual/moderation.spec.ts` with failing assertions enabled. - `README.md`: Instructions on how to run the reproducer. - `playwright.config.ts`: Configuration to run the test in the reproducer context. This helps triage and verify fixes for the moderation UI visibility issue. Co-authored-by: PR0M3TH3AN <[email protected]>
Moderation UI Failure Reproducer
This reproducer demonstrates a known issue where the "Show anyway" button and related moderation badges fail to render or be interactable in the test environment (headless mode), despite logic indicating they should be present.
Issue Description
As noted in KNOWN_ISSUES.md:
Moderation UI (
tests/visual/moderation.spec.ts): The "Show anyway" button and related moderation badges fail to render in the test environment, causingtoBeVisible()assertions to fail. The logic for creating the button appears correct (allowOverrideis true), but the button element is not found in the DOM during the test execution.
How to Run
-
Ensure the project is built:
npm run build -
Run the reproducer test using the custom config (which sets the correct test directory and server context):
npx playwright test -c examples/reproducers/playwright.config.ts examples/reproducers/issue-moderation-ui/repro.spec.ts
Expected Output
The test should FAIL with timeout errors waiting for the "Show anyway" button to be visible or clickable.