The click handler returned on busy, which refresh() holds for the whole /api/board read, so a click during a poll did nothing and the sign-out test waited 5 s for a sign-out that was never asked for. The row 165 test's location.reload() from an evaluate let the next wait start on the old document, and the reload killed it.