A page whose interactive parts were converted to a directive-based runtime, and an assertion that it still works with scripting disabled.
test('the filter form works without JavaScript', async ({ browser }) => {
const context = await browser.newContext({ javaScriptEnabled: false })
const page = await context.newPage()
await page.goto('/products')
await page.selectOption('#status', 'in-stock')
await page.click('button[type=submit]')
await expect(page).toHaveURL(/status=in-stock/)
await expect(page.locator('.product')).toHaveCount(12)
})
Progressive enhancement is a claim and this is the only thing that checks it, which is why the claim is usually false. The test also documents what the form is supposed to do without scripting — a full page load with a query string — which is a design decision that had never been written down anywhere.