mirror of
https://github.com/microsoft/playwright.git
synced 2025-06-26 21:40:17 +00:00

It's not possible to calculate the total test duration of the tests in the UI, since our `msToString` function is lossy. This patch unflakes the [test](https://github.com/microsoft/playwright/actions/runs/6183832112/job/16787806162?pr=27074#step:7:254) when it took longer than a second to start, by writing the test-ids to the DOM, getting them into the Node.js process, and calculating their test duration sum based on the JSON report. Drive-by: I found a bug that we used the JSON report from the main test-runner process rather than from the merge process, so the test IDs were still old. (Without that change the `useIntermediateMergeReport` tests were not passing.