Skip to content

Commit

Permalink
Fix flaky tests
Browse files Browse the repository at this point in the history
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 <nvitkov@chromium.org>
Auto-Submit: Alex Rudenko <alexrudenko@chromium.org>
Commit-Queue: Alex Rudenko <alexrudenko@chromium.org>
  • Loading branch information
OrKoN authored and Devtools-frontend LUCI CQ committed Feb 12, 2025
1 parent 8b09856 commit c467307
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
2 changes: 2 additions & 0 deletions test/e2e/helpers/performance-helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,8 @@ export async function searchForComponent(frontend: puppeteer.Page, searchEntry:
await frontend.keyboard.press('Tab');
// TODO: it should actually wait for rendering to finish.
await drainFrontendTaskQueue();
await drainFrontendTaskQueue();
await drainFrontendTaskQueue();
await expectVeEvents([
veKeyDown(''),
veImpressionsUnder('Panel: timeline', [veImpression(
Expand Down
12 changes: 11 additions & 1 deletion test/e2e/helpers/quick_open-helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,15 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

import {$$, click, getBrowserAndPages, platform, typeText, waitFor} from '../../shared/helper.js';
import {
$$,
click,
drainFrontendTaskQueue,
getBrowserAndPages,
platform,
typeText,
waitFor
} from '../../shared/helper.js';

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

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

Expand Down

0 comments on commit c467307

Please sign in to comment.