Reduce concurrency on frontend tests.
Currently our tests fail when attempting to run them locally. The reason
seems to be that, when concurrency is not set 1. All concurrently
running tests, except for 1. Have document.visibilityState === "hidden"
and document.hasFocus() === False. Which leads to failures with event
handling (and for the logic that directly interacts with the
visibilityState).
This is a temporary fix, which we will hopefully be able to remove once
the underlying issue is fixed in web-test-runner (or Chrome).
Google-Bug-Id: b/365565157
Release-Notes: skip
Change-Id: Id2d5534d46cd3fae8666b7159df2b18331ef2ffd
(cherry picked from commit e895c08185c6a427273af16a446a4d9bc3cda397)
diff --git a/polygerrit-ui/web-test-runner.config.mjs b/polygerrit-ui/web-test-runner.config.mjs
index 415571c..eb377d2 100644
--- a/polygerrit-ui/web-test-runner.config.mjs
+++ b/polygerrit-ui/web-test-runner.config.mjs
@@ -22,6 +22,9 @@
/** @type {import('@web/test-runner').TestRunnerConfig} */
const config = {
+ // TODO: https://g-issues.gerritcodereview.com/issues/365565157 - undo the
+ // change once the underlying issue is fixed.
+ concurrency: 1,
files: [
"app/**/*_test.{ts,js}",
"!**/node_modules/**/*",