@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
@@ -22,7 +22,7 @@ const wrapComponent = (summaryDetail) => (
22
22
  describe('Test PowerConsumption', () => {
23
23
  let tree;
24
24
 
25
- test('render PowerConsumption', () => {
25
+ it('render PowerConsumption', async () => {
26
26
  const summaryDetail = {
27
27
  voltValue: 200,
28
28
  currentValue: 20,
@@ -31,7 +31,7 @@ describe('Test PowerConsumption', () => {
31
31
  totalPowerValue: 20,
32
32
  listConfigs: [1, 2, 3],
33
33
  };
34
- act(() => {
34
+ await act(async () => {
35
35
  tree = renderer.create(wrapComponent(summaryDetail));
36
36
  });
37
37
  const instance = tree.root;
@@ -74,7 +74,7 @@ describe('Test PowerConsumption', () => {
74
74
  expect(listIndicator.props.data).toEqual(resultList);
75
75
  });
76
76
 
77
- test('render PowerConsumption listConfigs.total_power', async () => {
77
+ it('render PowerConsumption listConfigs.total_power', async () => {
78
78
  const summaryDetail = {
79
79
  voltValue: 200,
80
80
  currentValue: 20,
@@ -100,7 +100,7 @@ describe('Test PowerConsumption', () => {
100
100
  expect(Todays).toBeDefined();
101
101
  });
102
102
 
103
- test('render with unsuccess fetch', async () => {
103
+ it('render with unsuccess fetch', async () => {
104
104
  const summaryDetail = {
105
105
  voltValue: 200,
106
106
  currentValue: 20,
@@ -125,7 +125,7 @@ describe('Test PowerConsumption', () => {
125
125
  expect(Todays).toBeDefined();
126
126
  });
127
127
 
128
- test('render without value', async () => {
128
+ it('render without value', async () => {
129
129
  const summaryDetail = {
130
130
  listConfigs: {
131
131
  active_power: 208,
@@ -80,14 +80,14 @@ describe('test RunningDevices', () => {
80
80
  expect(texts.length).toEqual(0);
81
81
 
82
82
  const button = instance.findAllByType(TouchableOpacity);
83
- act(() => {
83
+ await act(async () => {
84
84
  button[0].props.onPress();
85
85
  });
86
86
  expect(mockConnectHomeAssistant).toBeCalled();
87
87
  });
88
88
  });
89
89
 
90
- test('render RunningDevices remote_control_options.bluetooth', async () => {
90
+ it('render RunningDevices remote_control_options.bluetooth', async () => {
91
91
  let tree;
92
92
  let unit = {
93
93
  remote_control_options: {
@@ -119,7 +119,7 @@ describe('test RunningDevices', () => {
119
119
  expect(texts.length).toEqual(0);
120
120
 
121
121
  const button = instance.findAllByType(TouchableOpacity);
122
- act(() => {
122
+ await act(async () => {
123
123
  button[0].props.onPress();
124
124
  });
125
125
  expect(mockedNavigate).toBeCalledWith('DeviceDetail', {
@@ -6,9 +6,9 @@ import ChartAverage from '../ChartAverage';
6
6
 
7
7
  describe('Test ChartAverage', () => {
8
8
  let tree;
9
- test('render ChartAverage', () => {
10
- act(() => {
11
- tree = create(<ChartAverage />);
9
+ it('render ChartAverage', async () => {
10
+ await act(async () => {
11
+ tree = await create(<ChartAverage />);
12
12
  });
13
13
  const instance = tree.root;
14
14
  const Views = instance.findAllByType(View);
@@ -6,9 +6,9 @@ import ItemAverage from '../ItemAverage';
6
6
 
7
7
  describe('Test ItemAverage', () => {
8
8
  let tree;
9
- test('render ItemAverage', async () => {
10
- act(() => {
11
- tree = create(<ItemAverage />);
9
+ it('render ItemAverage', async () => {
10
+ await act(async () => {
11
+ tree = await create(<ItemAverage />);
12
12
  });
13
13
  const instance = tree.root;
14
14
  const Views = instance.findAllByType(View);
@@ -28,59 +28,59 @@ describe('Test UvIndex', () => {
28
28
  });
29
29
  let tree;
30
30
 
31
- test('render UvIndex', async () => {
32
- act(() => {
33
- tree = create(wrapComponent(data));
31
+ it('render UvIndex', async () => {
32
+ await act(async () => {
33
+ tree = await create(wrapComponent(data));
34
34
  });
35
35
  const instance = tree.root;
36
36
  const Sections = instance.findAllByType(Section);
37
37
  expect(Sections).toHaveLength(2);
38
38
  });
39
39
 
40
- test('render UvIndex with negative uv_value', async () => {
40
+ it('render UvIndex with negative uv_value', async () => {
41
41
  data.summaryDetail.uv_value = -1;
42
- act(() => {
43
- tree = create(wrapComponent(data));
42
+ await act(async () => {
43
+ tree = await create(wrapComponent(data));
44
44
  });
45
45
  const instance = tree.root;
46
46
  const Sections = instance.findAllByType(Section);
47
47
  expect(Sections).toHaveLength(2);
48
48
  });
49
49
 
50
- test('render UvIndex with high uv_value', async () => {
50
+ it('render UvIndex with high uv_value', async () => {
51
51
  data.summaryDetail.uv_value = 11;
52
- act(() => {
53
- tree = create(wrapComponent(data));
52
+ await act(async () => {
53
+ tree = await create(wrapComponent(data));
54
54
  });
55
55
  const instance = tree.root;
56
56
  const Sections = instance.findAllByType(Section);
57
57
  expect(Sections).toHaveLength(2);
58
58
  });
59
59
 
60
- test('render UvIndex with advices', async () => {
60
+ it('render UvIndex with advices', async () => {
61
61
  data.summaryDetail.advices = ['Amazing good chop'];
62
- act(() => {
63
- tree = create(wrapComponent(data));
62
+ await act(async () => {
63
+ tree = await create(wrapComponent(data));
64
64
  });
65
65
  const instance = tree.root;
66
66
  const Sections = instance.findAllByType(Section);
67
67
  expect(Sections).toHaveLength(2);
68
68
  });
69
69
 
70
- test('render UvIndex without advices', async () => {
70
+ it('render UvIndex without advices', async () => {
71
71
  delete data.summaryDetail.advices;
72
- act(() => {
73
- tree = create(wrapComponent(data));
72
+ await act(async () => {
73
+ tree = await create(wrapComponent(data));
74
74
  });
75
75
  const instance = tree.root;
76
76
  const Sections = instance.findAllByType(Section);
77
77
  expect(Sections).toHaveLength(2);
78
78
  });
79
79
 
80
- test('render UvIndex with undefined uv_value', async () => {
80
+ it('render UvIndex with undefined uv_value', async () => {
81
81
  data.summaryDetail.uv_value = undefined;
82
- act(() => {
83
- tree = create(wrapComponent(data));
82
+ await act(async () => {
83
+ tree = await create(wrapComponent(data));
84
84
  });
85
85
  const instance = tree.root;
86
86
  const Sections = instance.findAllByType(Section);
@@ -42,36 +42,36 @@ describe('Test WaterQualityGuide', () => {
42
42
  });
43
43
  let tree;
44
44
 
45
- test('render WaterQualityGuide', async () => {
46
- act(() => {
47
- tree = create(wrapComponent(data));
45
+ it('render WaterQualityGuide', async () => {
46
+ await act(async () => {
47
+ tree = await create(wrapComponent(data));
48
48
  });
49
49
  const instance = tree.root;
50
50
  const sections = instance.findAllByType(Section);
51
51
  expect(sections).toHaveLength(2);
52
52
  });
53
53
 
54
- test('render WaterQuality without showBoxHistory', async () => {
54
+ it('render WaterQuality without showBoxHistory', async () => {
55
55
  data.summaryDetail.ph_id = 0;
56
56
  data.summaryDetail.tur_id = 0;
57
57
  data.summaryDetail.clo_id = 0;
58
- act(() => {
59
- tree = create(wrapComponent(data));
58
+ await act(async () => {
59
+ tree = await create(wrapComponent(data));
60
60
  });
61
61
  const instance = tree.root;
62
62
  const sections = instance.findAllByType(Section);
63
63
  expect(sections).toHaveLength(1);
64
64
  });
65
65
 
66
- test('onClickItem waterType', async () => {
67
- act(() => {
68
- tree = create(wrapComponent(data));
66
+ it('onClickItem waterType', async () => {
67
+ await act(async () => {
68
+ tree = await create(wrapComponent(data));
69
69
  });
70
70
  const instance = tree.root;
71
71
  const buttons = instance.findAllByType(TouchableOpacity);
72
72
  expect(buttons).toHaveLength(5);
73
73
 
74
- act(() => {
74
+ await act(async () => {
75
75
  buttons[0].props.onPress();
76
76
  });
77
77
  expect(mockedNavigate).toHaveBeenCalledTimes(1);
@@ -79,7 +79,7 @@ describe('Test WaterQualityGuide', () => {
79
79
  waterType: 'turbidity',
80
80
  });
81
81
 
82
- act(() => {
82
+ await act(async () => {
83
83
  buttons[1].props.onPress();
84
84
  });
85
85
  expect(mockedNavigate).toHaveBeenCalledTimes(2);
@@ -87,7 +87,7 @@ describe('Test WaterQualityGuide', () => {
87
87
  waterType: 'ph',
88
88
  });
89
89
 
90
- act(() => {
90
+ await act(async () => {
91
91
  buttons[2].props.onPress();
92
92
  });
93
93
  expect(mockedNavigate).toHaveBeenCalledTimes(3);
@@ -6,8 +6,8 @@ import TotalPowerBox from '../TotalPowerBox';
6
6
  describe('Test Total Power Box', () => {
7
7
  let tree;
8
8
 
9
- test('render Total Power Box', () => {
10
- act(() => {
9
+ it('render Total Power Box', async () => {
10
+ await act(async () => {
11
11
  tree = renderer.create(<TotalPowerBox title={'titleTest'} />);
12
12
  });
13
13
  const instance = tree.root;
@@ -18,8 +18,8 @@ const wrapComponent = () => (
18
18
  describe('Test Total Power Consumption', () => {
19
19
  let tree;
20
20
 
21
- test('render Total Power Consumption', () => {
22
- act(() => {
21
+ it('render Total Power Consumption', async () => {
22
+ await act(async () => {
23
23
  tree = renderer.create(wrapComponent());
24
24
  });
25
25
  const instance = tree.root;
@@ -18,8 +18,8 @@ describe('Test UnitSummary', () => {
18
18
  };
19
19
 
20
20
  it('Test index = 0', async () => {
21
- await act(() => {
22
- tree = create(<UnitSummary {...defaultProps} index={0} />);
21
+ await act(async () => {
22
+ tree = await create(<UnitSummary {...defaultProps} index={0} />);
23
23
  });
24
24
  const instance = tree.root;
25
25
  const TouchableOpacities = instance.findAllByType(TouchableOpacity);
@@ -30,8 +30,8 @@ describe('Test UnitSummary', () => {
30
30
  });
31
31
 
32
32
  it('Test index = 1', async () => {
33
- await act(() => {
34
- tree = create(<UnitSummary {...defaultProps} index={1} />);
33
+ await act(async () => {
34
+ tree = await create(<UnitSummary {...defaultProps} index={1} />);
35
35
  });
36
36
  const instance = tree.root;
37
37
  const TouchableOpacities = instance.findAllByType(TouchableOpacity);
@@ -42,8 +42,8 @@ describe('Test UnitSummary', () => {
42
42
  });
43
43
 
44
44
  it('Test len % 2 === 0 && index = len - 1', async () => {
45
- await act(() => {
46
- tree = create(<UnitSummary {...defaultProps} index={1} len={2} />);
45
+ await act(async () => {
46
+ tree = await create(<UnitSummary {...defaultProps} index={1} len={2} />);
47
47
  });
48
48
  const instance = tree.root;
49
49
  const TouchableOpacities = instance.findAllByType(TouchableOpacity);
@@ -54,8 +54,8 @@ describe('Test UnitSummary', () => {
54
54
  });
55
55
 
56
56
  it('Test len % 2 !== 0 && index = len - 1', async () => {
57
- await act(() => {
58
- tree = create(<UnitSummary {...defaultProps} index={2} len={3} />);
57
+ await act(async () => {
58
+ tree = await create(<UnitSummary {...defaultProps} index={2} len={3} />);
59
59
  });
60
60
  const instance = tree.root;
61
61
  const TouchableOpacities = instance.findAllByType(TouchableOpacity);
@@ -6,14 +6,14 @@ import UnitSummary from '..';
6
6
  describe('UnitSummary components', () => {
7
7
  let tree;
8
8
 
9
- test('test render UnitSummary components', () => {
9
+ it('test render UnitSummary components', async () => {
10
10
  const summary = {
11
11
  left_value: 'left_value test',
12
12
  left_text: 'left_text test',
13
13
  right_value: 'right_value test',
14
14
  right_text: 'right_text test',
15
15
  };
16
- act(() => {
16
+ await act(async () => {
17
17
  tree = renderer.create(<UnitSummary summary={summary} />);
18
18
  });
19
19
  const instance = tree.root;
@@ -25,7 +25,7 @@ describe('UnitSummary components', () => {
25
25
  expect(textElement[3].props.children).toEqual(summary.right_text);
26
26
  });
27
27
 
28
- test('test onPress goToSummary', () => {
28
+ it('test onPress goToSummary', async () => {
29
29
  const summary = {
30
30
  left_value: 'left_value test',
31
31
  left_text: 'left_text test',
@@ -33,14 +33,14 @@ describe('UnitSummary components', () => {
33
33
  right_text: 'right_text test',
34
34
  };
35
35
  const mockFuntion = jest.fn();
36
- act(() => {
36
+ await act(async () => {
37
37
  tree = renderer.create(
38
38
  <UnitSummary summary={summary} goToSummary={mockFuntion} />
39
39
  );
40
40
  });
41
41
  const instance = tree.root;
42
42
  const touchableOpacity = instance.findByType(TouchableOpacity);
43
- act(() => {
43
+ await act(async () => {
44
44
  touchableOpacity.props.onPress();
45
45
  });
46
46
  expect(mockFuntion).toHaveBeenCalled();
@@ -102,9 +102,9 @@ describe('Test WaterQualityGuide', () => {
102
102
 
103
103
  let tree;
104
104
 
105
- test('render WaterQualityGuide default turbidityGuide', async () => {
106
- act(() => {
107
- tree = create(wrapComponent(route));
105
+ it('render WaterQualityGuide default turbidityGuide', async () => {
106
+ await act(async () => {
107
+ tree = await create(wrapComponent(route));
108
108
  });
109
109
  const instance = tree.root;
110
110
 
@@ -130,10 +130,10 @@ describe('Test WaterQualityGuide', () => {
130
130
  expect(textDescriptionLevel1).toHaveLength(0);
131
131
  });
132
132
 
133
- test('render WaterQualityGuide with turbidityGuide', async () => {
133
+ it('render WaterQualityGuide with turbidityGuide', async () => {
134
134
  route.params.waterType = 'turbidity';
135
- act(() => {
136
- tree = create(wrapComponent(route));
135
+ await act(async () => {
136
+ tree = await create(wrapComponent(route));
137
137
  });
138
138
  const instance = tree.root;
139
139
 
@@ -159,10 +159,10 @@ describe('Test WaterQualityGuide', () => {
159
159
  expect(textDescriptionLevel1).toHaveLength(0);
160
160
  });
161
161
 
162
- test('render WaterQualityGuide with cloGuide', async () => {
162
+ it('render WaterQualityGuide with cloGuide', async () => {
163
163
  route.params.waterType = 'clo';
164
- act(() => {
165
- tree = create(wrapComponent(route));
164
+ await act(async () => {
165
+ tree = await create(wrapComponent(route));
166
166
  });
167
167
  const instance = tree.root;
168
168
 
@@ -188,10 +188,10 @@ describe('Test WaterQualityGuide', () => {
188
188
  expect(textDescriptionLevel1).toHaveLength(0);
189
189
  });
190
190
 
191
- test('render WaterQualityGuide with phGuide', async () => {
191
+ it('render WaterQualityGuide with phGuide', async () => {
192
192
  route.params.waterType = 'ph';
193
- act(() => {
194
- tree = create(wrapComponent(route));
193
+ await act(async () => {
194
+ tree = await create(wrapComponent(route));
195
195
  });
196
196
  const instance = tree.root;
197
197
 
@@ -1,3 +1,4 @@
1
+ /* eslint-disable no-console */
1
2
  import { create } from 'apisauce';
2
3
  import { getData, storeData } from '../Storage';
3
4
  import { ToastBottomHelper } from '../Utils';
@@ -14,6 +15,27 @@ const api = create({
14
15
  timeout: 30000,
15
16
  });
16
17
 
18
+ if (__DEV__ && process.env.NODE_ENV !== 'test') {
19
+ api.axiosInstance.interceptors.request.use((request) => {
20
+ console.log(`${request.method.toUpperCase()} ${request.url || ''}`);
21
+ if (process.env.DEBUG_AXIOS_DETAIL_REQUEST) {
22
+ if (request.data) {
23
+ console.log(JSON.stringify(request.data));
24
+ }
25
+ console.log(request.headers);
26
+ }
27
+ return request;
28
+ });
29
+
30
+ api.axiosInstance.interceptors.response.use((response) => {
31
+ console.log(`${response.status} ${response.config.url}`);
32
+ if (process.env.DEBUG_AXIOS_DETAIL_REQUEST) {
33
+ console.log(response.data);
34
+ }
35
+ return response;
36
+ });
37
+ }
38
+
17
39
  const parseErrorResponse = async (error) => {
18
40
  let message;
19
41
  let data = {};
@@ -1,6 +1,6 @@
1
1
  import { removeDuplicateSearch } from '../array';
2
2
 
3
- test('test removeDuplicateSearch', () => {
3
+ it('test removeDuplicateSearch', async () => {
4
4
  let recentSearch = [
5
5
  { description: 'a' },
6
6
  { description: 'b' },
@@ -1,6 +1,6 @@
1
1
  import { queryStringToPath } from '../url';
2
2
 
3
- test('test queryStringToPath', () => {
3
+ it('test queryStringToPath', async () => {
4
4
  const oldUrl =
5
5
  // eslint-disable-next-line max-len
6
6
  'app://eoh/sync-lg-device?state=1&code=CODE&user_number=VN2106012039192&oauth2_backend_url=https%3A%2F%2Fkr.lgeapi.com%2F';
@@ -1,6 +1,6 @@
1
1
  const { convertToSlug } = require('../Search');
2
2
 
3
- it('Test Search function', () => {
3
+ it('Test Search function', async () => {
4
4
  const data = convertToSlug('Bệnh viện');
5
5
  expect(data).toEqual('benh vien');
6
6
  });
@@ -1,6 +1,6 @@
1
1
  import { shortEmailName } from '../ShortEmail';
2
2
 
3
- it('Test shortEmailName function', () => {
3
+ it('Test shortEmailName function', async () => {
4
4
  const data = shortEmailName('emailExample@gmail.com');
5
5
  expect(data).toEqual('emailExample');
6
6
  });
@@ -1007,7 +1007,7 @@
1007
1007
  "no_widgets": "No Widgets",
1008
1008
  "add_your_widget": "Add your widget in dashboard template",
1009
1009
  "label": "Label",
1010
- "choose_type_of_device": "Choose type of device",
1010
+ "choose_type_of_device": "Choose Type of Device",
1011
1011
  "central_controller": "Central controller",
1012
1012
  "wifi_device": "Wifi device",
1013
1013
  "device_connect_without_gateway": "Connecting device without gateway",
@@ -1032,5 +1032,15 @@
1032
1032
  "warning_connecting_smart_account": "Don't turn off the device or close this app during the setup process. Setup may take few minutes to complete.",
1033
1033
  "unidentified": "Unidentified",
1034
1034
  "select_all": "Select All",
1035
+ "turn_off_device": "Turn off device",
1036
+ "turn_off_device_when_scan_qr_guide": "Turn off the device you want to add new before scanning the QR code. Press ‘’OK’’ to continue.",
1037
+ "connect_to_router": "Connect to the Router",
1038
+ "connect_router_content": "Please plug in the gatewayand connect it to the router, making sure your phone and the gatewayare under the same network. Then, comfirm that the light is on and press “Next”",
1039
+ "turn_on_zigbee_device": "Turn on zigbee device",
1040
+ "turn_on_device_to_connect": "Turn on device to connect",
1041
+ "turn_on_zigbee_device_content": "Power ON the device and keep the device connected to the router. Make sure the end device still ON",
1042
+ "read_device_manual_guide": "Read Device's manual guide for more details.",
1043
+ "fail_to_discover_device_wifi": "Fail to discover device wifi",
1044
+ "try_to_turn_on_device_or_try_again": "Try to turn on device or Try again",
1035
1045
  "click_here_to_setup_device": "Click here to setup device"
1036
1046
  }
@@ -1004,7 +1004,7 @@
1004
1004
  "add_widget": "Thêm tiện ích con",
1005
1005
  "add_your_widget": "Thêm tiện ích của bạn vào mẫu trang tổng quan",
1006
1006
  "label": "Nhãn",
1007
- "choose_type_of_device": "Chọn loại thiết bị",
1007
+ "choose_type_of_device": "Chọn Loại Thiết bị",
1008
1008
  "central_controller": "Bộ điều khiển trung tâm",
1009
1009
  "wifi_device": "Thiết bị wifi",
1010
1010
  "device_connect_without_gateway": "Kết nối thiết bị không có gateway",
@@ -1030,5 +1030,15 @@
1030
1030
  "warning_connecting_smart_account": "Đừng tắt thiết bị hoặc đóng ứng dụng này trong quá trình thiết lập. Quá trình thiết lập có thể mất vài phút để hoàn thành.",
1031
1031
  "unidentified": "Chưa xếp vào phòng",
1032
1032
  "select_all": "Chọn tất cả",
1033
+ "turn_off_device": "Tắt thiết bị",
1034
+ "turn_off_device_when_scan_qr_guide": "Tắt thiết bị bạn muốn thêm mới trước khi quét mã QR. Nhấn ‘’OK’’ để tiếp tục.",
1035
+ "connect_to_router": "Kết nối với Bộ định tuyến",
1036
+ "connect_router_content": "Vui lòng cắm cổng vào và kết nối nó với bộ định tuyến, đảm bảo rằng điện thoại của bạn và cổng kết nối nằm trong cùng một mạng. Sau đó, xác nhận rằng đèn đã sáng và nhấn “Tiếp theo”",
1037
+ "turn_on_zigbee_device": "Bật thiết bị zigbee",
1038
+ "turn_on_device_to_connect": "Bật thiết bị để kết nối",
1039
+ "turn_on_zigbee_device_content": "BẬT nguồn thiết bị và giữ thiết bị kết nối với bộ định tuyến. Đảm bảo thiết bị cuối vẫn BẬT",
1040
+ "read_device_manual_guide": "Đọc hướng dẫn sử dụng của Thiết bị để biết thêm chi tiết.",
1041
+ "fail_to_discover_device_wifi": "Không phát hiện được wifi của thiết bị",
1042
+ "try_to_turn_on_device_or_try_again": "Thử bật thiết bị hoặc Thử lại",
1033
1043
  "click_here_to_setup_device": "Chọn thiết bị thêm vào phòng"
1034
1044
  }
@@ -66,6 +66,7 @@ const Routes = {
66
66
  SelectZigbeeGateway: 'SelectZigbeeGateway',
67
67
  ConnectingZigbeeDevice: 'ConnectingZigbeeDevice',
68
68
  ScanModbusQR: 'ScanModbusQR',
69
+ ScanZigbeeGateway: 'ScanZigbeeGateway',
69
70
  ConnectingModbusDevice: 'ConnectingModbusDevice',
70
71
  ScanWifiDeviceQR: 'ScanWifiDeviceQR',
71
72
  ScanGatewayQR: 'ScanGatewayQR',
@@ -139,6 +140,8 @@ const Routes = {
139
140
  SmartAccountConnecting: 'SmartAccountConnecting',
140
141
  EmergencySetting: 'EmergencySetting',
141
142
  FirstWarning: 'FirstWarning',
143
+ ConnectRouterGuide: 'ConnectRouterGuide',
144
+ ZigbeeDeviceConnectGuide: 'ZigbeeDeviceConnectGuide',
142
145
  ConfirmUnitDeletion: 'ConfirmUnitDeletion',
143
146
  SmartAccount: 'SmartAccount',
144
147
  SmartHomeDashboard: 'SmartHomeDashboard',
@@ -8,12 +8,12 @@ describe('Test initData', () => {
8
8
  Sentry.setUser.mockClear();
9
9
  });
10
10
 
11
- it('Test initData when has user', () => {
11
+ it('Test initData when has user', async () => {
12
12
  initData({ token: 1, user: { id: 1 } });
13
13
  expect(Sentry.setUser).toBeCalledWith({ id: 1 });
14
14
  });
15
15
 
16
- it('Test initData when has no user', () => {
16
+ it('Test initData when has no user', async () => {
17
17
  initData({ token: 1 });
18
18
  expect(Sentry.setUser).not.toBeCalled();
19
19
  });
@@ -1,11 +1,11 @@
1
1
  import { validateEmail, formatMoney } from '../Utils';
2
2
 
3
3
  describe('Test utils', () => {
4
- test('test validateEmail', () => {
4
+ it('test validateEmail', async () => {
5
5
  const result = validateEmail('eoh.2020@gmail.com');
6
6
  expect(result).toEqual(true);
7
7
  });
8
- test('test formatMoney', () => {
8
+ it('test formatMoney', async () => {
9
9
  const result = formatMoney(10000);
10
10
  expect(result).toEqual('10.000 đ');
11
11
  });