File tree Expand file tree Collapse file tree
@react-native-windows/automation/src
__native_perf__/core/__perf_snapshots__ Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2727 perf-tests :
2828 name : Component Performance Tests
2929 runs-on : windows-latest
30- timeout-minutes : 30
30+ timeout-minutes : 60
3131
3232 permissions :
3333 contents : read
5252 - name : Build perf-testing package
5353 run : yarn workspace @react-native-windows/perf-testing build
5454
55+ # ── Build & Deploy RNTesterApp-Fabric (for native perf tests) ──
56+ - name : Build and deploy RNTesterApp-Fabric
57+ working-directory : packages/e2e-test-app-fabric
58+ run : yarn windows --release --no-launch --logging
59+
5560 # ── Run Tests ──────────────────────────────────────────
5661 - name : Run perf tests
5762 id : perf-run
Original file line number Diff line number Diff line change @@ -209,16 +209,24 @@ export default class AutomationEnvironment extends NodeEnvironment {
209209 // Set up the "Desktop" or Root session
210210 const rootBrowser = await webdriverio . remote ( this . rootWebDriverOptions ) ;
211211
212- // Get the list of windows
213- const allWindows = await rootBrowser . $$ ( '//Window' ) ;
214-
215- // Find our target window
212+ // Poll for the app window with timeout (cold starts can be slow)
213+ const windowTimeout = 300000 ; // 5 minutes
214+ const pollInterval = 2000 ;
215+ const deadline = Date . now ( ) + windowTimeout ;
216216 let appWindow : webdriverio . Element | undefined ;
217- for ( const window of allWindows ) {
218- if ( ( await window . getAttribute ( 'Name' ) ) === appName ) {
219- appWindow = window ;
217+
218+ while ( Date . now ( ) < deadline ) {
219+ const allWindows = await rootBrowser . $$ ( '//Window' ) ;
220+ for ( const window of allWindows ) {
221+ if ( ( await window . getAttribute ( 'Name' ) ) === appName ) {
222+ appWindow = window ;
223+ break ;
224+ }
225+ }
226+ if ( appWindow ) {
220227 break ;
221228 }
229+ await new Promise ( resolve => setTimeout ( resolve , pollInterval ) ) ;
222230 }
223231
224232 if ( ! appWindow ) {
Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ const DEFAULT_WARMUP = 2;
2323
2424export async function navigateToBenchmarkPage ( ) : Promise < void > {
2525 const componentsTab = await app . findElementByTestID ( 'components-tab' ) ;
26- await componentsTab . waitForDisplayed ( { timeout : 60000 } ) ;
26+ await componentsTab . waitForDisplayed ( { timeout : 120000 } ) ;
2727
2828 await goToComponentExample ( 'Native Perf Benchmark' ) ;
2929}
You can’t perform that action at this time.
0 commit comments