We have some code that uses visibilityState for reporting etc.
When we upgraded our tests from Chrome 120 to 128/129, they started to fail and timeout, showing visibilityState surprisingly becomes "hidden" and likewise our focus/blur event get stopped causing additional failures.
We found that forcing serial tests fixed this issue, but of course we would prefer to keep the concurrency for speed.
I made a simple reproduction with code like this in a click handler:
if (document.visibilityState === "visible") {
this.count++;
}
and some tests that click the button and assert the count increase. The tests only pass with concurrency=1, but it used to work.
We have some code that uses visibilityState for reporting etc. When we upgraded our tests from Chrome 120 to 128/129, they started to fail and timeout, showing visibilityState surprisingly becomes "hidden" and likewise our focus/blur event get stopped causing additional failures. We found that forcing serial tests fixed this issue, but of course we would prefer to keep the concurrency for speed.
I made a simple reproduction with code like this in a click handler:
and some tests that click the button and assert the count increase. The tests only pass with concurrency=1, but it used to work.