File tree Expand file tree Collapse file tree 2 files changed +10
-10
lines changed
app/src/organisms/Devices Expand file tree Collapse file tree 2 files changed +10
-10
lines changed Original file line number Diff line number Diff line change @@ -109,12 +109,12 @@ export function RobotStatusHeader(props: RobotStatusHeaderProps): JSX.Element {
109
109
110
110
let iconName : IconName | null = null
111
111
let tooltipTranslationKey = null
112
- if ( isOT3ConnectedViaWifi ) {
113
- iconName = 'wifi'
114
- tooltipTranslationKey = 'device_settings:wifi'
115
- } else if ( isOT3ConnectedViaEthernet ) {
112
+ if ( isOT3ConnectedViaEthernet ) {
116
113
iconName = 'ethernet'
117
114
tooltipTranslationKey = 'device_settings:ethernet'
115
+ } else if ( isOT3ConnectedViaWifi ) {
116
+ iconName = 'wifi'
117
+ tooltipTranslationKey = 'device_settings:wifi'
118
118
} else if ( ( local != null && local ) || isOT3ConnectedViaUSB ) {
119
119
iconName = 'usb'
120
120
tooltipTranslationKey = 'device_settings:wired_usb'
Original file line number Diff line number Diff line change @@ -177,7 +177,7 @@ describe('RobotStatusHeader', () => {
177
177
)
178
178
} )
179
179
180
- it ( 'renders a wifi icon when connected by wifi and ethernet' , ( ) => {
180
+ it ( 'renders an ethernet icon when connected by wifi and ethernet' , ( ) => {
181
181
when ( mockGetNetworkInterfaces )
182
182
. calledWith ( { } as State , 'otie' )
183
183
. mockReturnValue ( {
@@ -187,20 +187,20 @@ describe('RobotStatusHeader', () => {
187
187
188
188
const [ { getByLabelText } ] = render ( props )
189
189
190
- getByLabelText ( 'wifi ' )
190
+ getByLabelText ( 'ethernet ' )
191
191
} )
192
192
193
- it ( 'renders an ethernet icon when only connected by ethernet ' , ( ) => {
193
+ it ( 'renders a wifi icon when only connected by wifi ' , ( ) => {
194
194
when ( mockGetNetworkInterfaces )
195
195
. calledWith ( { } as State , 'otie' )
196
196
. mockReturnValue ( {
197
- wifi : null ,
198
- ethernet : { ipAddress : ETHERNET_IP } as SimpleInterfaceStatus ,
197
+ wifi : { ipAddress : WIFI_IP } as SimpleInterfaceStatus ,
198
+ ethernet : null ,
199
199
} )
200
200
201
201
const [ { getByLabelText } ] = render ( props )
202
202
203
- getByLabelText ( 'ethernet ' )
203
+ getByLabelText ( 'wifi ' )
204
204
} )
205
205
206
206
it ( 'renders a usb icon when only connected locally' , ( ) => {
You can’t perform that action at this time.
0 commit comments