@eohjsc/react-native-smart-city 0.3.34 → 0.3.37

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 (321) hide show
  1. package/assets/images/AddNewDevice/on-icon.svg +5 -0
  2. package/assets/images/AddNewDevice/router-connect-icon.svg +3 -0
  3. package/package.json +1 -1
  4. package/src/commons/Action/__test__/ItemQuickAction.test.js +36 -32
  5. package/src/commons/ActionGroup/ColorPickerTemplate.js +61 -23
  6. package/src/commons/ActionGroup/OnOffSmartLock/AutoLock/__test__/index.test.js +2 -2
  7. package/src/commons/ActionGroup/OnOffSmartLock/PasscodeList/__test__/ItemPasscode.test.js +1 -1
  8. package/src/commons/ActionGroup/OnOffSmartLock/PasscodeList/__test__/index.test.js +1 -1
  9. package/src/commons/ActionGroup/OnOffSmartLock/SetupGeneratePasscode/__test__/index.test.js +2 -2
  10. package/src/commons/ActionGroup/SliderRangeTemplate.js +35 -20
  11. package/src/commons/ActionGroup/SmartTiviActionTemplate/__test__/CircleButton.test.js +12 -12
  12. package/src/commons/ActionGroup/SmartTiviActionTemplate/__test__/ControlPlay.test.js +10 -10
  13. package/src/commons/ActionGroup/SmartTiviActionTemplate/__test__/RectangleButton.test.js +7 -7
  14. package/src/commons/ActionGroup/SmartTiviActionTemplate/__test__/SmartTiviActionTemplate.test.js +23 -23
  15. package/src/commons/ActionGroup/StatesGridActionTemplate.js +1 -3
  16. package/src/commons/ActionGroup/__test__/ColorPickerTemplate.test.js +1 -1
  17. package/src/commons/ActionGroup/__test__/CurtainButtonTemplate.test.js +4 -4
  18. package/src/commons/ActionGroup/__test__/NumberUpDownTemplate.test.js +14 -14
  19. package/src/commons/ActionGroup/__test__/OnOffButtonTemplate.test.js +12 -12
  20. package/src/commons/ActionGroup/__test__/OnOffSmartLock.test.js +2 -2
  21. package/src/commons/ActionGroup/__test__/OnOffTemplate.test.js +10 -10
  22. package/src/commons/ActionGroup/__test__/OneBigButtonTemplate.test.js +2 -2
  23. package/src/commons/ActionGroup/__test__/OptionsDropdownTemplate.test.js +7 -7
  24. package/src/commons/ActionGroup/__test__/SliderRangeTemplate.test.js +1 -1
  25. package/src/commons/ActionGroup/__test__/StatesGridActionTemplate.test.js +2 -2
  26. package/src/commons/ActionGroup/__test__/ThreeButtonTemplate.test.js +2 -2
  27. package/src/commons/ActionGroup/__test__/TimerActionTemplate.test.js +3 -3
  28. package/src/commons/ActionGroup/__test__/TimerActionTemplateWithutConfigValue.test.js +2 -2
  29. package/src/commons/ActionGroup/__test__/TwoButtonTemplate.test.js +14 -14
  30. package/src/commons/ActionGroup/__test__/index.test.js +41 -41
  31. package/src/commons/ActionTemplate/OnOffButtonAction.js +6 -4
  32. package/src/commons/ActionTemplate/OnOffSimpleAction.js +9 -3
  33. package/src/commons/ActionTemplate/OnOffSmartLockAction.js +12 -10
  34. package/src/commons/ActionTemplate/__test__/OnOffButtonAction.test.js +3 -3
  35. package/src/commons/ActionTemplate/__test__/OnOffSimpleAction.test.js +3 -3
  36. package/src/commons/ActionTemplate/__test__/OneButtonAction.test.js +3 -3
  37. package/src/commons/ActionTemplate/__test__/ThreeButtonAction.test.js +3 -3
  38. package/src/commons/ActionTemplate/__test__/index.test.js +6 -6
  39. package/src/commons/ActionTemplate/index.js +15 -3
  40. package/src/commons/Alert/__test__/Alert.test.js +2 -2
  41. package/src/commons/AlertAction/__test__/AlertAction.test.js +2 -2
  42. package/src/commons/Auth/__test__/AccountItem.test.js +4 -4
  43. package/src/commons/Auth/__test__/AccountList.test.js +4 -4
  44. package/src/commons/Auth/__test__/OtpInputList.test.js +20 -16
  45. package/src/commons/Auth/__test__/SocialButton.test.js +6 -6
  46. package/src/commons/Automate/__test__/ItemAutomate.test.js +2 -2
  47. package/src/commons/Automate/__test__/ItemScriptAction.test.js +2 -2
  48. package/src/commons/BackDefault/__test__/BackDefault.test.js +2 -2
  49. package/src/commons/Button/__test__/Button.test.js +3 -3
  50. package/src/commons/ButtonPopup/__test__/ButtonPopup.test.js +2 -2
  51. package/src/commons/Calendar/__test__/Calendar.test.js +2 -2
  52. package/src/commons/ChartLoading/__test__/ChartLoading.test.js +2 -2
  53. package/src/commons/CircleButton/__test__/CircleButton.test.js +2 -2
  54. package/src/commons/CircleView/__test__/CircleView.test.js +2 -2
  55. package/src/commons/Dashboard/MyPinnedSharedUnit/__test__/MyPinnedSharedUnit.test.js +3 -3
  56. package/src/commons/Dashboard/MyUnit/__test__/MyUnit.test.js +2 -2
  57. package/src/commons/DateTimeRangeChange/__test__/DateTimeButton.test.js +4 -4
  58. package/src/commons/Device/Emergency/__test__/EmergencyButton.test.js +5 -5
  59. package/src/commons/Device/Emergency/__test__/EmergencyDetail.test.js +2 -2
  60. package/src/commons/Device/Hanet/ItemHanetDevice.test.js +5 -5
  61. package/src/commons/Device/HorizontalBarChart.js +2 -6
  62. package/src/commons/Device/LinearChart/LinearChart.test.js +2 -2
  63. package/src/commons/Device/RainningSensor/__test__/CurrentRainSensor.test.js +6 -6
  64. package/src/commons/Device/SonosSpeaker/__test__/SonosSpeaker.test.js +8 -8
  65. package/src/commons/Device/WindDirection/Compass/Compass.test.js +4 -4
  66. package/src/commons/Device/WindSpeed/LinearChart/__test__/LinearChart.test.js +2 -2
  67. package/src/commons/Device/WindSpeed/LinearChart/__test__/ValueBalloon.test.js +2 -2
  68. package/src/commons/Device/WindSpeed/__test__/Anemometer.test.js +4 -4
  69. package/src/commons/Device/WindSpeed/__test__/ChartInfo.test.js +5 -5
  70. package/src/commons/Device/__test__/ConnectedViewHeader.test.js +6 -6
  71. package/src/commons/Device/__test__/DeviceAlertStatus.test.js +6 -6
  72. package/src/commons/Device/__test__/DisconnectedView.test.js +12 -12
  73. package/src/commons/Device/__test__/FlatListItems.test.js +2 -2
  74. package/src/commons/Device/__test__/FooterInfo.test.js +2 -2
  75. package/src/commons/Device/__test__/SensorConnectedStatus.test.js +2 -2
  76. package/src/commons/DisplayChecking/__test__/DisplayChecking.test.js +2 -2
  77. package/src/commons/Explore/SearchBox/__test__/SearchBox.test.js +6 -6
  78. package/src/commons/Explore/__test__/CityItem.test.js +6 -6
  79. package/src/commons/Explore/__test__/HeaderExplore.test.js +2 -2
  80. package/src/commons/Explore/__test__/HeaderLabel.test.js +3 -3
  81. package/src/commons/Explore/__test__/LocationItem.test.js +3 -3
  82. package/src/commons/FieldTemplate/ChooseUserField/__test__/index.test.js +4 -4
  83. package/src/commons/FieldTemplate/PasscodeField/__test__/index.test.js +2 -2
  84. package/src/commons/FieldTemplate/ScheduleField/__test__/index.test.js +1 -1
  85. package/src/commons/Form/__test__/CurrencyInput.test.js +12 -12
  86. package/src/commons/Form/__test__/TextInput.test.js +4 -4
  87. package/src/commons/Form/__test__/TextInputPassword.test.js +5 -5
  88. package/src/commons/FourButtonFilterHistory/__test__/FourButtonFilterHistory.test.js +1 -1
  89. package/src/commons/GroupCheckBox/__test__/GroupCheckBox.test.js +12 -10
  90. package/src/commons/Header/__test__/HeaderCT.test.js +11 -11
  91. package/src/commons/ImageButton/__test__/ImageButton.test.js +2 -2
  92. package/src/commons/ImagePicker/__test__/ImagePicker.test.js +8 -8
  93. package/src/commons/MediaPlayerDetail/__test__/MediaPlayerDetail.test.js +1 -1
  94. package/src/commons/MediaPlayerDetail/__test__/MediaPlayerFull.test.js +8 -8
  95. package/src/commons/MenuActionAddnew/__test__/MenuActionAddNew.test.js +3 -3
  96. package/src/commons/MenuActionList/__test__/MenuActionList.test.js +3 -3
  97. package/src/commons/MenuActionMore/__test__/MenuActionMore.test.js +2 -2
  98. package/src/commons/Modal/__test__/ModalBottom.test.js +4 -4
  99. package/src/commons/OneTapTemplate/NumberUpDownActionTemplate.js +39 -13
  100. package/src/commons/OneTapTemplate/OptionsDropdownActionTemplate.js +33 -14
  101. package/src/commons/OneTapTemplate/StatesGridActionTemplate.js +9 -4
  102. package/src/commons/OneTapTemplate/__test__/NumberUpDownActionTemplate.test.js +25 -12
  103. package/src/commons/OneTapTemplate/__test__/OptionsDropdownActionTemplate.test.js +13 -13
  104. package/src/commons/OneTapTemplate/__test__/StatesGridActionTemplate.test.js +7 -7
  105. package/src/commons/PreventAccess/__test__/PreventAccess.test.js +7 -5
  106. package/src/commons/Processing/__test__/Connecting.test.js +61 -25
  107. package/src/commons/Processing/index.js +21 -7
  108. package/src/commons/RowItem/__test__/RowItem.test.js +2 -2
  109. package/src/commons/RowUser/__test__/RowUser.test.js +2 -2
  110. package/src/commons/SearchLocation/__test__/RowLocation.test.js +4 -4
  111. package/src/commons/Section/Section.test.js +4 -4
  112. package/src/commons/SelectSubUnit/__test__/SelectSubUnit.test.js +3 -3
  113. package/src/commons/SelectSubUnit/index.js +1 -1
  114. package/src/commons/SelectUnit/__test__/SelectUnit.test.js +3 -3
  115. package/src/commons/SelectUnit/index.js +3 -4
  116. package/src/commons/Sharing/__test__/BtnRemoveMember.test.js +3 -3
  117. package/src/commons/Sharing/__test__/ButtonRemoveMember.test.js +2 -2
  118. package/src/commons/Sharing/__test__/DevicePermissionsCheckbox.test.js +3 -3
  119. package/src/commons/Sharing/__test__/MemberList.test.js +8 -8
  120. package/src/commons/Sharing/__test__/RowMember.test.js +4 -4
  121. package/src/commons/Sharing/__test__/StationDevicePermission.test.js +7 -7
  122. package/src/commons/Sharing/__test__/WrapHeaderScrollable.test.js +6 -6
  123. package/src/commons/SubUnit/OneTap/__test__/SubUnitAutomate.test.js +6 -6
  124. package/src/commons/SubUnit/__test__/Favorites.test.js +3 -3
  125. package/src/commons/SubUnit/__test__/Item.test.js +4 -4
  126. package/src/commons/SubUnit/__test__/ShortDetail.test.js +16 -16
  127. package/src/commons/SummaryItem/__test__/SummaryItem.test.js +7 -7
  128. package/src/commons/Tabbar/__test__/index.test.js +1 -1
  129. package/src/commons/TextButton/__test__/TextButton.test.js +6 -6
  130. package/src/commons/Today/__test__/Today.test.js +2 -2
  131. package/src/commons/TouchableScale/__test__/TouchableScale.test.js +5 -5
  132. package/src/commons/Unit/__test__/HeaderUnit.test.js +3 -3
  133. package/src/commons/Unit/__test__/SharedUnit.test.js +13 -13
  134. package/src/commons/UnitSummary/AirQuality/__test__/index.test.js +25 -25
  135. package/src/commons/UnitSummary/ConfigHistoryChart/__test__/ConfigHistoryChart.test.js +258 -25
  136. package/src/commons/UnitSummary/ConfigHistoryChart/index.js +90 -1
  137. package/src/commons/UnitSummary/__test__/TotalPowerBox.test.js +2 -2
  138. package/src/commons/UnitSummary/__test__/TotalPowerConsumption.test.js +2 -2
  139. package/src/commons/ViewButtonBottom/__test__/ViewButtonBottom.test.js +3 -3
  140. package/src/commons/WheelDateTimePicker/__test__/index.test.js +2 -2
  141. package/src/commons/WrapParallaxScrollView/index.js +2 -1
  142. package/src/configs/API.js +6 -2
  143. package/src/configs/AccessibilityLabel.js +5 -0
  144. package/src/configs/Constants.js +2 -0
  145. package/src/hooks/Common/__test__/useAndroidTranslucentStatusBar.test.js +2 -2
  146. package/src/hooks/Common/__test__/useStatusbar.test.js +4 -4
  147. package/src/hooks/Common/__test__/useTranslations.test.js +1 -1
  148. package/src/hooks/IoT/__test__/useRemoteControl.test.js +7 -7
  149. package/src/hooks/IoT/useRemoteControl.js +0 -1
  150. package/src/iot/RemoteControl/__test__/Bluetooth.test.js +17 -17
  151. package/src/iot/RemoteControl/__test__/Internet.test.js +4 -4
  152. package/src/navigations/AddGatewayStack.js +10 -0
  153. package/src/screens/AQIGuide/__test__/AQIGuide.test.js +3 -3
  154. package/src/screens/ActivityLog/__test__/FilterPopup.test.js +2 -2
  155. package/src/screens/ActivityLog/__test__/ItemLog.test.js +21 -21
  156. package/src/screens/ActivityLog/hooks/__test__/index.test.js +1 -1
  157. package/src/screens/AddCommon/SelectUnit.js +1 -1
  158. package/src/screens/AddCommon/__test__/SelectSubUnit.test.js +4 -4
  159. package/src/screens/AddCommon/__test__/SelectUnit.test.js +11 -6
  160. package/src/screens/AddLocationMaps/__test__/index.test.js +6 -6
  161. package/src/screens/AddNewAction/Device/__test__/index.test.js +3 -3
  162. package/src/screens/AddNewAction/SelectAction.js +6 -1
  163. package/src/screens/AddNewAction/SetupSensor.js +6 -0
  164. package/src/screens/AddNewAction/__test__/SelectAction.test.js +128 -20
  165. package/src/screens/AddNewAction/__test__/SelectSensorDevices.test.js +10 -10
  166. package/src/screens/AddNewAction/__test__/SetupSensor.test.js +8 -8
  167. package/src/screens/AddNewAutoSmart/__test__/AddNewAutoSmart.test.js +2 -2
  168. package/src/screens/AddNewDevice/__test__/AddNewDevice.test.js +8 -8
  169. package/src/screens/AddNewDevice/__test__/ConnectingDevices.test.js +8 -8
  170. package/src/screens/AddNewGateway/ConnectingDevice.js +29 -7
  171. package/src/screens/AddNewGateway/ConnectingModbusDevice.js +0 -1
  172. package/src/screens/AddNewGateway/ConnectingWifiGuide.js +2 -2
  173. package/src/screens/AddNewGateway/ConnectingZigbeeDevice.js +3 -2
  174. package/src/screens/AddNewGateway/PlugAndPlay/ConnectRouterGuide.js +49 -0
  175. package/src/screens/AddNewGateway/PlugAndPlay/ConnectRouterGuideStyles.js +31 -0
  176. package/src/screens/AddNewGateway/PlugAndPlay/ZigbeeDeviceConnectGuide.js +51 -0
  177. package/src/screens/AddNewGateway/PlugAndPlay/__test__/FirstWarning.test.js +5 -5
  178. package/src/screens/AddNewGateway/ScanGatewayQR.js +11 -23
  179. package/src/screens/AddNewGateway/ScanModbusQR.js +75 -11
  180. package/src/screens/AddNewGateway/ScanWifiDeviceQR.js +19 -9
  181. package/src/screens/AddNewGateway/SelectDeviceSubUnit.js +26 -7
  182. package/src/screens/AddNewGateway/SelectDeviceType.js +8 -1
  183. package/src/screens/AddNewGateway/SelectZigbeeGateway.js +1 -1
  184. package/src/screens/AddNewGateway/ShareWifiPassword.js +1 -2
  185. package/src/screens/AddNewGateway/__test__/AddNewGateway.test.js +6 -6
  186. package/src/screens/AddNewGateway/__test__/ConnectingModbusDevice.test.js +1 -1
  187. package/src/screens/AddNewGateway/__test__/ConnectingWifiDevice.test.js +1 -1
  188. package/src/screens/AddNewGateway/__test__/ConnectingWifiGuide.test.js +9 -9
  189. package/src/screens/AddNewGateway/__test__/ConnectingZigbeeDevice.test.js +1 -1
  190. package/src/screens/AddNewGateway/__test__/RenameNewDevices.test.js +4 -4
  191. package/src/screens/AddNewGateway/__test__/ScanGatewayQR.test.js +4 -4
  192. package/src/screens/AddNewGateway/__test__/ScanModbusQR.test.js +8 -10
  193. package/src/screens/AddNewGateway/__test__/ScanWifiDeviceQR.test.js +9 -11
  194. package/src/screens/AddNewGateway/__test__/SelectDeviceSubUnit.test.js +4 -3
  195. package/src/screens/AddNewGateway/__test__/SelectDeviceType.test.js +6 -6
  196. package/src/screens/AddNewGateway/__test__/SelectDeviceUnit.test.js +1 -1
  197. package/src/screens/AddNewGateway/__test__/SelectModbusGateway.test.js +2 -2
  198. package/src/screens/AddNewGateway/__test__/SelectZigbeeGateway.test.js +3 -3
  199. package/src/screens/AddNewGateway/__test__/ShareWifiPassword.test.js +6 -6
  200. package/src/screens/AddNewOneTap/__test__/AddNewOneTap.test.js +4 -4
  201. package/src/screens/AllCamera/__test__/index.test.js +2 -2
  202. package/src/screens/Automate/__test__/Loading.test.js +2 -2
  203. package/src/screens/Automate/__test__/MultiUnits.test.js +10 -10
  204. package/src/screens/Automate/__test__/index.test.js +3 -3
  205. package/src/screens/ConfirmUnitDeletion/__test__/ConfirmUnitDeletion.test.js +2 -2
  206. package/src/screens/Device/EditDevice/__test__/EditDevice.test.js +4 -4
  207. package/src/screens/Device/__test__/DetailHistoryChart.test.js +2 -2
  208. package/src/screens/Device/__test__/detail.test.js +14 -14
  209. package/src/screens/Device/detail.js +10 -3
  210. package/src/screens/Device/utils/index.test.js +4 -4
  211. package/src/screens/Drawer/Drawer.test.js +1 -1
  212. package/src/screens/EditActionsList/__tests__/index.test.js +5 -5
  213. package/src/screens/EmergencyContacts/__test__/EmergencyContactAddNew.test.js +15 -15
  214. package/src/screens/EmergencyContacts/__test__/EmergencyContactList.test.js +19 -19
  215. package/src/screens/EmergencyContacts/__test__/EmergencyContactsSelectContacts.test.js +12 -12
  216. package/src/screens/EmergencySetting/__test__/DropDownItem.test.js +7 -7
  217. package/src/screens/EmergencySetting/__test__/index.test.js +3 -3
  218. package/src/screens/EnterPassword/__test__/EnterPassword.test.js +12 -12
  219. package/src/screens/Explore/__test__/Explore.test.js +3 -3
  220. package/src/screens/GuestInfo/__test__/index.test.js +3 -3
  221. package/src/screens/HanetCamera/__test__/CaptureFaceID.test.js +2 -2
  222. package/src/screens/HanetCamera/__test__/Detail.test.js +2 -2
  223. package/src/screens/HanetCamera/__test__/ManageAccess.test.js +5 -5
  224. package/src/screens/HanetCamera/__test__/MemberInfo.test.js +5 -5
  225. package/src/screens/HanetCamera/hooks/__test__/useHanetCheckinData.test.js +6 -6
  226. package/src/screens/HanetCamera/hooks/__test__/useHanetPlaceMembers.test.js +3 -3
  227. package/src/screens/ManageAccess/hooks/__test__/useManageAccess.test.js +11 -7
  228. package/src/screens/MoveToAnotherSubUnit/__test__/index.test.js +1 -1
  229. package/src/screens/Notification/__test__/Notification.test.js +5 -5
  230. package/src/screens/Notification/__test__/NotificationItem.test.js +41 -41
  231. package/src/screens/PlayBackCamera/__test__/Timer.test.js +3 -3
  232. package/src/screens/ScanChipQR/components/InvalidQRCode/index.js +33 -0
  233. package/src/screens/ScanChipQR/components/QRScan/__test__/QRScan.test.js +7 -7
  234. package/src/screens/ScanChipQR/components/QRScan/index.js +7 -5
  235. package/src/screens/ScriptDetail/__test__/index.test.js +31 -31
  236. package/src/screens/SetSchedule/__test__/SelectWeekday.test.js +1 -1
  237. package/src/screens/SetSchedule/__test__/index.test.js +4 -4
  238. package/src/screens/SharedUnit/__test__/ShareUnit.test.js +2 -2
  239. package/src/screens/SharedUnit/__test__/TabHeader.test.js +3 -3
  240. package/src/screens/Sharing/Components/__test__/DeviceItem.test.js +4 -4
  241. package/src/screens/Sharing/Components/__test__/ItemChangeRole.test.js +4 -4
  242. package/src/screens/Sharing/Components/__test__/TitleCheckBox.test.js +4 -4
  243. package/src/screens/Sharing/__test__/MemberList.test.js +1 -1
  244. package/src/screens/Sharing/__test__/MemberList2.test.js +1 -1
  245. package/src/screens/Sharing/__test__/SelectPermission.test.js +41 -41
  246. package/src/screens/Sharing/__test__/SelectUser.test.js +14 -14
  247. package/src/screens/SideMenuDetail/__test__/index.test.js +25 -4
  248. package/src/screens/SideMenuDetail/index.js +32 -19
  249. package/src/screens/SmartAccount/ListDevice/__test__/DeviceItem.test.js +3 -3
  250. package/src/screens/SmartAccount/ListDevice/__test__/ListDevice.test.js +13 -21
  251. package/src/screens/SmartAccount/ListDevice/index.js +1 -1
  252. package/src/screens/SmartAccount/SuccessfullyConnected/__test__/DeviceItem.test.js +6 -6
  253. package/src/screens/SmartAccount/SuccessfullyConnected/__test__/SuccessfullyConnected.test.js +6 -5
  254. package/src/screens/SmartAccount/SuccessfullyConnected/index.js +1 -0
  255. package/src/screens/SmartAccount/__test__/Connecting.test.js +4 -4
  256. package/src/screens/SmartAccount/__test__/SmartAccount.test.js +17 -17
  257. package/src/screens/SmartIr/__test__/ButtonsBottom.test.js +2 -2
  258. package/src/screens/SmartIr/__test__/GroupButtonByType.test.js +12 -12
  259. package/src/screens/SmartIr/__test__/SelectBrand.test.js +5 -5
  260. package/src/screens/SmartIr/__test__/SelectDeviceType.test.js +5 -5
  261. package/src/screens/SmartIr/__test__/SmartIr.test.js +5 -5
  262. package/src/screens/SubUnit/__test__/AddSubUnit.test.js +12 -12
  263. package/src/screens/SubUnit/__test__/Detail.test.js +6 -6
  264. package/src/screens/SubUnit/__test__/EditSubUnit.test.js +44 -44
  265. package/src/screens/SubUnit/__test__/ManageSubUnit.test.js +6 -6
  266. package/src/screens/SubUnit/hooks/__test__/useManageSubUnit.test.js +5 -5
  267. package/src/screens/SyncLGDevice/__test__/AddLGDevice.test.js +10 -10
  268. package/src/screens/TDSGuide/__test__/TDSGuide.test.js +3 -3
  269. package/src/screens/UVIndexGuide/__test__/UVIndexGuide.test.js +3 -3
  270. package/src/screens/Unit/ManageUnit.js +4 -45
  271. package/src/screens/Unit/ManageUnitStyles.js +5 -35
  272. package/src/screens/Unit/Station/__test__/index.test.js +1 -1
  273. package/src/screens/Unit/Summaries.js +11 -20
  274. package/src/screens/Unit/__test__/AddMenu.test.js +8 -8
  275. package/src/screens/Unit/__test__/CheckSendEmail.test.js +3 -3
  276. package/src/screens/Unit/__test__/ChooseLocation.test.js +2 -2
  277. package/src/screens/Unit/__test__/Detail.test.js +17 -17
  278. package/src/screens/Unit/__test__/ManageUnit.test.js +17 -17
  279. package/src/screens/Unit/__test__/MyAllUnit.test.js +5 -5
  280. package/src/screens/Unit/__test__/SelectAddToFavorites.test.js +4 -4
  281. package/src/screens/Unit/__test__/SelectAddress.test.js +10 -10
  282. package/src/screens/Unit/__test__/SmartAccount.test.js +4 -4
  283. package/src/screens/Unit/__test__/SmartAccountItem.test.js +1 -1
  284. package/src/screens/Unit/__test__/Summaries.test.js +2 -2
  285. package/src/screens/Unit/components/ButtonWrapper/index.js +60 -0
  286. package/src/screens/Unit/components/ButtonWrapper/styles.js +37 -0
  287. package/src/screens/Unit/components/MyAllUnit/__test__/Header.test.js +19 -19
  288. package/src/screens/Unit/components/MyAllUnit/__test__/MyAllUnit.test.js +3 -3
  289. package/src/screens/Unit/components/MyAllUnit/__test__/index.test.js +4 -4
  290. package/src/screens/Unit/components/__test__/Header.test.js +12 -12
  291. package/src/screens/Unit/components/__test__/MyUnitDevice.test.js +2 -2
  292. package/src/screens/Unit/components/__test__/SharedUnit.test.js +6 -6
  293. package/src/screens/UnitSummary/__test__/index.test.js +24 -24
  294. package/src/screens/UnitSummary/components/3PPowerConsumption/__test__/3PPowerConsumption.test.js +3 -3
  295. package/src/screens/UnitSummary/components/PowerConsumption/__test__/ItemPower.test.js +3 -3
  296. package/src/screens/UnitSummary/components/PowerConsumption/__test__/PowerConsumption.test.js +5 -5
  297. package/src/screens/UnitSummary/components/RunningDevices/__test__/index.test.js +3 -3
  298. package/src/screens/UnitSummary/components/Temperature/__test__/ChartAverage.test.js +3 -3
  299. package/src/screens/UnitSummary/components/Temperature/__test__/ItemAverage.test.js +3 -3
  300. package/src/screens/UnitSummary/components/UvIndex/__test__/index.test.js +18 -18
  301. package/src/screens/UnitSummary/components/WaterQuality/__test__/index.test.js +12 -12
  302. package/src/screens/UnitSummary/components/__test__/TotalPowerBox.test.js +2 -2
  303. package/src/screens/UnitSummary/components/__test__/TotalPowerConsumption.test.js +2 -2
  304. package/src/screens/UnitSummary/components/__test__/UnitSummary.test.js +8 -8
  305. package/src/screens/UnitSummary/components/__test__/index.test.js +5 -5
  306. package/src/screens/WaterQualityGuide/__test__/index.test.js +12 -12
  307. package/src/utils/Apis/axios.js +22 -0
  308. package/src/utils/Converter/__test__/array.test.js +1 -1
  309. package/src/utils/Converter/__test__/url.test.js +1 -1
  310. package/src/utils/Functions/__test__/Search.test.js +1 -1
  311. package/src/utils/Functions/__test__/ShortEmail.test.js +1 -1
  312. package/src/utils/I18n/translations/en.json +11 -1
  313. package/src/utils/I18n/translations/vi.json +11 -1
  314. package/src/utils/Route/index.js +3 -0
  315. package/src/utils/__test__/InitData.test.js +2 -2
  316. package/src/utils/__test__/Utils.test.js +2 -2
  317. package/src/commons/UnitSummary/ConfigHistoryChart.js +0 -105
  318. package/src/screens/AddNewDevice/hooks/ConnectDevices.js +0 -67
  319. package/src/screens/AddNewDevice/hooks/useStateAlertRename.js +0 -32
  320. package/src/screens/UnitSummary/components/PowerConsumeHistoryChart/__test__/index.test.js +0 -63
  321. package/src/screens/UnitSummary/components/PowerConsumeHistoryChart/index.js +0 -53
