Merge pull request #20126 from timvandermeij/fix-intermittents-chrome

Implement a delay for Chrome protocol calls in the integration tests, and skip the "must check that an existing highlight is ignored on hovering" integration test on Windows
This commit is contained in:
Tim van der Meij 2025-08-15 19:34:13 +02:00 committed by GitHub
commit 5adff6a2e2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 14 additions and 0 deletions

View File

@ -1853,6 +1853,12 @@ describe("Highlight Editor", () => {
it("must check that an existing highlight is ignored on hovering", async () => {
await Promise.all(
pages.map(async ([browserName, page]) => {
if (navigator.platform.includes("Win")) {
// Skip the test on Windows because it permafails.
// TODO: Remove this check once #20136 is fixed.
return;
}
await switchToHighlight(page);
const rect = await getSpanRectFromText(

View File

@ -910,6 +910,14 @@ async function startBrowser({
// crashes with timeouts or OOM if WebDriver BiDi is used (issue #17961).
options.protocol = "cdp";
// Slow down protocol calls by the given number of milliseconds. In Chrome
// protocol calls are faster than in Firefox and thus trigger in quicker
// succession. This can cause intermittent failures because new protocol
// calls can run before events triggered by the previous protocol calls had
// a chance to be processed (essentially causing events to get lost). This
// value gives Chrome a more similar execution speed as Firefox.
options.slowMo = 5;
// avoid crash
options.args = ["--no-sandbox", "--disable-setuid-sandbox"];
// silent printing in a pdf