@eohjsc/react-native-smart-city 0.7.3-rc2 → 0.7.3-rc20

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (239) hide show
  1. package/package.json +17 -15
  2. package/src/commons/Action/__test__/ItemQuickAction.test.js +6 -6
  3. package/src/commons/ActionGroup/NumberUpDownActionTemplate.js +3 -3
  4. package/src/commons/ActionGroup/OnOffSmartLock/AutoLock/ButtonWrapper.js +3 -3
  5. package/src/commons/ActionGroup/OnOffSmartLock/PasscodeList/__test__/index.test.js +5 -5
  6. package/src/commons/ActionGroup/OnOffSmartLock/PasscodeList/index.js +3 -3
  7. package/src/commons/ActionGroup/OnOffSmartLock/SetupGeneratePasscode/ButtonWrapper.js +2 -2
  8. package/src/commons/ActionGroup/OnOffTemplate/OnOffSimpleTemplate.js +2 -2
  9. package/src/commons/ActionGroup/OptionsDropdownActionTemplate.js +2 -2
  10. package/src/commons/ActionGroup/SliderRangeTemplate.js +7 -7
  11. package/src/commons/ActionGroup/SmartTiviActionTemplate/SmartTiviActionTemplate.js +2 -2
  12. package/src/commons/ActionGroup/SmartTiviActionTemplate/component/CircleButton.js +5 -5
  13. package/src/commons/ActionGroup/SmartTiviActionTemplate/component/ControlPlay.js +5 -5
  14. package/src/commons/ActionGroup/TerminalBoxTemplate.js +2 -2
  15. package/src/commons/ActionGroup/TextBoxTemplate.js +2 -2
  16. package/src/commons/ActionGroup/ThreeButtonTemplate/__test__/ThreeButtonCircle.test.js +2 -2
  17. package/src/commons/ActionGroup/ThreeButtonTemplate/__test__/ThreeButtonDefault.test.js +2 -2
  18. package/src/commons/ActionGroup/TimerActionTemplate.js +6 -3
  19. package/src/commons/ActionGroup/TwoButtonTemplate/index.js +2 -2
  20. package/src/commons/ActionGroup/__test__/ColorPickerTemplate.test.js +9 -10
  21. package/src/commons/ActionGroup/__test__/OnOffSmartLock.test.js +5 -5
  22. package/src/commons/ActionGroup/__test__/OnOffTemplate.test.js +5 -5
  23. package/src/commons/ActionGroup/__test__/OptionsDropdownTemplate.test.js +8 -8
  24. package/src/commons/ActionGroup/__test__/StatesGridActionTemplate.test.js +3 -3
  25. package/src/commons/ActionGroup/__test__/TimerActionTemplate.test.js +6 -6
  26. package/src/commons/ActionGroup/__test__/TwoButtonTemplate.test.js +1 -1
  27. package/src/commons/ActionGroup/__test__/index.test.js +6 -6
  28. package/src/commons/ActionTemplate/__test__/index.test.js +4 -4
  29. package/src/commons/Automate/ItemAutomate.js +8 -7
  30. package/src/commons/Automate/__test__/ItemAutomate.test.js +2 -2
  31. package/src/commons/BackDefault/index.js +2 -2
  32. package/src/commons/ButtonPopup/index.js +2 -2
  33. package/src/commons/ChartAggregationOption/__test__/FourButtonFilterHistory.test.js +2 -2
  34. package/src/commons/Dashboard/MyPinnedSharedUnit/__test__/MyPinnedSharedUnit.test.js +8 -9
  35. package/src/commons/Dashboard/MyUnit/__test__/MyUnit.test.js +7 -7
  36. package/src/commons/DateTimeRangeChange/DateTimeButton.js +3 -3
  37. package/src/commons/Device/ConnectedViewHeader.js +2 -2
  38. package/src/commons/Device/Emergency/EmergencyDetail.js +3 -3
  39. package/src/commons/Device/Emergency/__test__/EmergencyButton.test.js +1 -1
  40. package/src/commons/Device/FlatListItems.js +20 -19
  41. package/src/commons/Device/Hanet/ItemHanetDevice.js +3 -3
  42. package/src/commons/Device/Hanet/ItemHanetDevice.test.js +3 -3
  43. package/src/commons/Device/HorizontalBarChart.js +54 -34
  44. package/src/commons/Device/ItemAddNew/index.js +2 -2
  45. package/src/commons/Device/ItemDevice.js +2 -2
  46. package/src/commons/Device/SonosSpeaker/index.js +3 -3
  47. package/src/commons/Device/WaterPurifierStatus/AlertStatusMachine.js +2 -2
  48. package/src/commons/Device/WaterQualitySensor/QualityIndicatorsItem.js +6 -2
  49. package/src/commons/DisplayChecking/index.js +2 -2
  50. package/src/commons/EmergencyButton/AlertSendConfirm.js +2 -2
  51. package/src/commons/FieldTemplate/ChooseUserField/index.js +2 -2
  52. package/src/commons/FieldTemplate/PasscodeField/__test__/index.test.js +3 -3
  53. package/src/commons/FieldTemplate/ScheduleField/__test__/index.test.js +6 -6
  54. package/src/commons/FlatListDnD/__test__/index.test.js +4 -4
  55. package/src/commons/FlatListDnD/index.js +12 -9
  56. package/src/commons/Grid/GridItem.js +10 -2
  57. package/src/commons/GroupCheckBox/__test__/GroupCheckBox.test.js +3 -3
  58. package/src/commons/Header/HeaderCustom.js +2 -2
  59. package/src/commons/Header/__test__/HeaderCT.test.js +3 -3
  60. package/src/commons/HeaderAni/index.js +2 -2
  61. package/src/commons/IconComponent/index.js +3 -3
  62. package/src/commons/ImagePicker/__test__/ImagePicker.test.js +5 -5
  63. package/src/commons/MediaPlayerDetail/__test__/MediaPlayerDetail.test.js +6 -4
  64. package/src/commons/NavBar/index.js +2 -2
  65. package/src/commons/OneTapTemplate/NumberUpDownActionTemplate.js +3 -3
  66. package/src/commons/OneTapTemplate/__test__/StatesGridActionTemplate.test.js +1 -1
  67. package/src/commons/Popover/__test__/index.test.js +3 -3
  68. package/src/commons/Processing/__test__/Connecting.test.js +4 -4
  69. package/src/commons/SearchLocation/index.js +3 -3
  70. package/src/commons/SelectActionCard/index.js +2 -2
  71. package/src/commons/SelectSubUnit/index.js +6 -2
  72. package/src/commons/SelectUnit/__test__/SelectUnit.test.js +5 -5
  73. package/src/commons/Sharing/BtnRemoveMember.js +2 -2
  74. package/src/commons/Sharing/StationDevicePermissions.js +2 -2
  75. package/src/commons/SubUnit/DeviceTemplate/ConfigAndEvaluation/ConfigAndEvaluation.js +2 -2
  76. package/src/commons/SubUnit/DeviceTemplate/ConfigValue/ConfigValue.js +2 -2
  77. package/src/commons/SubUnit/DeviceTemplate/EvaluationOverConfig/EvaluationOverConfig.js +2 -2
  78. package/src/commons/SubUnit/OneTap/ItemOneTap.js +3 -4
  79. package/src/commons/SubUnit/OneTap/__test__/SubUnitAutomate.test.js +0 -2
  80. package/src/commons/SubUnit/OneTap/index.js +9 -8
  81. package/src/commons/SubUnit/__test__/ShortDetail.test.js +8 -8
  82. package/src/commons/Unit/HeaderUnit/index.js +3 -3
  83. package/src/commons/Unit/SharedUnit.js +7 -7
  84. package/src/commons/Widgets/IFrame/__tests__/IFrame.test.js +9 -13
  85. package/src/configs/Theme.js +1 -1
  86. package/src/hooks/Common/__test__/useAndroidTranslucentStatusBar.test.js +5 -5
  87. package/src/hooks/IoT/__test__/useHomeAssistantConnection.test.js +12 -12
  88. package/src/hooks/IoT/__test__/useWatchConfigs.test.js +3 -3
  89. package/src/hooks/IoT/useRemoteControl.js +6 -6
  90. package/src/hooks/useMqtt.js +2 -2
  91. package/src/iot/RemoteControl/Internet.js +2 -2
  92. package/src/iot/RemoteControl/__test__/Internet.test.js +7 -7
  93. package/src/navigations/EmergencyContactsStack.js +4 -3
  94. package/src/navigations/SharedStack.js +2 -0
  95. package/src/navigations/UnitStack.js +55 -54
  96. package/src/screens/AQIGuide/index.js +0 -2
  97. package/src/screens/ActivityLog/index.js +2 -2
  98. package/src/screens/AddLocationMaps/__test__/index.test.js +12 -12
  99. package/src/screens/AddLocationMaps/index.js +15 -15
  100. package/src/screens/AddNewGateway/RenameNewDevices.js +2 -2
  101. package/src/screens/AddNewGateway/SelectDeviceType.js +1 -1
  102. package/src/screens/AddNewGateway/ShareWifiPassword.js +16 -15
  103. package/src/screens/AddNewGateway/__test__/AddNewGateway.test.js +7 -7
  104. package/src/screens/AddNewGateway/__test__/ConnectingWifiDevice.test.js +8 -8
  105. package/src/screens/AddNewGateway/__test__/ConnectingZigbeeDevice.test.js +7 -7
  106. package/src/screens/AddNewGateway/__test__/RenameNewDevices.test.js +8 -8
  107. package/src/screens/AddNewGateway/__test__/ScanGatewayQR.test.js +5 -5
  108. package/src/screens/AddNewGateway/__test__/SelectDeviceUnit.test.js +4 -4
  109. package/src/screens/AddNewGateway/__test__/SelectModbusGateway.test.js +6 -6
  110. package/src/screens/AddNewGateway/__test__/SelectZigbeeGateway.test.js +6 -6
  111. package/src/screens/AddNewGateway/__test__/ShareWifiPassword.test.js +0 -4
  112. package/src/screens/AddNewGateway/hooks/__Tests__/useWifiManage.test.js +2 -2
  113. package/src/screens/AllGateway/DetailConfigActionModbus/__test__/index.test.js +6 -6
  114. package/src/screens/AllGateway/DeviceInternalDetail/__test__/index.test.js +19 -17
  115. package/src/screens/AllGateway/DeviceModbusDetail/__test__/index.test.js +19 -17
  116. package/src/screens/AllGateway/DeviceZigbeeDetail/__test__/index.test.js +18 -16
  117. package/src/screens/AllGateway/GatewayDetail/__test__/index.test.js +43 -35
  118. package/src/screens/AllGateway/GatewayInfo/__test__/index.test.js +13 -13
  119. package/src/screens/AllGateway/__test__/index.test.js +6 -6
  120. package/src/screens/AllGateway/components/Detail/__test__/index.test.js +3 -5
  121. package/src/screens/AllGateway/components/GatewayItem/__test__/index.test.js +3 -3
  122. package/src/screens/AllGateway/components/TabPaneCT/__test__/index.test.js +6 -6
  123. package/src/screens/AllGateway/hooks/__test__/index.test.js +2 -2
  124. package/src/screens/AllGateway/test-utils.js +3 -4
  125. package/src/screens/Automate/AddNewAction/ChooseAction.js +17 -3
  126. package/src/screens/Automate/AddNewAction/ChooseConfig.js +7 -6
  127. package/src/screens/Automate/AddNewAction/NewActionWrapper.js +8 -8
  128. package/src/screens/Automate/AddNewAction/SelectControlDevices.js +30 -20
  129. package/src/screens/Automate/AddNewAction/SelectMonitorDevices.js +17 -10
  130. package/src/screens/Automate/AddNewAction/SetupConfigCondition.js +42 -34
  131. package/src/screens/Automate/AddNewAction/SetupScriptDelay.js +1 -1
  132. package/src/screens/Automate/AddNewAction/SetupScriptNotify.js +3 -3
  133. package/src/screens/Automate/AddNewAction/Styles/SetupSensorStyles.js +20 -4
  134. package/src/screens/Automate/AddNewAction/__test__/ChooseAction.test.js +12 -12
  135. package/src/screens/Automate/AddNewAction/__test__/SelectControlDevices.test.js +14 -8
  136. package/src/screens/Automate/AddNewAction/__test__/SelectMonitorDevices.test.js +13 -7
  137. package/src/screens/Automate/AddNewAction/__test__/SetupConfigCondition.test.js +12 -11
  138. package/src/screens/Automate/AddNewAction/__test__/SetupScriptDelay.test.js +9 -9
  139. package/src/screens/Automate/AddNewAction/__test__/SetupScriptNotify.test.js +39 -10
  140. package/src/screens/Automate/AddNewAutoSmart/AddTypeSmart.js +10 -9
  141. package/src/screens/Automate/AddNewAutoSmart/__test__/AddNewAutoSmart.test.js +13 -8
  142. package/src/screens/Automate/Components/InputName.js +10 -7
  143. package/src/screens/Automate/EditActionsList/__tests__/UpdateActionScript.test.js +8 -8
  144. package/src/screens/Automate/EditActionsList/__tests__/UpdateDelayScript.test.js +6 -6
  145. package/src/screens/Automate/EditActionsList/__tests__/UpdateNotifyScript.test.js +7 -7
  146. package/src/screens/Automate/EditActionsList/index.js +19 -17
  147. package/src/screens/Automate/MultiUnits.js +19 -22
  148. package/src/screens/Automate/OneTap/__test__/AddNewOneTap.test.js +18 -8
  149. package/src/screens/Automate/Scenario/__test__/AddNewOneTap.test.js +15 -7
  150. package/src/screens/Automate/ScriptDetail/Components/AddActionScript.js +14 -6
  151. package/src/screens/Automate/ScriptDetail/Components/RenameScript.js +4 -7
  152. package/src/screens/Automate/ScriptDetail/__test__/index.test.js +3 -1
  153. package/src/screens/Automate/ScriptDetail/__test__/useStarredScript.test.js +6 -6
  154. package/src/screens/Automate/ScriptDetail/index.js +48 -38
  155. package/src/screens/Automate/SetSchedule/__test__/SelectWeekday.test.js +4 -4
  156. package/src/screens/Automate/SetSchedule/__test__/index.test.js +29 -18
  157. package/src/screens/Automate/SetSchedule/components/RowItem.js +5 -5
  158. package/src/screens/Automate/SetSchedule/index.js +8 -7
  159. package/src/screens/Automate/Styles/indexStyles.js +1 -1
  160. package/src/screens/Automate/__test__/MultiUnits.test.js +1 -4
  161. package/src/screens/Automate/__test__/index.test.js +0 -1
  162. package/src/screens/Automate/index.js +36 -34
  163. package/src/screens/ChangePosition/__test__/index.test.js +6 -6
  164. package/src/screens/ChangePosition/index.js +2 -1
  165. package/src/screens/Device/EditDevice/__test__/EditDevice.test.js +9 -9
  166. package/src/screens/Device/EditDevice/index.js +2 -2
  167. package/src/screens/Device/__test__/detail.test.js +14 -14
  168. package/src/screens/Device/__test__/mqttDetail.test.js +9 -9
  169. package/src/screens/Device/components/SensorDisplayItem.js +5 -5
  170. package/src/screens/Device/detail.js +7 -7
  171. package/src/screens/Device/hooks/useEvaluateValue.js +1 -1
  172. package/src/screens/Drawer/Drawer.test.js +2 -2
  173. package/src/screens/Drawer/index.js +3 -3
  174. package/src/screens/EmergencyContacts/EmergencyContactsList.js +8 -4
  175. package/src/screens/EmergencyContacts/EmergencyContactsSelectContacts.js +3 -3
  176. package/src/screens/EmergencyContacts/__test__/EmergencyContactsSelectContacts.test.js +7 -7
  177. package/src/screens/EmergencySetting/components/DropDownItem.js +2 -2
  178. package/src/screens/EnterPassword/__test__/EnterPassword.test.js +8 -8
  179. package/src/screens/GuestInfo/components/RowGuestInfo.js +2 -2
  180. package/src/screens/GuestInfo/components/__test__/AccessScheduleSheet.test.js +3 -3
  181. package/src/screens/GuestInfo/index.js +2 -2
  182. package/src/screens/HanetCamera/ManageAccess.js +3 -3
  183. package/src/screens/HanetCamera/MemberInfo.js +2 -2
  184. package/src/screens/HanetCamera/__test__/Detail.test.js +9 -9
  185. package/src/screens/HanetCamera/__test__/MemberInfo.test.js +10 -10
  186. package/src/screens/HanetCamera/components/RequestFaceIDPopup.js +2 -2
  187. package/src/screens/ManageAccess/index.js +3 -3
  188. package/src/screens/MoveToAnotherSubUnit/__test__/index.test.js +9 -9
  189. package/src/screens/Notification/__test__/Notification.test.js +9 -9
  190. package/src/screens/Notification/components/NotificationItem.js +3 -4
  191. package/src/screens/Notification/index.js +3 -3
  192. package/src/screens/Notification/styles/NotificationItemStyles.js +0 -1
  193. package/src/screens/PlayBackCamera/__test__/index.test.js +1 -1
  194. package/src/screens/ScanChipQR/components/QRScan/__test__/QRScan.test.js +1 -1
  195. package/src/screens/ScanChipQR/components/QRScan/index.js +3 -3
  196. package/src/screens/SelectUnit/__test__/index.test.js +8 -8
  197. package/src/screens/SelectUnit/index.js +4 -4
  198. package/src/screens/SharedUnit/TabHeader.js +2 -2
  199. package/src/screens/Sharing/Components/EndDevice.js +3 -3
  200. package/src/screens/Sharing/UnitMemberList.js +2 -2
  201. package/src/screens/Sharing/__test__/UpdateShareDevice.test.js +7 -7
  202. package/src/screens/SideMenuDetail/__test__/index.test.js +8 -8
  203. package/src/screens/SmartAccount/Connecting/index.js +5 -5
  204. package/src/screens/SmartAccount/ListDevice/__test__/ListDevice.test.js +8 -8
  205. package/src/screens/SmartAccount/SuccessfullyConnected/__test__/SuccessfullyConnected.test.js +7 -7
  206. package/src/screens/SmartAccount/SuccessfullyConnected/index.js +2 -2
  207. package/src/screens/SmartAccount/__test__/Connecting.test.js +6 -6
  208. package/src/screens/SmartAccount/__test__/SmartAccount.test.js +10 -10
  209. package/src/screens/SmartIr/__test__/GroupButtonByType.test.js +3 -2
  210. package/src/screens/SmartIr/components/GroupButtonByType/GroupButtonByType.js +2 -2
  211. package/src/screens/SmartIr/components/SelectBrand.js +2 -2
  212. package/src/screens/SubUnit/AddSubUnit.js +2 -4
  213. package/src/screens/SubUnit/EditSubUnit.js +2 -2
  214. package/src/screens/SubUnit/ManageSubUnit.js +3 -3
  215. package/src/screens/SubUnit/__test__/AddSubUnit.test.js +9 -11
  216. package/src/screens/Template/EditTemplate.js +6 -4
  217. package/src/screens/Template/__test__/EditTemplate.test.js +7 -7
  218. package/src/screens/Template/__test__/detail.test.js +4 -4
  219. package/src/screens/Template/__test__/index.test.js +1 -1
  220. package/src/screens/UVIndexGuide/index.js +2 -4
  221. package/src/screens/Unit/SelectAddToFavorites.js +2 -2
  222. package/src/screens/Unit/SelectAddress.js +16 -12
  223. package/src/screens/Unit/Station/__test__/index.test.js +1 -1
  224. package/src/screens/Unit/__test__/SelectAddToFavorites.test.js +9 -9
  225. package/src/screens/Unit/__test__/SelectAddress.test.js +11 -17
  226. package/src/screens/Unit/__test__/Summaries.test.js +7 -7
  227. package/src/screens/Unit/components/AutomateScript/index.js +2 -2
  228. package/src/screens/Unit/components/ButtonWrapper/index.js +3 -3
  229. package/src/screens/Unit/components/Header/index.js +2 -2
  230. package/src/screens/Unit/components/SharedUnit/index.js +5 -5
  231. package/src/screens/Unit/components/__test__/AutomateScript.test.js +3 -3
  232. package/src/screens/Unit/components/__test__/SharedUnit.test.js +8 -8
  233. package/src/screens/Unit/hook/__test__/useUnitConnectRemoteDevices.test.js +2 -2
  234. package/src/screens/UnitSummary/components/AirQuality/index.js +6 -11
  235. package/src/screens/UnitSummary/components/WaterQuality/Item/index.js +6 -6
  236. package/src/screens/UnitSummary/index.js +3 -3
  237. package/src/utils/I18n/translations/en.js +3 -1
  238. package/src/utils/I18n/translations/vi.js +5 -2
  239. package/src/utils/__test__/Utils.test.js +16 -16
