Skip to content

Commit 2f02ab4

Browse files
authored
chore(JS): use new platform specific icon syntax in tests (#3490)
## Description Updates test screens to use new platform specific icon API (introduced in #3214). Closes software-mansion/react-native-screens-labs#738. ## Changes - use new icon API in test screens ## Test code and steps to reproduce Run example app with affected tests. ## Checklist - [x] Included code example that can be used to test this change - [ ] Ensured that CI passes
1 parent 94c1d71 commit 2f02ab4

File tree

4 files changed

+36
-9
lines changed

4 files changed

+36
-9
lines changed

apps/src/tests/Test3168.tsx

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,10 @@ function TabsStackComponent() {
205205
tabKey: 'main',
206206
title: 'Main',
207207
icon: {
208-
sfSymbolName: 'house',
208+
ios: {
209+
type: 'sfSymbol',
210+
name: 'house',
211+
},
209212
},
210213
},
211214
component: () => Menu({ tabsMode: true }),
@@ -215,7 +218,10 @@ function TabsStackComponent() {
215218
tabKey: 'another',
216219
title: 'Another',
217220
icon: {
218-
sfSymbolName: 'ellipsis',
221+
ios: {
222+
type: 'sfSymbol',
223+
name: 'ellipsis',
224+
},
219225
},
220226
},
221227
component: AnotherTab,
@@ -225,7 +231,10 @@ function TabsStackComponent() {
225231
tabKey: 'examples',
226232
title: 'Search',
227233
icon: {
228-
sfSymbolName: 'magnifyingglass',
234+
ios: {
235+
type: 'sfSymbol',
236+
name: 'magnifyingglass',
237+
},
229238
},
230239
systemItem: searchBarConfig.useSystemItem ? 'search' : undefined,
231240
},

apps/src/tests/Test3236.tsx

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,10 @@ function App() {
5858
title: 'Tab 1',
5959
freezeContents: false,
6060
icon: {
61-
sfSymbolName: 'sun.max',
61+
ios: {
62+
type: 'sfSymbol',
63+
name: 'sun.max',
64+
},
6265
},
6366
iconResourceName: 'sunny',
6467
},
@@ -69,7 +72,10 @@ function App() {
6972
tabKey: 'Tab2',
7073
title: 'Tab 2',
7174
icon: {
72-
sfSymbolName: 'snow',
75+
ios: {
76+
type: 'sfSymbol',
77+
name: 'snow',
78+
},
7379
},
7480
iconResourceName: 'mode_cool',
7581
},

apps/src/tests/TestSafeAreaViewIOS/bottom-tabs/BottomTabsComponent.tsx

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,10 @@ export default function BottomTabsComponent() {
2121
tabKey: 'config',
2222
title: 'Config',
2323
icon: {
24-
sfSymbolName: 'gear',
24+
ios: {
25+
type: 'sfSymbol',
26+
name: 'gear',
27+
},
2528
},
2629
},
2730
component: ConfigTab,
@@ -31,7 +34,10 @@ export default function BottomTabsComponent() {
3134
tabKey: 'test',
3235
title: 'Test',
3336
icon: {
34-
sfSymbolName: 'uiwindow.split.2x1',
37+
ios: {
38+
type: 'sfSymbol',
39+
name: 'uiwindow.split.2x1',
40+
},
3541
},
3642
systemItem:
3743
config.tabBarItemSystemItem !== 'disabled'
@@ -60,7 +66,10 @@ export default function BottomTabsComponent() {
6066
config: tabsConfig,
6167
setConfig: setTabsConfig,
6268
}}>
63-
<BottomTabsContainer tabConfigs={TAB_CONFIGS} tabBarMinimizeBehavior={config.tabBarMinimizeBehavior} />
69+
<BottomTabsContainer
70+
tabConfigs={TAB_CONFIGS}
71+
tabBarMinimizeBehavior={config.tabBarMinimizeBehavior}
72+
/>
6473
</ConfigWrapperContext.Provider>
6574
);
6675
}

apps/src/tests/TestSafeAreaViewIOS/split-view/ConfigColumn.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,10 @@ export default function ConfigColumn({
2323
tabKey: 'column' + index,
2424
title: 'Column ' + index,
2525
icon: {
26-
sfSymbolName: index + '.circle',
26+
ios: {
27+
type: 'sfSymbol',
28+
name: index + '.circle',
29+
},
2730
},
2831
},
2932
component: () => ConfigColumnTab({ index, configColumnIndex }),

0 commit comments

Comments
 (0)