@@ -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