[Sheriff]: Fix a couple of flaky tests. [devtools/devtools-frontend : main]

0 views
Skip to first unread message

Finnur Thorarinsson (Gerrit)

unread,
Jul 3, 2026, 11:57:53 AM (yesterday) Jul 3
to Alex Rudenko, devtools-fro...@luci-project-accounts.iam.gserviceaccount.com, devtools-rev...@chromium.org
Attention needed from Alex Rudenko

Finnur Thorarinsson voted and added 3 comments

Votes added by Finnur Thorarinsson

Auto-Submit+1

3 comments

Patchset-level comments
File-level comment, Patchset 3 (Latest):
Finnur Thorarinsson . resolved

As I mentioned, I wrote a simple skill to fetch the flaky tests from the hotlist and try repro'ing, investigating and suggesting a fix. Here's the outcome for two of those. Please take a look and see if the fixes make sense.

File test/e2e/console/filter.test.ts
Line 18, Patchset 1 (Parent): await Promise.all([
Finnur Thorarinsson . resolved

This (and the next one) is an AI-suggested fix with the comment:

"This is a known anti-pattern in DevTools e2e tests because page navigations trigger `Main.targetNavigated` events that can reset or interrupt DevTools UI states (such as closing the Command Menu mid-keystroke)."

Do you agree?

File test/e2e/host/user-metrics.test.ts
Line 723, Patchset 1 (Parent): await devToolsPage.click('.link-swatch-link');
Finnur Thorarinsson . resolved

This one I managed to repro locally and after this AI suggested fix was unable to repro again (ran it 250 times).

"The test was using `devToolsPage.click('.link-swatch-link')`, which globally searches for the first matching element on the page. Due to asynchronous rendering, this sometimes matched the wrong swatch link, causing the subsequent event assertions to fail."

Open in Gerrit

Related details

Attention is currently required from:
  • Alex Rudenko
Submit Requirements:
  • requirement satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
  • requirement is not satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: devtools/devtools-frontend
Gerrit-Branch: main
Gerrit-Change-Id: Id46e07fc86728c8d8c901ac354f887f143b6fb91
Gerrit-Change-Number: 8040781
Gerrit-PatchSet: 3
Gerrit-Owner: Finnur Thorarinsson <fin...@chromium.org>
Gerrit-Reviewer: Alex Rudenko <alexr...@chromium.org>
Gerrit-Reviewer: Finnur Thorarinsson <fin...@chromium.org>
Gerrit-Attention: Alex Rudenko <alexr...@chromium.org>
Gerrit-Comment-Date: Fri, 03 Jul 2026 15:57:50 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
satisfied_requirement
unsatisfied_requirement
open
diffy
Reply all
Reply to author
Forward
0 new messages