@@ -0,0 +1,51 @@
1
+ import React, { useCallback } from 'react';
2
+ import { View } from 'react-native';
3
+ import { useNavigation } from '@react-navigation/native';
4
+ import { useTranslations } from '../../../hooks/Common/useTranslations';
5
+ import Text from '../../../commons/Text';
6
+ import { HeaderCustom } from '../../../commons/Header';
7
+ import { ViewButtonBottom } from '../../../commons';
8
+ import TurnOnIcon from '../../../../assets/images/AddNewDevice/on-icon.svg';
9
+ import Routes from '../../../utils/Route';
10
+ import { Colors } from '../../../configs';
11
+ import styles from './ConnectRouterGuideStyles';
12
+
13
+ const ZigbeeDeviceConnectGuide = ({ route }) => {
14
+ const t = useTranslations();
15
+ const { navigate, goBack } = useNavigation();
16
+
17
+ const onRight = useCallback(() => {
18
+ navigate(Routes.ConnectingZigbeeDevice, {
19
+ ...route?.params,
20
+ });
21
+ }, [navigate, route]);
22
+
23
+ return (
24
+ <View style={styles.container}>
25
+ <HeaderCustom title={t('turn_on_zigbee_device')} isShowSeparator />
26
+ <View style={styles.contentContainer}>
27
+ <View style={styles.guideContent}>
28
+ <TurnOnIcon />
29
+ <Text type="H4" semibold style={styles.txtContent}>
30
+ {t('turn_on_device_to_connect')}
31
+ </Text>
32
+ <Text style={styles.txtContent}>
33
+ {t('turn_on_zigbee_device_content')}
34
+ </Text>
35
+ <Text semibold color={Colors.Gray7} style={styles.txtContent}>
36
+ {t('read_device_manual_guide')}
37
+ </Text>
38
+ </View>
39
+ <ViewButtonBottom
40
+ leftTitle={t('cancel')}
41
+ onLeftClick={goBack}
42
+ rightTitle={t('text_next')}
43
+ onRightClick={onRight}
44
+ styleButtonLeftText={styles.buttonLeftText}
45
+ />
46
+ </View>
47
+ </View>
48
+ );
49
+ };
50
+
51
+ export default ZigbeeDeviceConnectGuide;
@@ -35,7 +35,7 @@ describe('Test FirstWarning', () => {
35
35
  mockedNavigate.mockClear();
36
36
  });