@@ -1,14 +1,14 @@
1
- import React, { useEffect, useCallback, useContext } from 'react';
2
- import { View } from 'react-native';
3
1
  import { useNavigation } from '@react-navigation/native';
2
+ import React, { useCallback, useContext, useEffect } from 'react';
3
+ import { View } from 'react-native';
4
4
  import * as Progress from 'react-native-progress';
5
5
 
6
6
  import Text from '../../../commons/Text';
7
- import { useTranslations } from '../../../hooks/Common/useTranslations';
8
- import { Action } from '../../../context/actionType';
7
+ import { API, Colors, Constants } from '../../../configs';
9
8
  import { SCContext, useSCContextSelector } from '../../../context';
9
+ import { Action } from '../../../context/actionType';
10
+ import { useTranslations } from '../../../hooks/Common/useTranslations';
10
11
  import { axiosPost } from '../../../utils/Apis/axios';
11
- import { API, Colors, Constants } from '../../../configs';
12
12
  import Routes from '../../../utils/Route';
13
13
  import styles from './style';
14
14
 
@@ -1,17 +1,17 @@
1
1
  import React from 'react';
2
- import { act, create } from 'react-test-renderer';
3
2
  import { TouchableOpacity } from 'react-native';
3
+ import { act, create } from 'react-test-renderer';
4
4
 
