Skip to content

Commit 36d8356

Browse files
Lightning00BladeDevtools-frontend LUCI CQ
authored andcommitted
[test] Fix more flaky reduction
Observed test flakiness regarding other test that use this method, on this method awaiting. Bug: none Change-Id: I7b286808def09f273d4464141d51e60a8d082739 Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/6257996 Auto-Submit: Nikolay Vitkov <[email protected]> Reviewed-by: Alex Rudenko <[email protected]> Commit-Queue: Nikolay Vitkov <[email protected]> Commit-Queue: Alex Rudenko <[email protected]>
1 parent 84b0fcc commit 36d8356

File tree

2 files changed

+5
-8
lines changed

2 files changed

+5
-8
lines changed

test/e2e/helpers/sources-helpers.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ import {
3131
waitForAria,
3232
waitForFunction,
3333
waitForFunctionWithTries,
34+
waitForNone,
3435
waitForVisible,
3536
} from '../../shared/helper.js';
3637

@@ -314,11 +315,10 @@ export async function disableInlineBreakpointForLine(line: number, index: number
314315
export async function checkBreakpointDidNotActivate() {
315316
await step('check that the script did not pause', async () => {
316317
// TODO(almuthanna): make sure this check happens at a point where the pause indicator appears if it was active
317-
const pauseIndicators = await $$(PAUSE_INDICATOR_SELECTOR);
318-
const breakpointIndicator = await Promise.all(pauseIndicators.map(elements => {
319-
return elements.evaluate(el => el.className);
320-
}));
321-
assert.lengthOf(breakpointIndicator, 0, 'script had been paused');
318+
319+
// TODO: it should actually wait for rendering to finish.
320+
await drainFrontendTaskQueue();
321+
await waitForNone(PAUSE_INDICATOR_SELECTOR);
322322
});
323323
}
324324

test/e2e/sources/debug-raw-wasm_test.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ import {assert} from 'chai';
77
import {
88
$,
99
click,
10-
drainFrontendTaskQueue,
1110
enableExperiment,
1211
getBrowserAndPages,
1312
goToResource,
@@ -503,8 +502,6 @@ describe('Sources Tab', function() {
503502
await waitFor(PAUSE_BUTTON);
504503
});
505504

506-
// TODO: it should actually wait for rendering to finish.
507-
await drainFrontendTaskQueue();
508505
await checkBreakpointDidNotActivate();
509506
});
510507
});

0 commit comments

Comments
 (0)