37
37
 
38
- test('create', async () => {
38
+ it('create', async () => {
39
39
  await act(async () => {
40
40
  tree = await create(wrapComponent({ params: {} }));
41
41
  });
@@ -56,23 +56,23 @@ describe('Test FirstWarning', () => {
56
56
  });
57
57
  const instance = tree.root;
58
58
  const viewButtonBottom = instance.findByType(ViewButtonBottom);
59
- act(() => {
59
+ await act(async () => {
60
60
  viewButtonBottom.props.onRightClick();
61
61
  });
62
62
  expect(mockedNavigate).toHaveBeenCalled();
63
63
  };
64
64
 
65
- test('test ViewButtonBottom onRightClick from dashboard', async () => {
65
+ it('test ViewButtonBottom onRightClick from dashboard', async () => {
66
66
  await rightClick({});
67
67
  expect(mockedNavigate.mock.calls[0][0]).toEqual(Routes.SelectDeviceUnit);
68
68
  });
69
69
 
70
- test('test ViewButtonBottom onRightClick from unit', async () => {
70
+ it('test ViewButtonBottom onRightClick from unit', async () => {
71
71
  await rightClick({ unitId: 1 });
72
72
  expect(mockedNavigate.mock.calls[0][0]).toEqual(Routes.SelectDeviceType);
73
73
  });
74
74
 
75
- test('test ViewButtonBottom onRightClick from sub-unit', async () => {
75
+ it('test ViewButtonBottom onRightClick from sub-unit', async () => {
76
76
  await rightClick({ unitId: 1, stationId: 1 });
77
77
  expect(mockedNavigate.mock.calls[0][0]).toEqual(Routes.SelectDeviceType);
78
78
  });
@@ -1,16 +1,13 @@
1
1
  import React, { memo, useCallback, useState } from 'react';
2
2
  import { View, StyleSheet } from 'react-native';
3
- import QRScan from '../ScanChipQR/components/QRScan';
4
- import Routes from '../../utils/Route';
5
- import { useTranslations } from '../../hooks/Common/useTranslations';
6
3
  import { useNavigation } from '@react-navigation/native';
7
- import BottomSheet from '../../commons/BottomSheet';
8
- import Text from '../../commons/Text';
9
- import { ViewButtonBottom } from '../../commons';
4
+
5
+ import Routes from '../../utils/Route';
6
+ import QRScan from '../ScanChipQR/components/QRScan';
7
+ import InvalidQRCode from '../ScanChipQR/components/InvalidQRCode';
10
8
 
11
9
  const ScanGatewayQR = memo(({ route }) => {
12
10
  // same as Scan Wifi Device, not sure if we should separated it
13
- const t = useTranslations();
14
11
  const { unitId, stationId } = route?.params || {};
15
12
  const [isInvalidQrCode, setIsInvalidQrCode] = useState(false);
16
13
  const { navigate, goBack } = useNavigation();
@@ -35,13 +32,13 @@ const ScanGatewayQR = memo(({ route }) => {
35
32
  }
36
33
  navigate(Routes.ConnectingWifiGuide, {
37
34
  unitId,
38
- stationId,
35
+ stationId: stationId,
39
36
  prefix: devicePrefixName,
40
37
  qrData: data,
41
38
  });
42
39
  setLoading(true);
43
40
  },
44
- [navigate, unitId, stationId]
41
+ [navigate, stationId, unitId]
45
42
  );
46
43
 
47
44
  const onRetry = useCallback(() => {
@@ -53,17 +50,11 @@ const ScanGatewayQR = memo(({ route }) => {
53
50
  return (
54
51
  <View style={styles.container}>
55
52
  <QRScan onScan={onScan} />
56
- <BottomSheet isVisible={isInvalidQrCode} title={t('invalid_qr_code')}>
57
- <Text style={styles.warningContainer}>
58
- {t('invalid_qr_code_warning')}
59
- </Text>
60
- <ViewButtonBottom
61
- leftTitle={t('cancel')}
62
- onLeftClick={goBack}
63
- rightTitle={t('retry')}
64
- onRightClick={onRetry}
65
- />
66
- </BottomSheet>
53
+ <InvalidQRCode
54
+ isInvalidQrCode={isInvalidQrCode}
55
+ goBack={goBack}
56
+ onRetry={onRetry}
57
+ />
67
58
  </View>
68
59
  );
69
60
  });
@@ -72,9 +63,6 @@ const styles = StyleSheet.create({
72
63
  container: {
73
64
  flex: 1,
74
65
  },
75
- warningContainer: {
76
- paddingHorizontal: 16,
77
- },
78
66
  });
79
67
 
80
68
  export default ScanGatewayQR;
@@ -1,15 +1,23 @@
1
- import React, { memo, useCallback } from 'react';
1
+ import React, { memo, useCallback, useEffect, useState } from 'react';
2
2
  import { View, StyleSheet } from 'react-native';
3
- import QRScan from '../ScanChipQR/components/QRScan';
3
+ import { useNavigation } from '@react-navigation/native';
4
+
4
5
  import Routes from '../../utils/Route';
5
- import { ToastBottomHelper } from '../../utils/Utils';
6
6
  import { useTranslations } from '../../hooks/Common/useTranslations';
7
- import { useNavigation } from '@react-navigation/native';
7
+ import { ModalCustom } from '../../commons/Modal';
8
+ import { ViewButtonBottom } from '../../commons';
9
+ import useBoolean from '../../hooks/Common/useBoolean';
10
+ import Text from '../../commons/Text';
11
+ import QRScan from '../ScanChipQR/components/QRScan';
12
+ import InvalidQRCode from '../ScanChipQR/components/InvalidQRCode';
13
+ import { Colors } from '../../configs';
8
14
 
9
15
  const ScanModbusQR = memo(({ route }) => {
10
16
  const t = useTranslations();
11
17
  const { unitId, stationId, chipId } = route?.params || {};
12
- const navigation = useNavigation();
18
+ const { navigate, goBack } = useNavigation();
19
+ const [showPopupGuide, setShowPopupGuide, setHidePopupGuide] = useBoolean();
20
+ const [isInvalidQrCode, setIsInvalidQrCode] = useState(false);
13
21
 
14
22
  const onScan = useCallback(
15
23
  (body, setLoading) => {
@@ -17,29 +25,66 @@ const ScanModbusQR = memo(({ route }) => {
17
25
  try {
18
26
  data = JSON.parse(body);
19
27
  } catch (e) {
20
- ToastBottomHelper.error(t('wrong_qr_format'));
28
+ setIsInvalidQrCode(true);
21
29
  setLoading(false);
22
30
  return;
23
31
  }
24
32
  const devicePrefixName = data?.imei?.split('-')[0]; // todo Bang change QR format
25
33
  if (devicePrefixName !== 'SENSOR') {
26
- ToastBottomHelper.error(t('wrong_qr_format'));
34
+ setIsInvalidQrCode(true);
27
35
  setLoading(false);
28
36
  return;
29
37
  }
30
- navigation.navigate(Routes.ConnectingModbusDevice, {
38
+ navigate(Routes.ConnectingModbusDevice, {
31
39
  unitId,
32
- stationId,
40
+ stationId: stationId,
33
41
  chipId,
34
42
  qrData: data,
35
43
  });
36
44
  },
37
- [navigation, unitId, stationId, chipId, t]
45
+ [navigate, unitId, stationId, chipId]
38
46
  );
39
47
 
48
+ const onRetry = useCallback(() => {
49
+ if (isInvalidQrCode) {
50
+ setIsInvalidQrCode(false);
51
+ }
52
+ }, [isInvalidQrCode]);
53
+
54
+ useEffect(() => {
55
+ setShowPopupGuide();
56
+ }, [setShowPopupGuide]);
57
+
40
58
  return (
41
59
  <View style={styles.container}>
42
- <QRScan onScan={onScan} />
60
+ <QRScan isScanReady={!showPopupGuide} onScan={onScan} />
61
+ <ModalCustom
62
+ onBackButtonPress={goBack}
63
+ isVisible={showPopupGuide}
64
+ style={styles.modal}
65
+ >
66
+ <View style={styles.modalWrapper}>
67
+ <View style={styles.modalContent}>
68
+ <Text type="H4" semibold style={styles.txtCenter}>
69
+ {t('turn_off_device')}
70
+ </Text>
71
+ <Text style={styles.txtCenter}>
72
+ {t('turn_off_device_when_scan_qr_guide')}
73
+ </Text>
74
+ </View>
75
+ <ViewButtonBottom
76
+ leftTitle={t('cancel')}
77
+ onLeftClick={goBack}
78
+ rightTitle={t('ok')}
79
+ onRightClick={setHidePopupGuide}
80
+ />
81
+ </View>
82
+ </ModalCustom>
83
+ <InvalidQRCode
84
+ isInvalidQrCode={isInvalidQrCode}
85
+ goBack={goBack}
86
+ onRetry={onRetry}
87
+ />
43
88
  </View>
44
89
  );
45
90
  });
@@ -48,6 +93,25 @@ const styles = StyleSheet.create({
48
93
  container: {
49
94
  flex: 1,
50
95
  },
96
+ modal: {
97
+ flex: 1,
98
+ justifyContent: 'center',
99
+ alignItems: 'center',
100
+ },
101
+ modalWrapper: {
102
+ backgroundColor: Colors.White,
103
+ borderRadius: 10,
104
+ justifyContent: 'center',
105
+ alignItems: 'center',
106
+ width: 280,
107
+ },
108
+ modalContent: {
109
+ paddingHorizontal: 16,
110
+ paddingTop: 16,
111
+ },
112
+ txtCenter: {
113
+ textAlign: 'center',
114
+ },
51
115
  });
52
116
 
53
117
  export default ScanModbusQR;
@@ -1,15 +1,14 @@
1
- import React, { memo, useCallback } from 'react';
1
+ import React, { memo, useCallback, useState } from 'react';
2
2
  import { View, StyleSheet } from 'react-native';
3
3
  import QRScan from '../ScanChipQR/components/QRScan';
4
4
  import Routes from '../../utils/Route';
5
- import { ToastBottomHelper } from '../../utils/Utils';
6
- import { useTranslations } from '../../hooks/Common/useTranslations';
7
5
  import { useNavigation } from '@react-navigation/native';
6
+ import InvalidQRCode from '../ScanChipQR/components/InvalidQRCode';
8
7
 
9
8
  const ScanWifiDeviceQR = memo(({ route }) => {
10
- const t = useTranslations();
11
9
  const { unitId, stationId } = route?.params || {};
12
- const navigation = useNavigation();
10
+ const [isInvalidQrCode, setIsInvalidQrCode] = useState(false);
11
+ const { navigate, goBack } = useNavigation();
13
12
 
14
13
  const onScan = useCallback(
15
14
  (body, setLoading) => {
@@ -17,18 +16,18 @@ const ScanWifiDeviceQR = memo(({ route }) => {
17
16
  try {
18
17
  data = JSON.parse(body);
19
18
  } catch (e) {
20
- ToastBottomHelper.error(t('wrong_qr_format'));
19
+ setIsInvalidQrCode(true);
21
20
  setLoading(false);
22
21
  return;
23
22
  }
24
23
  const devicePrefixName = data?.imei?.split('-')[0];
25
24
  // todo Bang change QR format
26
25
  if (['ROBOT'].indexOf(devicePrefixName) === -1) {
27
- ToastBottomHelper.error(t('wrong_qr_format'));
26
+ setIsInvalidQrCode(true);
28
27
  setLoading(false);
29
28
  return;
30
29
  }
31
- navigation.navigate(Routes.ShareWifiPassword, {
30
+ navigate(Routes.ConnectingWifiGuide, {
32
31
  unitId,
33
32
  stationId,
34
33
  prefix: devicePrefixName,
@@ -36,12 +35,23 @@ const ScanWifiDeviceQR = memo(({ route }) => {
36
35
  });
37
36
  setLoading(true);
38
37
  },
39
- [navigation, unitId, stationId, t]
38
+ [navigate, unitId, stationId]
40
39
  );
41
40
 
41
+ const onRetry = useCallback(() => {
42
+ if (isInvalidQrCode) {
43
+ setIsInvalidQrCode(false);
44
+ }
45
+ }, [isInvalidQrCode]);
46
+
42
47
  return (
43
48
  <View style={styles.container}>
44
49
  <QRScan onScan={onScan} />
50
+ <InvalidQRCode
51
+ isInvalidQrCode={isInvalidQrCode}
52
+ goBack={goBack}
53
+ onRetry={onRetry}
54
+ />
45
55
  </View>
46
56
  );
47
57
  });
@@ -4,20 +4,39 @@ import { useCallback } from 'react';
4
4
  import { useTranslations } from '../../hooks/Common/useTranslations';
5
5
  import { useNavigation } from '@react-navigation/native';
6
6
  import Routes from '../../utils/Route';
7
+ import { DEVICE_TYPE } from '../../configs/Constants';
7
8
 
8
9
  const SelectDeviceSubUnit = ({ route }) => {
9
- const { unitId, unitName } = route?.params || {};
10
+ const { unitId, unitName, deviceType } = route?.params || {};
10
11
  const t = useTranslations();
11
12
  const navigation = useNavigation();
12
13
  const onPressNext = useCallback(
13
14
  (unit, subUnit) => {
14
- navigation.navigate(Routes.SelectDeviceType, {
15
- unitId,
16
- unitName,
17
- stationId: subUnit?.id,
18
- });
15
+ switch (deviceType) {
16
+ case DEVICE_TYPE.WIFI_DEVICE:
17
+ navigation.navigate(Routes.ScanWifiDeviceQR, {
18
+ unitId,
19
+ unitName,
20
+ stationId: subUnit?.id,
21
+ });
22
+ break;
23
+ case DEVICE_TYPE.MODBUS:
24
+ navigation.navigate(Routes.SelectModbusGateway, {
25
+ unitId,
26
+ unitName,
27
+ stationId: subUnit?.id,
28
+ });
29
+ break;
30
+ case DEVICE_TYPE.ZIGBEE:
31
+ navigation.navigate(Routes.ConnectRouterGuide, {
32
+ unitId,
33
+ unitName,
34
+ stationId: subUnit?.id,
35
+ });
36
+ break;
37
+ }
19
38
  },
20
- [navigation, unitId, unitName]
39
+ [deviceType, navigation, unitId, unitName]
21
40
  );
22
41
  return (
23
42
  <SelectSubUnit
@@ -13,6 +13,7 @@ import AddModbusDeviceIcon from '../../../assets/images/AddNewDevice/add-modbus-
13
13
  import AddZigbeeDeviceIcon from '../../../assets/images/AddNewDevice/add-zigbee-device-icon.svg';
14
14
  import styles from './SelectDeviceTypeStyles';
15
15
  import AccessibilityLabel from '../../configs/AccessibilityLabel';
16
+ import { DEVICE_TYPE } from '../../configs/Constants';
16
17
 
17
18
  const SelectDeviceGrid = ({ options, onSelect }) => {
18
19
  const [selectIndexes, setSelectIndexes] = useState();
@@ -76,6 +77,8 @@ const SelectDeviceType = ({ route }) => {
76
77
  data: {
77
78
  unitId,
78
79
  unitName,
80
+ stationId,
81
+ deviceType: DEVICE_TYPE.WIFI_DEVICE,
79
82
  },
80
83
  title: t('wifi_device'),
81
84
  subtitle: t('device_connect_without_gateway'),
@@ -89,6 +92,8 @@ const SelectDeviceType = ({ route }) => {
89
92
  data: {
90
93
  unitId,
91
94
  unitName,
95
+ stationId,
96
+ deviceType: DEVICE_TYPE.MODBUS,
92
97
  },
93
98
  title: t('modbus'),
94
99
  subtitle: t('device_connect_directly_to_the_gateway'),
@@ -97,11 +102,13 @@ const SelectDeviceType = ({ route }) => {
97
102
  id: 4,
98
103
  image: <AddZigbeeDeviceIcon width={60} height={60} />,
99
104
  route: stationId
100
- ? Routes.SelectZigbeeGateway
105
+ ? Routes.ConnectRouterGuide
101
106
  : Routes.SelectDeviceSubUnit,
102
107
  data: {
103
108
  unitId,
104
109
  unitName,
110
+ stationId,
111
+ deviceType: DEVICE_TYPE.ZIGBEE,
105
112
  },
106
113
  title: t('zigbee'),
107
114
  subtitle: t('device_connect_remotely_to_the_gateway'),
@@ -11,7 +11,7 @@ const SelectZigbeeGateway = ({ route }) => {
11
11
 
12
12
  const onPressNext = useCallback(
13
13
  (gateway) => {
14
- navigation.navigate(Routes.ConnectingZigbeeDevice, {
14
+ navigation.navigate(Routes.ZigbeeDeviceConnectGuide, {
15
15
  unitId,
16
16
  stationId,
17
17
  chipId: gateway.id,
@@ -92,12 +92,11 @@ const ShareWifiPassword = ({ route }) => {
92
92
  } catch (e) {
93
93
  return;
94
94
  }
95
-
96
95
  if (ssid !== currentSsid) {
97
96
  clearInterval(checkWifiInterval);
98
97
  navigation.navigate(Routes.ConnectingWifiDevice, {
99
98
  unitId,
100
- stationId,
99
+ stationId: stationId,
101
100
  gateway: gatewayInfo,
102
101
  selectedWifi: {
103
102
  ssid: selectedWifi,
@@ -57,7 +57,7 @@ describe('Test AddNewGateway', () => {
57
57
  return instance.find((el) => el.props.accessibilityLabel === id);
58
58
  };
59
59
 
60
- test('create', async () => {
60
+ it('create', async () => {
61
61
  await act(async () => {
62
62
  tree = await create(wrapComponent(route));
63
63
  });
@@ -78,7 +78,7 @@ describe('Test AddNewGateway', () => {
78
78
  expect(groupCheckBox).toHaveLength(0);
79
79
  });
80
80
 
81
- test('onChange chipName and phoneNumber', async () => {
81
+ it('onChange chipName and phoneNumber', async () => {
82
82
  await act(async () => {
83
83
  tree = await create(wrapComponent(route));
84
84
  });
@@ -104,7 +104,7 @@ describe('Test AddNewGateway', () => {
104
104
  expect(textInputs[1].props.value).toEqual('New chip name');
105
105
  });
106
106
 
107
- test('ViewButtonBottom', async () => {
107
+ it('ViewButtonBottom', async () => {
108
108
  await act(async () => {
109
109
  tree = await create(wrapComponent(route));
110
110
  });
@@ -119,7 +119,7 @@ describe('Test AddNewGateway', () => {
119
119
  );
120
120
  });
121
121
 
122
- test('ViewButtonBottom onLeftClick', async () => {
122
+ it('ViewButtonBottom onLeftClick', async () => {
123
123
  await act(async () => {
124
124
  tree = await create(wrapComponent(route));
125
125
  });
@@ -131,7 +131,7 @@ describe('Test AddNewGateway', () => {
131
131
  expect(mockedGoBack).toHaveBeenCalled();
132
132
  });
133
133
 
134
- test('ViewButtonBottom onRightClick without select stationId', async () => {
134
+ it('ViewButtonBottom onRightClick without select stationId', async () => {
135
135
  await act(async () => {
136
136
  tree = await create(wrapComponent(route));
137
137
  });
@@ -143,7 +143,7 @@ describe('Test AddNewGateway', () => {
143
143
  expect(mockedNavigate).not.toHaveBeenCalled();
144
144
  });
145
145
 
146
- test('ViewButtonBottom onRightClick with stationId', async () => {
146
+ it('ViewButtonBottom onRightClick with stationId', async () => {
147
147
  const response = {
148
148
  status: 200,
149
149
  data: {
@@ -51,7 +51,7 @@ describe('Test connecting modbus device', () => {
51
51
  };
52
52
  });
53
53
 
54
- test('rendering', async () => {
54
+ it('rendering', async () => {
55
55
  await act(async () => {
56
56
  tree = await create(wrapComponent(route));
57
57
  });
@@ -51,7 +51,7 @@ describe('Test connecting wifi device', () => {
51
51
  };
52
52
  });
53
53
 
54
- test('rendering', async () => {
54
+ it('rendering', async () => {
55
55
  await act(async () => {
56
56
  tree = await create(wrapComponent(route));
57
57
  });
@@ -53,7 +53,7 @@ describe('test share wifi password', () => {
53
53
  socket.close.mockClear();
54
54
  });
55
55
 
56
- test('render connect wifi guide', async () => {
56
+ it('render connect wifi guide', async () => {
57
57
  const route = { params: {} };
58
58
  await act(async () => {
59
59
  tree = renderer.create(wrapComponent(route));
@@ -66,7 +66,7 @@ describe('test share wifi password', () => {
66
66
  expect(button).toHaveLength(2);
67
67
  });
68
68
 
69
- test('auto connect to wifi prefix on ios', async () => {
69
+ it('auto connect to wifi prefix on ios', async () => {
70
70
  Platform.OS = 'ios';
71
71
  const route = { params: { prefix: 'robot' } };
72
72
  await act(async () => {
@@ -83,7 +83,7 @@ describe('test share wifi password', () => {
83
83
  expect(socket.bind).toBeCalled();
84
84
  });
85
85
 
86
- test('fail connect to wifi prefix on ios', async () => {
86
+ it('fail connect to wifi prefix on ios', async () => {
87
87
  Platform.OS = 'ios';
88
88
  const route = { params: { prefix: 'robot' } };
89
89
  WifiManager.connectToProtectedSSIDPrefix.mockImplementationOnce(
@@ -99,7 +99,7 @@ describe('test share wifi password', () => {
99
99
  expect(socket.bind).not.toBeCalled();
100
100
  });
101
101
 
102
- test('auto connect to wifi android', async () => {
102
+ it('auto connect to wifi android', async () => {
103
103
  Platform.OS = 'android';
104
104
  const route = { params: { prefix: 'robot' } };
105
105
  WifiManager.loadWifiList.mockImplementationOnce(async () => [
@@ -120,7 +120,7 @@ describe('test share wifi password', () => {
120
120
  expect(socket.bind).toBeCalled();
121
121
  });
122
122
 
123
- test('fail connect to wifi android', async () => {
123
+ it('fail connect to wifi android', async () => {
124
124
  Platform.OS = 'android';
125
125
  const route = { params: { prefix: 'robot' } };
126
126
  WifiManager.reScanAndLoadWifiList.mockImplementationOnce(async () => [
@@ -140,7 +140,7 @@ describe('test share wifi password', () => {
140
140
  expect(socket.bind).not.toBeCalled();
141
141
  });
142
142
 
143
- test('fail load wifi list android', async () => {
143
+ it('fail load wifi list android', async () => {
144
144
  Platform.OS = 'android';
145
145
  const route = { params: { prefix: 'robot' } };
146
146
  WifiManager.reScanAndLoadWifiList.mockImplementationOnce(async () => {
@@ -155,7 +155,7 @@ describe('test share wifi password', () => {
155
155
  expect(socket.bind).not.toBeCalled();
156
156
  });
157
157
 
158
- test('request wifi list from device', async () => {
158
+ it('request wifi list from device', async () => {
159
159
  jest.useFakeTimers();
160
160
  Platform.OS = 'android';
161
161
  const route = { params: { prefix: 'robot' } };
@@ -170,7 +170,7 @@ describe('test share wifi password', () => {
170
170
  expect(data.type).toEqual('scan');
171
171
  });
172
172
 
173
- test('got wifi list from device', async () => {
173
+ it('got wifi list from device', async () => {
174
174
  Platform.OS = 'android';
175
175
  const route = {
176
176
  params: { prefix: 'robot', qrData: 'abc123', unitId: 1, stationId: 1 },
@@ -204,7 +204,7 @@ describe('test share wifi password', () => {
204
204
  // expect(mockedNavigate.mock.calls[0][0]).toEqual(Routes.ShareWifiPassword);
205
205
  });
206
206
 
207
- test('got error while request wifi list from device', async () => {
207
+ it('got error while request wifi list from device', async () => {
208
208
  Platform.OS = 'android';
209
209
  const route = { params: { prefix: 'robot' } };
210
210
  await act(async () => {
@@ -51,7 +51,7 @@ describe('Test connecting modbus device', () => {
51
51
  };
52
52
  });
53
53
 
54
- test('rendering', async () => {
54
+ it('rendering', async () => {
55
55
  await act(async () => {
56
56
  tree = await create(wrapComponent(route));
57
57
  });
@@ -58,7 +58,7 @@ describe('Test rename new devices', () => {
58
58
  };
59
59
  });
60
60
 
61
- test('rendering base', async () => {
61
+ it('rendering base', async () => {
62
62
  await act(async () => {
63
63
  tree = await create(wrapComponent(route));
64
64
  });
@@ -81,7 +81,7 @@ describe('Test rename new devices', () => {
81
81
  expect(mock.history.get).toHaveLength(1);
82
82
  });
83
83
 
84
- test('rendering sensor', async () => {
84
+ it('rendering sensor', async () => {
85
85
  mock.onGet().reply(200, {
86
86
  id: 1,
87
87
  name: 'chip',
@@ -122,7 +122,7 @@ describe('Test rename new devices', () => {
122
122
  ).toHaveLength(1);
123
123
  });
124
124
 
125
- test('render rename chip', async () => {
125
+ it('render rename chip', async () => {
126
126
  mock.onGet().reply(200, {
127
127
  can_rename: true,
128
128
  });
@@ -149,7 +149,7 @@ describe('Test rename new devices', () => {
149
149
  expect(mock.history.get).toHaveLength(1);
150
150
  });
151
151
 
152
- test('update name', async () => {
152
+ it('update name', async () => {
153
153
  mock.onGet().reply(200, {
154
154
  id: 1,
155
155
  can_rename: true,