Skip to content

Commit 38de683

Browse files
OrKoNDevtools-frontend LUCI CQ
authored andcommitted
Extract test steps from before hook
It allows flake exoneration and attribution of the test failure to a specific test. Bug: none Change-Id: I0ed588aab866dc0c0178daf867c7a5c5b8da8cee Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/6257652 Reviewed-by: Nikolay Vitkov <[email protected]> Auto-Submit: Alex Rudenko <[email protected]> Commit-Queue: Nikolay Vitkov <[email protected]>
1 parent b602c46 commit 38de683

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

test/e2e/performance/wasm/performance_profiling_test.ts

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ describe('The Performance panel', function() {
109109
this.timeout(20000);
110110
}
111111

112-
beforeEach(async () => {
112+
async function setupPerformancePanel() {
113113
await step('navigate to the Performance tab and upload performance profile', async () => {
114114
await navigateToPerformanceTab('wasm/profiling');
115115

@@ -122,9 +122,11 @@ describe('The Performance panel', function() {
122122
await step('search for "mainWasm"', async () => {
123123
await searchForWasmCall();
124124
});
125-
});
125+
}
126126

127127
it('is able to display the execution time for a wasm function', async () => {
128+
await setupPerformancePanel();
129+
128130
await step('check that the Summary tab shows more than zero total time for "mainWasm"', async () => {
129131
const totalTime = await getTotalTimeFromPie();
130132
assert.isAbove(totalTime, 0, 'mainWasm function execution time is displayed incorrectly');
@@ -135,6 +137,8 @@ describe('The Performance panel', function() {
135137
it.skipOnPlatforms(
136138
['mac'], '[crbug.com/1510890]: is able to inspect the call stack for a wasm function from the bottom up',
137139
async () => {
140+
await setupPerformancePanel();
141+
138142
const {frontend} = getBrowserAndPages();
139143
const expectedActivities = ['mainWasm', 'js-to-wasm::i', '(anonymous)', 'Run microtasks'];
140144

@@ -157,6 +161,8 @@ describe('The Performance panel', function() {
157161
// Flaky test
158162
it.skip(
159163
'[crbug.com/1510890]: is able to inspect the call stack for a wasm function from the call tree', async () => {
164+
await setupPerformancePanel();
165+
160166
const {frontend} = getBrowserAndPages();
161167
const expectedActivities = [
162168
'Run microtasks',

0 commit comments

Comments
 (0)