5
- import ListDevice from '../index';
5
+ import { useNavigation } from '@react-navigation/native';
6
+ import MockAdapter from 'axios-mock-adapter';
7
+ import Text from '../../../../commons/Text';
8
+ import { API } from '../../../../configs';
9
+ import AccessibilityLabel from '../../../../configs/AccessibilityLabel';
6
10
  import { SCProvider } from '../../../../context';
7
11
  import { mockSCStore } from '../../../../context/mockStore';
8
- import Text from '../../../../commons/Text';
9
12
  import api from '../../../../utils/Apis/axios';
10
- import { API } from '../../../../configs';
11
13
  import Routes from '../../../../utils/Route';
12
- import MockAdapter from 'axios-mock-adapter';
13
- import AccessibilityLabel from '../../../../configs/AccessibilityLabel';
14
- import { useNavigation } from '@react-navigation/native';
14
+ import ListDevice from '../index';
15
15
 
16
16
  const mock = new MockAdapter(api.axiosInstance);
17
17
 
@@ -78,7 +78,7 @@ describe('Test ListDeviceSmartAccount', () => {
78
78
  await touchs[touchs.length - 1].props.onPress();
79
79
  });
80
80
 
81
- expect(navigate).toBeCalledWith(Routes.AddDeviceStack, {
81
+ expect(navigate).toHaveBeenCalledWith(Routes.AddDeviceStack, {
82
82
  screen: Routes.AddCommonSelectSubUnit,
83
83
  params: {
84
84
  addType: 'AddHassiDevice',
@@ -1,16 +1,16 @@
1
+ import MockAdapter from 'axios-mock-adapter';
1
2
  import React from 'react';
2
3
  import renderer, { act } from 'react-test-renderer';
3
- import MockAdapter from 'axios-mock-adapter';
4
4
 
5
- import SuccessfullyConnected from '../index';
5
+ import _TextInput from '../../../../commons/Form/TextInput';
6
+ import { API } from '../../../../configs';
7
+ import AccessibilityLabel from '../../../../configs/AccessibilityLabel';
6
8
  import { SCProvider } from '../../../../context';
7
9
  import { mockSCStore } from '../../../../context/mockStore';
8
10
  import api from '../../../../utils/Apis/axios';
9
- import { API } from '../../../../configs';
10
- import AccessibilityLabel from '../../../../configs/AccessibilityLabel';
11
11
  import Routes from '../../../../utils/Route';
12
- import _TextInput from '../../../../commons/Form/TextInput';
13
12
  import { flushPromises } from '../../../AllGateway/test-utils';
13
+ import SuccessfullyConnected from '../index';
14
14
 
15
15
  const mock = new MockAdapter(api.axiosInstance);
16
16
 
@@ -100,7 +100,7 @@ describe('Test SuccessfullyConnected', () => {
100
100
  await act(async () => {
101
101
  handleContinue.props.onPress();
102
102
  });
103
- expect(global.mockedNavigate).toBeCalledWith(
103
+ expect(global.mockedNavigate).toHaveBeenCalledWith(
104
104
  Routes.ListDeviceSmartAccount,
105
105
  {
106
106
  smart_account_id: 1,
@@ -125,7 +125,7 @@ describe('Test SuccessfullyConnected', () => {
125
125
  await act(async () => {
126
126
  handleFinish.props.onPress();
127
127
  });
128
- expect(global.mockedDispatch).toBeCalledWith({
128
+ expect(global.mockedDispatch).toHaveBeenCalledWith({
129
129
  payload: {
130
130
  index: 0,
131
131
  routes: [
@@ -1,7 +1,7 @@
1
1
  import React, { memo, useCallback, useEffect, useState } from 'react';
2
2
  import { View, ScrollView, ActivityIndicator } from 'react-native';
3
3
  import { useNavigation, CommonActions } from '@react-navigation/native';
4
- import AntDesign from 'react-native-vector-icons/AntDesign';
4
+ import { IconOutline } from '@ant-design/icons-react-native';
5
5
 
6
6
  import _TextInput from '../../../commons/Form/TextInput';
7
7
  import Text from '../../../commons/Text';
@@ -134,7 +134,7 @@ const SuccessfullyConnected = memo(({ route }) => {
134
134
  <View style={styles.wrap}>
135
135
  <ScrollView>
136
136
  <View style={styles.body}>
137
- <AntDesign name="check-circle" size={28} color={Colors.Green6} />
137
+ <IconOutline name="check-circle" size={28} color={Colors.Green6} />
138
138
  <Text bold style={styles.connectingText}>
139
139
  {t('successfully_connected')}
140
140
  </Text>
@@ -1,14 +1,14 @@
1
+ import MockAdapter from 'axios-mock-adapter';
1
2
  import React from 'react';
2
3
  import renderer, { act } from 'react-test-renderer';
4
+ import Text from '../../../commons/Text';
5
+ import { API } from '../../../configs';
3
6
  import { SCProvider } from '../../../context';
4
7
  import { mockSCStore } from '../../../context/mockStore';
5
- import SmartAccountConnecting from '../Connecting';
6
- import Text from '../../../commons/Text';
7
- import MockAdapter from 'axios-mock-adapter';
8
+ import t from '../../../hooks/Common/useTranslations';
8
9
  import api from '../../../utils/Apis/axios';
9
- import { API } from '../../../configs';
10
10
  import Routes from '../../../utils/Route';
11
- import t from '../../../hooks/Common/useTranslations';
11
+ import SmartAccountConnecting from '../Connecting';
12
12
 
13
13
  const mock = new MockAdapter(api.axiosInstance);
14
14
 
@@ -53,7 +53,7 @@ describe('Test Connecting', () => {
53
53
  await act(async () => {
54
54
  tree = await renderer.create(wrapComponent(route));
55
55
  });
56
- expect(global.mockedNavigate).toBeCalledWith(Routes.SmartAccount, {
56
+ expect(global.mockedNavigate).toHaveBeenCalledWith(Routes.SmartAccount, {
57
57
  params: {},
58
58
  });
59
59
  });
@@ -1,14 +1,14 @@
1
1
  import React from 'react';
2
- import renderer, { act } from 'react-test-renderer';
3
- import Toast from 'react-native-toast-message';
4
2
  import { ScrollView, TouchableOpacity } from 'react-native';
5
- import { SCProvider } from '../../../context';
6
- import { mockSCStore } from '../../../context/mockStore';
7
- import SmartAccount from '../index';
8
- import AccessibilityLabel from '../../../configs/AccessibilityLabel';
3
+ import Toast from 'react-native-toast-message';
4
+ import renderer, { act } from 'react-test-renderer';
9
5
  import TextInput from '../../../commons/Form/TextInput';
10
6
  import _TextInputPassword from '../../../commons/Form/TextInputPassword';
7
+ import AccessibilityLabel from '../../../configs/AccessibilityLabel';
8
+ import { SCProvider } from '../../../context';
9
+ import { mockSCStore } from '../../../context/mockStore';
11
10
  import Routes from '../../../utils/Route';
11
+ import SmartAccount from '../index';
12
12
 
13
13
  const wrapComponent = (route) => (
14
14
  <SCProvider initState={mockSCStore({})}>
@@ -98,7 +98,7 @@ describe('Test SmartAccount', () => {
98
98
  await act(async () => {
99
99
  await touchableOpacity.props.onPress();
100
100
  });
101
- expect(Toast.show).toBeCalledWith({
101
+ expect(Toast.show).toHaveBeenCalledWith({
102
102
  type: 'error',
103
103
  position: 'bottom',
104
104
  text1: 'Please select a supplier',
@@ -152,7 +152,7 @@ describe('Test SmartAccount', () => {
152
152
  await act(async () => {
153
153
  await touchableOpacity.props.onPress();
154
154
  });
155
- expect(global.mockedNavigate).toBeCalledWith(
155
+ expect(global.mockedNavigate).toHaveBeenCalledWith(
156
156
  Routes.SmartAccountConnecting,
157
157
  {
158
158
  brand: 'google_home',
@@ -206,7 +206,7 @@ describe('Test SmartAccount', () => {
206
206
  await act(async () => {
207
207
  await touchableOpacity.props.onPress();
208
208
  });
209
- expect(global.mockedNavigate).toBeCalledWith(Routes.AddDeviceStack, {
209
+ expect(global.mockedNavigate).toHaveBeenCalledWith(Routes.AddDeviceStack, {
210
210
  screen: 'AddCommonSelectUnit',
211
211
  params: {
212
212
  addType: 'AddHassioDevice',
@@ -236,7 +236,7 @@ describe('Test SmartAccount', () => {
236
236
  await touchSupplierItem[1].props.onPress();
237
237
  });
238
238
  expect(touchSupplierItem).toBeDefined();
239
- expect(global.mockedNavigate).toBeCalledWith(Routes.Browser, {
239
+ expect(global.mockedNavigate).toHaveBeenCalledWith(Routes.Browser, {
240
240
  // eslint-disable-next-line max-len
241
241
  link: 'https://qt-vn.m.lgaccount.com/emp/v2/authorize?client_id=2b85aee334f046848341547894bb7c4e&redirect_uri=app://eoh/sync-lg-device&response_type=code&state=1',
242
242
  });
@@ -9,8 +9,9 @@ import { AccessibilityLabel } from '../../../configs/Constants';
9
9
  import TextInput from '../../../commons/Form/TextInput';
10
10
  import { ModalCustom } from '../../../commons/Modal';
11
11
  import { TouchableOpacity } from 'react-native';
12
- import AntDesign from 'react-native-vector-icons/AntDesign';
12
+
13
13
  import MaterialIcons from 'react-native-vector-icons/MaterialIcons';
14
+ import { IconOutline } from '@ant-design/icons-react-native';
14
15
 
15
16
  const wrapComponent = (route) => (
16
17
  <SCProvider initState={mockSCStore({})}>
@@ -133,7 +134,7 @@ describe('Test GroupButtonByType', () => {
133
134
  const icon = instance.find(
134
135
  (el) =>
135
136
  el.props.accessibilityLabel ===
136
- AccessibilityLabel.ICON_OUTLINE_TYPE_RELOAD && el.type === AntDesign
137
+ AccessibilityLabel.ICON_OUTLINE_TYPE_RELOAD && el.type === IconOutline
137
138
  );
138
139
  await act(async () => {
139
140
  await touch.props.onPress();
@@ -5,7 +5,7 @@ import { useTranslations } from '../../../../hooks/Common/useTranslations';
5
5
  import SmartTiviActionTemplate from '../../../../commons/ActionGroup/SmartTiviActionTemplate/SmartTiviActionTemplate';
6
6
  import Text from '../../../../commons/Text';
7
7
  import { ModalCustom } from '../../../../commons/Modal';
8
- import AntDesign from 'react-native-vector-icons/AntDesign';
8
+ import { IconOutline } from '@ant-design/icons-react-native';
9
9
  import MaterialIcons from 'react-native-vector-icons/MaterialIcons';
10
10
  import { Colors } from '../../../../configs';
11
11
  import TextInput from '../../../../commons/Form/TextInput';
@@ -58,7 +58,7 @@ const GroupButtonByType = memo(({ route }) => {
58
58
  style={[styles.headerButton]}
59
59
  accessibilityLabel={AccessibilityLabel.HEADER_BUTTON_TYPE_RELOAD}
60
60
  >
61
- <AntDesign
61
+ <IconOutline
62
62
  name={'reload1'}
63
63
  size={27}
64
64
  color={Colors.Black}
@@ -5,7 +5,7 @@ import { HeaderCustom } from '../../../commons/Header';
5
5
  import { useTranslations } from '../../../hooks/Common/useTranslations';
6
6
  import Routes from '../../../utils/Route';
7
7
  import { RowItem } from '../../../commons/RowItem';
8
- import AntDesign from 'react-native-vector-icons/AntDesign';
8
+ import { IconOutline } from '@ant-design/icons-react-native';
9
9
  import { Colors } from '../../../configs';
10
10
 
11
11
  import styles from './SelectBrandStyles';
@@ -47,7 +47,7 @@ const SelectDeviceType = memo(({ route }) => {
47
47
  key={index.toString()}
48
48
  isShowSubText={false}
49
49
  rightComponent={
50
- <AntDesign name="right" size={20} color={Colors.Gray7} />
50
+ <IconOutline name="right" size={20} color={Colors.Gray7} />
51
51
  }
52
52
  />
53
53
  );
@@ -64,7 +64,7 @@ const AddSubUnit = ({ route }) => {
64
64
  lat: location.latitude,
65
65
  lng: location.longitude,
66
66
  };
67
- const formData = createFormData(dataObj, ['background']);
67
+ const formData = createFormData(dataObj, ['background', 'lat', 'lng']);
68
68
  const { success, data } = await axiosPost(
69
69
  API.UNIT.CREATE_UNIT(),
70
70
  formData,
@@ -120,9 +120,7 @@ const AddSubUnit = ({ route }) => {
120
120
  routeName: Routes.DashboardStack,
121
121
  };
122
122
  if (isInsideUnit) {
123
- navigate(Routes.UnitDetail, {
124
- params: commonPrams,
125
- });
123
+ navigate(Routes.UnitDetail, commonPrams);
126
124
  } else {
127
125
  dispatch(
128
126
  replace(Routes.UnitStack, {
@@ -18,7 +18,7 @@ import AlertAction from '../../commons/AlertAction';
18
18
  import _TextInput from '../../commons/Form/TextInput';
19
19
  import Text from '../../commons/Text';
20
20
  import { AccessibilityLabel } from '../../configs/Constants';
21
- import AntDesign from 'react-native-vector-icons/AntDesign';
21
+ import { IconOutline } from '@ant-design/icons-react-native';
22
22
  import { useEmeragencyContacts } from './hooks/useEmergencyContacts';
23
23
  import useKeyboardAnimated from '../../hooks/Explore/useKeyboardAnimated';
24
24
  import styles from './EditSubUnitStyles';
@@ -207,7 +207,7 @@ const EditSubUnit = ({ route }) => {
207
207
  <Text type={'H4'} color={Colors.Gray9}>
208
208
  {t('emergency_contacts')}
209
209
  </Text>
210
- <AntDesign name={'right'} size={20} color={Colors.Gray8} />
210
+ <IconOutline name={'right'} size={20} color={Colors.Gray8} />
211
211
  </TouchableOpacity>
212
212
  <Text
213
213
  type={'Body'}
@@ -14,7 +14,7 @@ import WrapHeaderScrollable from '../../commons/Sharing/WrapHeaderScrollable';
14
14
  import Text from '../../commons/Text';
15
15
 
16
16
  import styles from './ManageSubUnitStyles';
17
- import AntDesign from 'react-native-vector-icons/AntDesign';
17
+ import { IconOutline } from '@ant-design/icons-react-native';
18
18
  import MaterialIcons from 'react-native-vector-icons/MaterialIcons';
19
19
  import Routes from '../../utils/Route';
20
20
  import { RowItem } from '../../commons/RowItem';
@@ -54,7 +54,7 @@ const ManageSubUnit = ({ route }) => {
54
54
  onPress={addSubUnit}
55
55
  style={styles.headerButton}
56
56
  >
57
- <AntDesign name={'plus'} size={27} color={Colors.Black} />
57
+ <IconOutline name={'plus'} size={27} color={Colors.Black} />
58
58
  </TouchableOpacity>
59
59
  <TouchableOpacity
60
60
  // onPress={handleShowMenuAction}
@@ -112,7 +112,7 @@ const ManageSubUnit = ({ route }) => {
112
112
  } devices`}
113
113
  onPress={() => goToEditSubUnit(item, unit)}
114
114
  rightComponent={
115
- <AntDesign
115
+ <IconOutline
116
116
  name="right"
117
117
  size={20}
118
118
  color={Colors.Gray6}
@@ -244,19 +244,17 @@ describe('Test AddSubUnit', () => {
244
244
  await viewButtonBottom.props.onRightClick();
245
245
  });
246
246
  expect(global.mockedNavigate).toHaveBeenCalledWith('UnitDetail', {
247
- params: {
248
- isAddSubUnit: true,
249
- routeName: 'DashboardStack',
250
- stationId: undefined,
251
- unitData: {
252
- id: 1,
253
- name: 'Unit name',
254
- location: {
255
- description: 'location',
256
- },
247
+ isAddSubUnit: true,
248
+ routeName: 'DashboardStack',
249
+ stationId: undefined,
250
+ unitData: {
251
+ id: 1,
252
+ name: 'Unit name',
253
+ location: {
254
+ description: 'location',
257
255
  },
258
- unitId: 1,
259
256
  },
257
+ unitId: 1,
260
258
  });
261
259
  });
262
260
 
@@ -9,6 +9,7 @@ import React, {
9
9
  import { Image, TouchableOpacity, View } from 'react-native';
10
10
  import DraggableFlatList from 'react-native-draggable-flatlist';
11
11
 
12
+ import { GestureHandlerRootView } from 'react-native-gesture-handler';
12
13
  import { EmptyComponent } from '../../commons/DevMode';
13
14
  import { HeaderCustom } from '../../commons/Header';
14
15
  import Text from '../../commons/Text';
@@ -16,9 +17,9 @@ import { Images } from '../../configs';
16
17
  import { SCContext } from '../../context';
17
18
  import { Action } from '../../context/actionType';
18
19
  import t from '../../hooks/Common/useTranslations';
20
+ import { notImplemented } from '../../utils/Utils';
19
21
  import { SensorDisplayItem } from '../Device/components/SensorDisplayItem';
20
22
  import styles from './Styles/EditTemplateStyle';
21
- import { notImplemented } from '../../utils/Utils';
22
23
 
23
24
  const EditTemplate = () => {
24
25
  const { setAction } = useContext(SCContext);
@@ -100,7 +101,7 @@ const EditTemplate = () => {
100
101
  {!actionsList?.length ? (
101
102
  renderEmpty
102
103
  ) : (
103
- <>
104
+ <GestureHandlerRootView>
104
105
  <View style={styles.wrapDescription}>
105
106
  <Text style={styles.description}>
106
107
  {t('hold_and_hover_description')}
@@ -109,7 +110,8 @@ const EditTemplate = () => {
109
110
  <DraggableFlatList
110
111
  showsVerticalScrollIndicator={false}
111
112
  data={actionsList}
112
- renderItem={({ item, index, drag }) => {
113
+ renderItem={({ item, getIndex, drag }) => {
114
+ const index = getIndex();
113
115
  return (
114
116
  <TouchableOpacity
115
117
  onLongPress={onDrag(item, drag)}
@@ -153,7 +155,7 @@ const EditTemplate = () => {
153
155
  <Text style={styles.save}>{t('save')}</Text>
154
156
  </TouchableOpacity>
155
157
  </View>
156
- </>
158
+ </GestureHandlerRootView>
157
159
  )}
158
160
  </View>
159
161
  );
@@ -1,14 +1,14 @@
1
1
  import React from 'react';
2
- import { act, create } from 'react-test-renderer';
3
2
  import DraggableFlatList from 'react-native-draggable-flatlist';
3
+ import { act, create } from 'react-test-renderer';
4
4
 
5
+ import { useRoute } from '@react-navigation/native';
6
+ import { TouchableOpacity } from 'react-native';
7
+ import Text from '../../../commons/Text';
5
8
  import { SCProvider } from '../../../context';
6
9
  import { mockSCStore } from '../../../context/mockStore';
7
- import EditTemplate from '../EditTemplate';
8
- import Text from '../../../commons/Text';
9
- import { useRoute } from '@react-navigation/native';
10
10
  import { getTranslate } from '../../../utils/I18n';
11
- import { TouchableOpacity } from 'react-native';
11
+ import EditTemplate from '../EditTemplate';
12
12
 
13
13
  const wrapComponent = () => (
14
14
  <SCProvider initState={mockSCStore({})}>
@@ -67,7 +67,7 @@ describe('Test EditTemplate', () => {
67
67
  await firstItem.props.onLongPress();
68
68
  });
69
69
 
70
- expect(global.mockedGoBack).toBeCalled();
70
+ expect(global.mockedGoBack).toHaveBeenCalled();
71
71
 
72
72
  await act(async () => {
73
73
  await DraggableFlatLists[0].props.onDragEnd({
@@ -79,6 +79,6 @@ describe('Test EditTemplate', () => {
79
79
  .findByProps({ accessibilityLabel: 'Save' })
80
80
  .props.onPress();
81
81
  });
82
- expect(global.mockedGoBack).toBeCalled();
82
+ expect(global.mockedGoBack).toHaveBeenCalled();
83
83
  });
84
84
  });
@@ -4,13 +4,13 @@ import React from 'react';
4
4
  import { TouchableOpacity } from 'react-native';
5
5
  import { act, create } from 'react-test-renderer';
6
6
 
7
+ import MenuActionMore from '../../../commons/MenuActionMore';
8
+ import ModalPopupCT from '../../../commons/ModalPopupCT';
7
9
  import { API } from '../../../configs';
8
10
  import { SCProvider } from '../../../context';
9
11
  import { mockSCStore } from '../../../context/mockStore';
10
12
  import api from '../../../utils/Apis/axios';
11
13
  import Detail from '../detail';
12
- import ModalPopupCT from '../../../commons/ModalPopupCT';
13
- import MenuActionMore from '../../../commons/MenuActionMore';
14
14
 
15
15
  const mock = new MockAdapter(api.axiosInstance);
16
16
 
@@ -59,7 +59,7 @@ describe('Test Detail', () => {
59
59
  const instance = tree.root;
60
60
  const touchableOpacities = instance.findAllByType(TouchableOpacity);
61
61
  await touchableOpacities[0].props.onPress();
62
- expect(global.mockedGoBack).toBeCalled();
62
+ expect(global.mockedGoBack).toHaveBeenCalled();
63
63
  });
64
64
 
65
65
  it('Test render onClick more header onPress delete', async () => {
@@ -95,7 +95,7 @@ describe('Test Detail', () => {
95
95
  await act(async () => {
96
96
  await menuActionMore.props.onItemClick(item);
97
97
  });
98
- expect(mockDoAction).toBeCalled();
98
+ expect(mockDoAction).toHaveBeenCalled();
99
99
  const modalPopupCT = instance.findByType(ModalPopupCT);
100
100
  mock.onGet(API.DEV_MODE.DASHBOARD.DETAIL(1)).reply(200);
101
101
  await act(async () => {
@@ -27,7 +27,7 @@ describe('Test Template screen', () => {
27
27
  expect(FlatLists).toHaveLength(1);
28
28
  const touchableOpacities = instance.findAllByType(TouchableOpacity);
29
29
  await touchableOpacities[0].props.onPress();
30
- expect(global.mockedNavigate).toBeCalled();
30
+ expect(global.mockedNavigate).toHaveBeenCalled();
31
31
  });
32
32
 
33
33
  it('Test onSearch', async () => {
@@ -2,16 +2,14 @@ import React, { memo, useMemo } from 'react';
2
2
  import { ScrollView, StyleSheet, TouchableOpacity, View } from 'react-native';
3
3
  import { getStatusBarHeight } from 'react-native-iphone-x-helper';
4
4
 
5
- import { useTranslations } from '../../hooks/Common/useTranslations';
6
- import { Colors, Theme } from '../../configs';
7
5
  import Text from '../../commons/Text';
6
+ import { Colors, Theme } from '../../configs';
8
7
  import { AccessibilityLabel } from '../../configs/Constants';
9
8
  import { useSCContextSelector } from '../../context';
10
- import useTitleHeader from '../../hooks/Common/useTitleHeader';
9
+ import { useTranslations } from '../../hooks/Common/useTranslations';
11
10
 
12
11
  const UVIndexGuide = memo(() => {
13
12
  const t = useTranslations();
14
- useTitleHeader(t('UV Index Guide'));
15
13
  const language = useSCContextSelector((state) => state.language);
16
14
 
17
15
  const data = useMemo(
@@ -8,7 +8,7 @@ import React, {
8
8
  } from 'react';
9
9
  import { View, ScrollView, TouchableOpacity } from 'react-native';
10
10
  import { useNavigation } from '@react-navigation/native';
11
- import AntDesign from 'react-native-vector-icons/AntDesign';
11
+ import { IconOutline } from '@ant-design/icons-react-native';
12
12
  import { HeaderCustom } from '../../commons/Header';
13
13
  import Text from '../../commons/Text';
14
14
  import NavBar from '../../commons/NavBar';
@@ -142,7 +142,7 @@ const SelectAddToFavorites = memo(({ route }) => {
142
142
  style={styles.buttonClose}
143
143
  onPress={goBack}
144
144
  >
145
- <AntDesign name={'close'} size={24} color={Colors.Black} />
145
+ <IconOutline name={'close'} size={24} color={Colors.Black} />
146
146
  </TouchableOpacity>
147
147
  ),
148
148
  // eslint-disable-next-line react-hooks/exhaustive-deps
@@ -1,17 +1,17 @@
1
- import React, { memo, useCallback, useEffect, useRef, useState } from 'react';
2
- import { TouchableOpacity, View, ScrollView } from 'react-native';
3
- import MapView, { Marker, Circle, PROVIDER_GOOGLE } from 'react-native-maps';
1
+ import { IconOutline } from '@ant-design/icons-react-native';
4
2
  import { useNavigation } from '@react-navigation/native';
5
- import AntDesign from 'react-native-vector-icons/AntDesign';
6
- import MaterialIcons from 'react-native-vector-icons/MaterialIcons';
3
+ import React, { memo, useCallback, useEffect, useRef, useState } from 'react';
4
+ import { ScrollView, TouchableOpacity, View } from 'react-native';
5
+ import MapView, { Circle, Marker, PROVIDER_GOOGLE } from 'react-native-maps';
7
6
  import { check, RESULTS } from 'react-native-permissions';
7
+ import MaterialIcons from 'react-native-vector-icons/MaterialIcons';
8
8
  import { openPromptEnableLocation } from '../../utils/Setting/Location';
9
9
 
10
+ import { FullLoading } from '../../commons';
10
11
  import BottomButtonView from '../../commons/BottomButtonView';
11
12
  import SearchBarLocation from '../../commons/SearchLocation';
12
13
  import RowLocation from '../../commons/SearchLocation/RowLocation';
13
14
  import Text from '../../commons/Text';
14
- import { FullLoading } from '../../commons';
15
15
  import { useTranslations } from '../../hooks/Common/useTranslations';
16
16
  import {
17
17
  GEOLOCATION_ERROR,
@@ -19,15 +19,15 @@ import {
19
19
  OpenSetting,
20
20
  } from '../../utils/Permission/common';
21
21
 
22
- import styles from './SelectAddressStyles';
23
22
  import { API, Colors, SCConfig } from '../../configs';
24
- import { axiosGet } from '../../utils/Apis/axios';
25
- import Routes from '../../utils/Route';
26
23
  import {
27
24
  AccessibilityLabel,
28
- MAP_INITIAL_REGION,
29
25
  EOH_LOCATION,
26
+ MAP_INITIAL_REGION,
30
27
  } from '../../configs/Constants';
28
+ import { axiosGet } from '../../utils/Apis/axios';
29
+ import Routes from '../../utils/Route';
30
+ import styles from './SelectAddressStyles';
31
31
 
32
32
  navigator.geolocation = require('@react-native-community/geolocation');
33
33
 
@@ -210,7 +210,11 @@ const SelectAddress = memo(({ route }) => {
210
210
  style={styles.button}
211
211
  accessibilityLabel={AccessibilityLabel.BUTTON_CHOOSE_ON_MAP}
212
212
  >
213
- <AntDesign name="enviroment" size={27} color={Colors.Primary} />
213
+ <IconOutline
214
+ name="environment"
215
+ size={27}
216
+ color={Colors.Primary}
217
+ />
214
218
  <Text type="Body" color={Colors.Gray9} style={styles.text} bold>
215
219
  {t('choose_on_map')}
216
220
  </Text>
@@ -248,7 +252,7 @@ const SelectAddress = memo(({ route }) => {
248
252
  }}
249
253
  tracksViewChanges={false}
250
254
  >
251
- <AntDesign name="enviroment" size={27} color={Colors.Blue10} />
255
+ <IconOutline name="environment" size={27} color={Colors.Blue10} />
252
256
  </Marker>
253
257
  </>
254
258
  )}
@@ -52,6 +52,6 @@ describe('Test Station', () => {
52
52
  });
53
53
  const touchableOpacities = instance.findAllByType(TouchableOpacity);
54
54
  await touchableOpacities[0].props.onPress();
55
- expect(mockOnSnapToItem).toBeCalled();
55
+ expect(mockOnSnapToItem).toHaveBeenCalled();
56
56
  });
57
57
  });
@@ -1,16 +1,16 @@
1
+ import MockAdapter from 'axios-mock-adapter';
1
2
  import React from 'react';
2
3
  import { act, create } from 'react-test-renderer';
3
- import MockAdapter from 'axios-mock-adapter';
4
4
 
5
+ import BottomButtonView from '../../../commons/BottomButtonView';
6
+ import NavBar from '../../../commons/NavBar';
7
+ import { API } from '../../../configs';
5
8
  import { SCProvider } from '../../../context';
6
9
  import { mockSCStore } from '../../../context/mockStore';
7
- import SelectAddToFavorites from '../SelectAddToFavorites';
8
- import NavBar from '../../../commons/NavBar';
10
+ import api from '../../../utils/Apis/axios';
9
11
  import Device from '../../Automate/AddNewAction/Device';
10
12
  import AutomateScript from '../components/AutomateScript';
11
- import BottomButtonView from '../../../commons/BottomButtonView';
12
- import { API } from '../../../configs';
13
- import api from '../../../utils/Apis/axios';
13
+ import SelectAddToFavorites from '../SelectAddToFavorites';
14
14
 
15
15
  const wrapComponent = (route) => (
16
16
  <SCProvider initState={mockSCStore({})}>
@@ -154,7 +154,7 @@ describe('Test SelectAddToFavorites', () => {
154
154
  await bottomButton.props.onPressMain();
155
155
  });
156
156
  expect(mock.history.post).toHaveLength(2);
157
- expect(global.mockedGoBack).toBeCalled();
157
+ expect(global.mockedGoBack).toHaveBeenCalled();
158
158
  });
159
159
 
160
160
  it('test select only devices then click done', async () => {
@@ -187,7 +187,7 @@ describe('Test SelectAddToFavorites', () => {
187
187
  await bottomButton.props.onPressMain();
188
188
  });
189
189
  expect(mock.history.post).toHaveLength(1);
190
- expect(global.mockedGoBack).toBeCalled();
190
+ expect(global.mockedGoBack).toHaveBeenCalled();
191
191
  });
192
192
 
193
193
  it('test select only scripts then click done', async () => {
@@ -216,7 +216,7 @@ describe('Test SelectAddToFavorites', () => {
216
216
  await bottomButton.props.onPressMain();
217
217
  });
218
218
  expect(mock.history.post).toHaveLength(1);
219
- expect(global.mockedGoBack).toBeCalled();
219
+ expect(global.mockedGoBack).toHaveBeenCalled();
220
220
  });
221
221
 
222
222
  it('test click done call api fail not goBack', async () => {