@@ -9,7 +9,35 @@ import Screens from './Screens';
99import { component } from '../commons/Layouts' ;
1010import testIDs from '../testIDs' ;
1111import bottomTabsStruct from './BottomTabsLayoutStructure' ;
12- import { launchTabsTogetherTest , launchTabsOnSwitchTest } from './TabsTogetherTest' ;
12+ import { resetLoadOrder } from './TabsTogetherTest' ;
13+
14+ const TABS = [
15+ { url : 'https://www.apple.com' , title : 'Apple' } ,
16+ { url : 'https://www.microsoft.com' , title : 'Microsoft' } ,
17+ { url : 'https://www.amazon.com' , title : 'Amazon' } ,
18+ ] ;
19+
20+ const launchTest = ( mode : 'together' | 'onSwitchToTab' ) => {
21+ resetLoadOrder ( ) ;
22+ Navigation . setRoot ( {
23+ root : {
24+ bottomTabs : {
25+ id : 'TabsTest' ,
26+ options : { bottomTabs : { tabsAttachMode : mode , titleDisplayMode : 'alwaysShow' } } ,
27+ children : TABS . map ( ( item , i ) => ( {
28+ stack : {
29+ id : `Tab${ i } ` ,
30+ children : [ { component : { name : 'TabsTogetherTest.WebViewTab' , passProps : { tabIndex : i , ...item } } } ] ,
31+ options : { bottomTab : { text : item . title , icon : require ( '../../img/layouts.png' ) } } ,
32+ } ,
33+ } ) ) ,
34+ } ,
35+ } ,
36+ } ) ;
37+ } ;
38+
39+ const launchTabsTogetherTest = ( ) => launchTest ( 'together' ) ;
40+ const launchTabsOnSwitchTest = ( ) => launchTest ( 'onSwitchToTab' ) ;
1341
1442export class MountedBottomTabScreensState {
1543 static mountedBottomTabScreens : string [ ] = [ ] ;
0 commit comments