Skip to content

Commit c467307

Browse files
OrKoNDevtools-frontend LUCI CQ
authored andcommitted
Fix flaky tests
No-Tree-Checks: True Bug: 361078921 Change-Id: Icbd326006353d5a1891cb0a63d6f05120e208b5f Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/6252741 Reviewed-by: Nikolay Vitkov <[email protected]> Auto-Submit: Alex Rudenko <[email protected]> Commit-Queue: Alex Rudenko <[email protected]>
1 parent 8b09856 commit c467307

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

test/e2e/helpers/performance-helpers.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,8 @@ export async function searchForComponent(frontend: puppeteer.Page, searchEntry:
9696
await frontend.keyboard.press('Tab');
9797
// TODO: it should actually wait for rendering to finish.
9898
await drainFrontendTaskQueue();
99+
await drainFrontendTaskQueue();
100+
await drainFrontendTaskQueue();
99101
await expectVeEvents([
100102
veKeyDown(''),
101103
veImpressionsUnder('Panel: timeline', [veImpression(

test/e2e/helpers/quick_open-helpers.ts

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,15 @@
22
// Use of this source code is governed by a BSD-style license that can be
33
// found in the LICENSE file.
44

5-
import {$$, click, getBrowserAndPages, platform, typeText, waitFor} from '../../shared/helper.js';
5+
import {
6+
$$,
7+
click,
8+
drainFrontendTaskQueue,
9+
getBrowserAndPages,
10+
platform,
11+
typeText,
12+
waitFor
13+
} from '../../shared/helper.js';
614

715
import {SourceFileEvents, waitForSourceFiles} from './sources-helpers.js';
816

@@ -77,6 +85,8 @@ export async function runCommandWithQuickOpen(command: string): Promise<void> {
7785
const {frontend} = getBrowserAndPages();
7886
await openCommandMenu();
7987
await frontend.keyboard.type(command);
88+
// TODO: it should actually wait for rendering to finish.
89+
await drainFrontendTaskQueue();
8090
await frontend.keyboard.press('Enter');
8191
}
8292

0 commit comments

Comments
 (0)