441
await waitForAll([
442
'Suspend [Page Two]',
443
'Loading...',
444
+ ...(gate('enableSiblingPrerendering') ? ['Suspend [Page Two]'] : []),
445
'onTransitionStart(page transition, 1000)',
446
'onTransitionProgress(page transition, 1000, 2000, [suspense page])',
447
]);
532
await waitForAll([
533
'Suspend [Page Two]',
534
'Loading...',
535
+ ...(gate('enableSiblingPrerendering') ? ['Suspend [Page Two]'] : []),
536
'onTransitionStart(page transition, 1000)',
537
'onTransitionProgress(page transition, 1000, 1000, [suspense page])',
538
]);
551
'Suspend [Show Text]',
552
'Show Text Loading...',
553
'Page Two',
554
+ ...(gate('enableSiblingPrerendering') ? ['Suspend [Show Text]'] : []),
555
'onTransitionStart(text transition, 2000)',
556
'onTransitionProgress(text transition, 2000, 2000, [show text])',
557
]);
641
await waitForAll([
642
'Suspend [Page Two]',
643
'Loading...',
644
+ ...(gate('enableSiblingPrerendering') ? ['Suspend [Page Two]'] : []),
645
'onTransitionStart(page transition, 1000)',
646
'onTransitionProgress(page transition, 1000, 2000, [suspense page])',
647
]);
655
'Show Text Loading...',
656
'Suspend [Page Two]',
657
'Loading...',
658
+ ...(gate('enableSiblingPrerendering')
659
+ ? ['Suspend [Show Text]', 'Suspend [Page Two]']
660
+ : []),
661
'onTransitionStart(show text, 2000)',
662
'onTransitionProgress(show text, 2000, 2000, [show text])',
663
]);
760
await waitForAll([
761
'Suspend [Page Two]',
762
'Loading...',
763
+ ...(gate('enableSiblingPrerendering')
764
+ ? [
765
+ 'Suspend [Page Two]',
766
+ 'Suspend [Show Text One]',
767
+ 'Show Text One Loading...',
768
+ 'Suspend [Show Text Two]',
769
+ 'Show Text Two Loading...',
770
+ ]
771
+ : []),
772
'onTransitionStart(page transition, 1000)',
773
'onTransitionProgress(page transition, 1000, 2000, [suspense page])',
774
]);
783
'Show Text One Loading...',
784
'Suspend [Show Text Two]',
785
'Show Text Two Loading...',
786
+ ...(gate('enableSiblingPrerendering')
787
+ ? ['Suspend [Show Text One]', 'Suspend [Show Text Two]']
788
+ : []),
789
'onTransitionProgress(page transition, 1000, 3000, [show text one, show text two])',
790
]);
791
898
await waitForAll([
899
'Suspend [Page Two]',
900
'Loading...',
901
+ ...(gate('enableSiblingPrerendering')
902
+ ? [
903
+ 'Suspend [Page Two]',
904
+ 'Suspend [Show Text One]',
905
+ 'Show Text One Loading...',
906
+ 'Suspend [Show Text]',
907
+ 'Show Text Loading...',
908
+ ]
909
+ : []),
910
'onTransitionStart(navigate, 1000)',
911
'onTransitionStart(show text one, 1000)',
912
'onTransitionProgress(navigate, 1000, 2000, [suspense page])',
922
'Show Text One Loading...',
923
'Suspend [Show Text]',
924
'Show Text Loading...',
925
+ ...(gate('enableSiblingPrerendering')
926
+ ? ['Suspend [Show Text One]', 'Suspend [Show Text]']
927
+ : []),
928
'onTransitionProgress(navigate, 1000, 3000, [show text one, <null>])',
929
'onTransitionProgress(show text one, 1000, 3000, [show text one, <null>])',
930
]);
941
'Show Text Loading...',
942
'Suspend [Show Text Two]',
943
'Show Text Two Loading...',
944
+ ...(gate('enableSiblingPrerendering')
945
+ ? [
946
+ 'Suspend [Show Text One]',
947
+ 'Suspend [Show Text]',
948
+ 'Suspend [Show Text Two]',
949
+ ]
950
+ : []),
951
'onTransitionStart(show text two, 3000)',
952
'onTransitionProgress(show text two, 3000, 4000, [show text two])',
953
]);
1152
await waitForAll([
1153
'Suspend [Page Two]',
1154
'Loading...',
1155
+ ...(gate('enableSiblingPrerendering')
1156
+ ? ['Suspend [Page Two]', 'Suspend [Marker Text]', 'Loading...']
1157
+ : []),
1158
'onTransitionStart(page transition, 1000)',
1159
]);
1160
1166
'Page Two',
1167
'Suspend [Marker Text]',
1168
'Loading...',
1169
+ ...(gate('enableSiblingPrerendering') ? ['Suspend [Marker Text]'] : []),
1170
'onMarkerProgress(page transition, async marker, 1000, 3000, [marker suspense])',
1171
'onMarkerComplete(page transition, sync marker, 1000, 3000)',
1172
]);
1272
await waitForAll([
1273
'Suspend [Outer Text]',
1274
'Outer...',
1275
+ ...(gate('enableSiblingPrerendering')
1276
+ ? [
1277
+ 'Suspend [Outer Text]',
1278
+ 'Suspend [Inner Text One]',
1279
+ 'Inner One...',
1280
+ 'Suspend [Inner Text Two]',
1281
+ 'Inner Two...',
1282
+ ]
1283
+ : []),
1284
'onTransitionStart(page transition, 1000)',
1285
'onMarkerProgress(page transition, outer marker, 1000, 2000, [outer])',
1286
]);
1298
'Suspend [Inner Text One]',
1299
'Inner One...',
1300
'Inner Text Two',
1301
+ ...(gate('enableSiblingPrerendering')
1302
+ ? ['Suspend [Inner Text One]']
1303
+ : []),
1304
'onMarkerProgress(page transition, outer marker, 1000, 4000, [inner one])',
1305
'onMarkerComplete(page transition, marker two, 1000, 4000)',
1306
]);
1538
'Loading...',
1539
'Suspend [Sibling Text]',
1540
'Sibling Loading...',
1541
+ ...(gate('enableSiblingPrerendering')
1542
+ ? ['Suspend [Page Two]', 'Suspend [Sibling Text]']
1543
+ : []),
1544
'onTransitionStart(transition one, 1000)',
1545
'onMarkerProgress(transition one, parent, 1000, 2000, [suspense page, suspense sibling])',
1546
'onMarkerProgress(transition one, marker one, 1000, 2000, [suspense page])',
1556
'Loading...',
1557
'Suspend [Sibling Text]',
1558
'Sibling Loading...',
1559
+ ...(gate('enableSiblingPrerendering')
1560
+ ? ['Suspend [Page Two]', 'Suspend [Sibling Text]']
1561
+ : []),
1562
'onMarkerProgress(transition one, parent, 1000, 3000, [suspense sibling])',
1563
'onMarkerIncomplete(transition one, marker one, 1000, [{endTime: 3000, name: marker one, type: marker}, {endTime: 3000, name: suspense page, type: suspense}])',
1564
'onMarkerIncomplete(transition one, parent, 1000, [{endTime: 3000, name: marker one, type: marker}, {endTime: 3000, name: suspense page, type: suspense}])',
1572
'Loading...',
1573
'Suspend [Sibling Text]',
1574
'Sibling Loading...',
1575
+ ...(gate('enableSiblingPrerendering')
1576
+ ? ['Suspend [Page Two]', 'Suspend [Sibling Text]']
1577
+ : []),
1578
]);
1579
});
1580
1696
'Loading One...',
1697
'Suspend [Page Two]',
1698
'Loading Two...',
1699
+ ...(gate('enableSiblingPrerendering')
1700
+ ? ['Suspend [Page One]', 'Suspend [Page Two]']
1701
+ : []),
1702
'onTransitionStart(transition, 1000)',
1703
'onMarkerProgress(transition, parent, 1000, 2000, [suspense one, suspense two])',
1704
'onMarkerProgress(transition, one, 1000, 2000, [suspense one])',
1712
await waitForAll([
1713
'Suspend [Page Two]',
1714
'Loading Two...',
1715
+ ...(gate('enableSiblingPrerendering') ? ['Suspend [Page Two]'] : []),
1716
'onMarkerProgress(transition, parent, 1000, 3000, [suspense two])',
1717
'onMarkerIncomplete(transition, one, 1000, [{endTime: 3000, name: one, type: marker}, {endTime: 3000, name: suspense one, type: suspense}])',
1718
'onMarkerIncomplete(transition, parent, 1000, [{endTime: 3000, name: one, type: marker}, {endTime: 3000, name: suspense one, type: suspense}])',
1839
'Loading One...',
1840
'Suspend [Page Two]',
1841
'Loading Two...',
1842
+ ...(gate('enableSiblingPrerendering')
1843
+ ? [
1844
+ 'Suspend [Page One]',
1845
+ 'Suspend [Child]',
1846
+ 'Loading Child...',
1847
+ 'Suspend [Page Two]',
1848
+ ]
1849
+ : []),
1850
'onTransitionStart(transition, 1000)',
1851
'onMarkerProgress(transition, parent, 1000, 2000, [suspense one, suspense two])',
1852
'onMarkerProgress(transition, one, 1000, 2000, [suspense one])',
1861
'Page One',
1862
'Suspend [Child]',
1863
'Loading Child...',
1864
+ ...(gate('enableSiblingPrerendering') ? ['Suspend [Child]'] : []),
1865
'onMarkerProgress(transition, parent, 1000, 3000, [suspense two, suspense child])',
1866
'onMarkerProgress(transition, one, 1000, 3000, [suspense child])',
1867
'onMarkerComplete(transition, page one, 1000, 3000)',
1874
await waitForAll([
1875
'Suspend [Page Two]',
1876
'Loading Two...',
1877
+ ...(gate('enableSiblingPrerendering') ? ['Suspend [Page Two]'] : []),
1878
// "suspense one" has unsuspended so shouldn't be included
1879
// tracing marker "page one" has completed so shouldn't be included
1880
// all children of "suspense child" haven't yet been rendered so shouldn't be included
1972
1973
await waitForAll([
1974
'Suspend [Child]',
1975
+ ...(gate('enableSiblingPrerendering') ? ['Suspend [Child]'] : []),
1976
'onTransitionStart(transition, 0)',
1977
'onMarkerProgress(transition, parent, 0, 1000, [child])',
1978
'onTransitionProgress(transition, 0, 1000, [child])',
1983
await advanceTimers(1000);
1984
// This appended child isn't part of the transition so we
1985
// don't call any callback
1908
- await waitForAll(['Suspend [Appended child]', 'Suspend [Child]']);
1986
+ await waitForAll([
1987
+ 'Suspend [Appended child]',
1988
+ 'Suspend [Child]',
1989
+ ...(gate('enableSiblingPrerendering')
1990
+ ? ['Suspend [Appended child]', 'Suspend [Child]']
1991
+ : []),
1992
+ ]);
1993
1994
// This deleted child isn't part of the transition so we
1995
// don't call any callbacks
1996
root.render(<App show={false} />);
1997
ReactNoop.expire(1000);
1998
await advanceTimers(1000);
1915
- await waitForAll(['Suspend [Child]']);
1999
+ await waitForAll([
2000
+ 'Suspend [Child]',
2001
+ ...(gate('enableSiblingPrerendering') ? ['Suspend [Child]'] : []),
2002
+ ]);
2003
2004
await resolveText('Child');
2005
ReactNoop.expire(1000);
2100
2101
assertLog([
2102
'Suspend [Child]',
2103
+ ...(gate('enableSiblingPrerendering') ? ['Suspend [Child]'] : []),
2104
'onTransitionStart(transition one, 0)',
2105
'onMarkerProgress(transition one, parent, 0, 1000, [child])',
2106
'onTransitionProgress(transition one, 0, 1000, [child])',
2121
assertLog([
2122
'Suspend [Appended child]',
2123
'Suspend [Child]',
2124
+ ...(gate('enableSiblingPrerendering')
2125
+ ? ['Suspend [Appended child]', 'Suspend [Child]']
2126
+ : []),
2127
'onTransitionStart(transition two, 1000)',
2128
'onMarkerProgress(transition two, appended child, 1000, 2000, [appended child])',
2129
'onTransitionProgress(transition two, 1000, 2000, [appended child])',
2137
2138
assertLog([
2139
'Suspend [Child]',
2140
+ ...(gate('enableSiblingPrerendering') ? ['Suspend [Child]'] : []),
2141
'onMarkerProgress(transition two, appended child, 1000, 3000, [])',
2142
'onMarkerIncomplete(transition two, appended child, 1000, [{endTime: 3000, name: appended child, type: suspense}])',
2143
]);
2293
assertLog([
2294
'Suspend [Text]',
2295
'Loading...',
2204
- 'Suspend [Hidden Text]',
2205
- 'Hidden Loading...',
2206
- 'onTransitionStart(transition, 0)',
2296
+
2297
+ ...(gate('enableSiblingPrerendering')
2298
+ ? [
2299
+ 'Suspend [Text]',
2300
+ 'onTransitionStart(transition, 0)',
2301
+
2302
+ 'Suspend [Hidden Text]',
2303
+ 'Hidden Loading...',
2304
+ ]
2305
+ : [
2306
+ 'Suspend [Hidden Text]',
2307
+ 'Hidden Loading...',
2308
+ 'onTransitionStart(transition, 0)',
2309
+ ]),
2310
]);
2311
2312
await act(() => {
2372
assertLog([
2373
'Suspend [Page Two]',
2374
'Loading...',
2375
+ ...(gate('enableSiblingPrerendering') ? ['Suspend [Page Two]'] : []),
2376
'onTransitionStart(page transition, 0)',
2377
'onTransitionProgress(page transition, 0, 1000, [suspense page])',
2378
]);
2446
'Text',
2447
'Suspend [Text Two]',
2448
'Loading Two...',
2449
+ ...(gate('enableSiblingPrerendering') ? ['Suspend [Text Two]'] : []),
2450
'onTransitionStart(transition, 0)',
2451
'onTransitionProgress(transition, 0, 1000, [two])',
2452
+ ...(gate('enableSiblingPrerendering') ? ['Suspend [Text Two]'] : []),
2453
]);
2454
2455
await act(() => {
2523
'Loading one...',
2524
'Suspend [Text two]',
2525
'Loading two...',
2526
+ ...(gate('enableSiblingPrerendering')
2527
+ ? ['Suspend [Text one]', 'Suspend [Text two]']
2528
+ : []),
2529
'onTransitionStart(transition one, 0) /root one/',
2530
'onTransitionProgress(transition one, 0, 1000, [one]) /root one/',
2531
'onTransitionStart(transition two, 0) /root two/',