@eohjsc/react-native-smart-city 0.3.90 → 0.3.92

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 (312) hide show
  1. package/package.json +1 -1
  2. package/src/Images/Common/reorder.svg +3 -0
  3. package/src/commons/ActionGroup/OnOffSmartLock/AutoLock/AutoLockStyles.js +1 -1
  4. package/src/commons/ActionGroup/OnOffSmartLock/AutoLock/__test__/index.test.js +3 -1
  5. package/src/commons/ActionGroup/OnOffSmartLock/AutoLock/index.js +3 -3
  6. package/src/commons/ActionGroup/OnOffSmartLock/PasscodeList/__test__/index.test.js +3 -10
  7. package/src/commons/ActionGroup/OnOffSmartLock/PasscodeList/index.js +1 -0
  8. package/src/commons/ActionGroup/OnOffSmartLock/SetupGeneratePasscode/SetupGeneratePasscodeStyles.js +1 -1
  9. package/src/commons/ActionGroup/OnOffTemplate/SwitchButtonTemplate.js +13 -5
  10. package/src/commons/ActionGroup/SliderRangeTemplate.js +100 -69
  11. package/src/commons/ActionGroup/SliderRangeTemplateStyles.js +27 -27
  12. package/src/commons/ActionGroup/StatesGridActionTemplate.js +4 -1
  13. package/src/commons/ActionGroup/__test__/NumberUpDownTemplate.test.js +1 -1
  14. package/src/commons/ActionGroup/__test__/OnOffTemplate.test.js +4 -1
  15. package/src/commons/ActionGroup/__test__/SliderRangeTemplate.test.js +56 -0
  16. package/src/commons/ActionGroup/__test__/StatesGridActionTemplate.test.js +2 -2
  17. package/src/commons/ActionGroup/__test__/SwitchButtonTemplate.test.js +45 -8
  18. package/src/commons/ActionGroup/__test__/index.test.js +0 -19
  19. package/src/commons/ActionGroup/index.js +0 -3
  20. package/src/commons/ActionTemplate/CurtainAction.js +5 -5
  21. package/src/commons/ActionTemplate/CurtainActionStyles.js +1 -1
  22. package/src/commons/ActionTemplate/OnOffButtonAction.js +4 -4
  23. package/src/commons/ActionTemplate/OnOffButtonActionStyles.js +1 -1
  24. package/src/commons/ActionTemplate/OnOffSimpleAction.js +4 -4
  25. package/src/commons/ActionTemplate/OnOffSimpleActionStyles.js +1 -1
  26. package/src/commons/ActionTemplate/OnOffSmartLockAction.js +4 -4
  27. package/src/commons/ActionTemplate/OnOffSmartLockActionStyles.js +1 -1
  28. package/src/commons/ActionTemplate/OneButtonAction.js +3 -3
  29. package/src/commons/ActionTemplate/OneButtonActionStyles.js +1 -1
  30. package/src/commons/ActionTemplate/ThreeButtonAction.js +5 -5
  31. package/src/commons/ActionTemplate/ThreeButtonActionStyles.js +1 -1
  32. package/src/commons/ActionTemplate/__test__/CurtainAction.test.js +1 -1
  33. package/src/commons/ActionTemplate/__test__/OnOffButtonAction.test.js +1 -1
  34. package/src/commons/ActionTemplate/__test__/OnOffSimpleAction.test.js +1 -1
  35. package/src/commons/ActionTemplate/__test__/OnOffSmartLockAction.test.js +1 -1
  36. package/src/commons/ActionTemplate/__test__/OneButtonAction.test.js +1 -1
  37. package/src/commons/ActionTemplate/__test__/ThreeButtonAction.test.js +1 -1
  38. package/src/commons/ActionTemplate/__test__/index.test.js +21 -70
  39. package/src/commons/ActionTemplate/index.js +19 -55
  40. package/src/commons/Alert/__test__/Alert.test.js +1 -1
  41. package/src/commons/Auth/AccountList.js +1 -1
  42. package/src/commons/Auth/__test__/OtpInputList.test.js +17 -19
  43. package/src/commons/Automate/ItemAutomate.js +10 -4
  44. package/src/commons/Automate/__test__/ItemAutomate.test.js +11 -11
  45. package/src/commons/BackDefault/__test__/BackDefault.test.js +1 -1
  46. package/src/commons/Button/__test__/Button.test.js +1 -1
  47. package/src/commons/ButtonPopup/__test__/ButtonPopup.test.js +1 -1
  48. package/src/commons/Calendar/__test__/Calendar.test.js +1 -1
  49. package/src/commons/ChartLoading/__test__/ChartLoading.test.js +1 -1
  50. package/src/commons/CircleButton/__test__/CircleButton.test.js +1 -1
  51. package/src/commons/CircleView/__test__/CircleView.test.js +1 -1
  52. package/src/commons/DateTimeRangeChange/__test__/DateTimeButton.test.js +4 -2
  53. package/src/commons/DateTimeRangeChange/index.js +31 -48
  54. package/src/commons/Device/DeviceAlertStatus.js +2 -1
  55. package/src/commons/Device/Emergency/__test__/EmergencyButton.test.js +2 -2
  56. package/src/commons/Device/Emergency/__test__/EmergencyDetail.test.js +1 -1
  57. package/src/commons/Device/FlatListItems.js +1 -1
  58. package/src/commons/Device/Hanet/ItemHanetDevice.test.js +2 -2
  59. package/src/commons/Device/HistoryChart.js +6 -49
  60. package/src/commons/Device/LinearChart/LinearChart.test.js +1 -1
  61. package/src/commons/Device/ProgressBar/__test__/ProgressBar.test.js +1 -1
  62. package/src/commons/Device/ProgressBar/index.js +5 -11
  63. package/src/commons/Device/ProgressBar/styles.js +11 -3
  64. package/src/commons/Device/RainningSensor/__test__/CurrentRainSensor.test.js +5 -5
  65. package/src/commons/Device/SonosSpeaker/__test__/SonosSpeaker.test.js +3 -3
  66. package/src/commons/Device/WindDirection/Compass/Compass.test.js +2 -2
  67. package/src/commons/Device/WindSpeed/Anemometer/index.js +2 -0
  68. package/src/commons/Device/WindSpeed/LinearChart/__test__/LinearChart.test.js +14 -1
  69. package/src/commons/Device/WindSpeed/LinearChart/index.js +5 -3
  70. package/src/commons/Device/__test__/DeviceAlertStatus.test.js +3 -3
  71. package/src/commons/Device/__test__/DisconnectedView.test.js +2 -2
  72. package/src/commons/Device/__test__/FlatListItems.test.js +1 -1
  73. package/src/commons/Device/__test__/SensorConnectedStatus.test.js +1 -1
  74. package/src/commons/DisplayChecking/__test__/DisplayChecking.test.js +1 -1
  75. package/src/commons/FlatListDnD/__test__/index.test.js +49 -0
  76. package/src/commons/FlatListDnD/index.js +37 -0
  77. package/src/commons/FlatListDnD/styles.js +12 -0
  78. package/src/commons/Form/__test__/CurrencyInput.test.js +2 -2
  79. package/src/commons/Form/__test__/TextInput.test.js +3 -3
  80. package/src/commons/Form/__test__/TextInputPassword.test.js +2 -2
  81. package/src/commons/FullLoading/__test__/index.test.js +2 -2
  82. package/src/commons/Header/HeaderCustom.js +2 -1
  83. package/src/commons/HorizontalPicker/index.js +65 -38
  84. package/src/commons/IconComponent/index.js +3 -2
  85. package/src/commons/ImageButton/__test__/ImageButton.test.js +1 -1
  86. package/src/commons/MediaPlayer/__test__/index.test.js +8 -3
  87. package/src/commons/MediaPlayer/index.js +11 -7
  88. package/src/commons/MenuActionMore/index.js +6 -4
  89. package/src/commons/Modal/ModalBottom.js +2 -3
  90. package/src/commons/Modal/ModalCustom.js +2 -3
  91. package/src/commons/NavBar/index.js +48 -50
  92. package/src/commons/OneTapTemplate/NumberUpDownActionTemplate.js +3 -3
  93. package/src/commons/OneTapTemplate/NumberUpDownActionTemplateStyles.js +1 -1
  94. package/src/commons/OneTapTemplate/OptionsDropdownActionTemplate.js +5 -5
  95. package/src/commons/OneTapTemplate/OptionsDropdownActionTemplateStyles.js +1 -1
  96. package/src/commons/OneTapTemplate/StatesGridActionTemplate.js +5 -5
  97. package/src/commons/OneTapTemplate/StatesGridActionTemplateStyles.js +1 -1
  98. package/src/commons/OneTapTemplate/__test__/NumberUpDownActionTemplate.test.js +2 -2
  99. package/src/commons/OneTapTemplate/__test__/OptionsDropdownActionTemplate.test.js +1 -1
  100. package/src/commons/OneTapTemplate/__test__/StatesGridActionTemplate.test.js +2 -2
  101. package/src/commons/PreventAccess/index.js +1 -1
  102. package/src/commons/RowItem/__test__/RowItem.test.js +1 -1
  103. package/src/commons/RowUser/__test__/RowUser.test.js +1 -1
  104. package/src/commons/Section/Section.test.js +2 -2
  105. package/src/commons/SelectSubUnit/__test__/SelectSubUnit.test.js +1 -1
  106. package/src/commons/SelectUnit/__test__/SelectUnit.test.js +3 -3
  107. package/src/commons/Sharing/StationDevicePermissions.js +4 -4
  108. package/src/commons/Sharing/WrapHeaderScrollable.js +5 -5
  109. package/src/commons/Sharing/__test__/ButtonRemoveMember.test.js +1 -1
  110. package/src/commons/Sharing/__test__/DevicePermissionsCheckbox.test.js +3 -3
  111. package/src/commons/Sharing/__test__/MemberList.test.js +6 -4
  112. package/src/commons/Sharing/__test__/RowMember.test.js +2 -2
  113. package/src/commons/Sharing/__test__/WrapHeaderScrollable.test.js +4 -2
  114. package/src/commons/SubUnit/OneTap/ItemOneTap.js +7 -11
  115. package/src/commons/SubUnit/OneTap/__test__/SubUnitAutomate.test.js +13 -16
  116. package/src/commons/SubUnit/OneTap/index.js +22 -7
  117. package/src/commons/TextButton/__test__/TextButton.test.js +2 -2
  118. package/src/commons/Today/__test__/Today.test.js +1 -1
  119. package/src/commons/TouchableScale/__test__/TouchableScale.test.js +1 -1
  120. package/src/commons/UnitSummary/AirQuality/__test__/index.test.js +4 -0
  121. package/src/commons/UnitSummary/AirQuality/index.js +2 -2
  122. package/src/commons/UnitSummary/ConfigHistoryChart/__test__/ConfigHistoryChart.test.js +1 -1
  123. package/src/commons/UnitSummary/ConfigHistoryChart/index.js +0 -6
  124. package/src/commons/UnitSummary/__test__/TotalPowerBox.test.js +1 -1
  125. package/src/commons/UnitSummary/__test__/TotalPowerConsumption.test.js +1 -1
  126. package/src/commons/ViewButtonBottom/__test__/ViewButtonBottom.test.js +1 -1
  127. package/src/configs/API.js +14 -31
  128. package/src/configs/AccessibilityLabel.js +1 -0
  129. package/src/configs/Colors.js +1 -1
  130. package/src/configs/Constants.js +14 -48
  131. package/src/context/reducer.ts +3 -1
  132. package/src/hoc/__test__/withRemoteControl.test.js +1 -1
  133. package/src/hooks/Common/__test__/useStatusbar.test.js +5 -5
  134. package/src/hooks/Common/index.js +0 -2
  135. package/src/hooks/Common/useKeyboardShow.js +4 -4
  136. package/src/hooks/Common/useStatusBar.js +2 -2
  137. package/src/hooks/Common/useTitleHeader.js +5 -7
  138. package/src/hooks/IoT/__test__/useRemoteControl.test.js +11 -0
  139. package/src/hooks/IoT/useBluetoothConnection.js +6 -3
  140. package/src/hooks/index.js +1 -2
  141. package/src/navigations/UnitStack.js +51 -17
  142. package/src/screens/ActivityLog/FilterPopup.js +4 -4
  143. package/src/screens/ActivityLog/__test__/FilterPopup.test.js +2 -2
  144. package/src/screens/ActivityLog/__test__/index.test.js +2 -2
  145. package/src/screens/AddCommon/__test__/SelectSubUnit.test.js +3 -3
  146. package/src/screens/AddCommon/__test__/SelectUnit.test.js +5 -5
  147. package/src/screens/AddNewAutoSmart/__test__/AddNewAutoSmart.test.js +9 -33
  148. package/src/screens/AddNewAutoSmart/index.js +33 -89
  149. package/src/screens/AddNewGateway/PlugAndPlay/__test__/ConnectRouterGuide.test.js +1 -1
  150. package/src/screens/AddNewGateway/PlugAndPlay/__test__/FirstWarning.test.js +1 -1
  151. package/src/screens/AddNewGateway/PlugAndPlay/__test__/ZigbeeDeviceConnectGuide.test.js +1 -1
  152. package/src/screens/AddNewGateway/SelectDeviceSubUnit.js +1 -2
  153. package/src/screens/AddNewGateway/__test__/AddNewGateway.test.js +5 -17
  154. package/src/screens/AddNewGateway/__test__/ConnectingWifiGuide.test.js +1 -1
  155. package/src/screens/AddNewGateway/__test__/ScanGatewayQR.test.js +2 -2
  156. package/src/screens/AddNewGateway/__test__/ScanModbusQR.test.js +3 -3
  157. package/src/screens/AddNewGateway/__test__/ScanWifiDeviceQR.test.js +2 -2
  158. package/src/screens/AddNewGateway/__test__/SelectDeviceSubUnit.test.js +8 -16
  159. package/src/screens/AddNewGateway/__test__/SelectDeviceUnit.test.js +10 -12
  160. package/src/screens/AddNewGateway/__test__/SelectModbusGateway.test.js +6 -14
  161. package/src/screens/AddNewGateway/__test__/SelectZigbeeGateway.test.js +6 -14
  162. package/src/screens/AddNewGateway/__test__/ShareWifiPassword.test.js +1 -1
  163. package/src/screens/AddNewGateway/hooks/__Tests__/useWifiManage.test.js +3 -2
  164. package/src/screens/AddNewGateway/index.js +1 -1
  165. package/src/screens/AllCamera/__test__/index.test.js +18 -57
  166. package/src/screens/AllCamera/index.js +100 -33
  167. package/src/screens/AllGateway/DetailConfigActionZigbee/__test__/index.test.js +0 -18
  168. package/src/screens/AllGateway/DetailConfigActionZigbee/index.js +1 -1
  169. package/src/screens/AllGateway/DeviceModbusDetail/__test__/index.test.js +5 -2
  170. package/src/screens/AllGateway/hooks/__test__/index.test.js +1 -1
  171. package/src/screens/Automate/AddNewAction/ChooseAction.js +139 -0
  172. package/src/screens/Automate/AddNewAction/ChooseConfig.js +179 -0
  173. package/src/screens/{AddNewAction → Automate/AddNewAction}/Components/LoadingSelectAction.js +1 -1
  174. package/src/screens/Automate/AddNewAction/Components/SelectDevices.js +75 -0
  175. package/src/screens/{AddNewAction → Automate/AddNewAction}/Device/DeviceStyles.js +5 -1
  176. package/src/screens/{AddNewAction → Automate/AddNewAction}/Device/__test__/index.test.js +4 -4
  177. package/src/screens/{AddNewAction → Automate/AddNewAction}/Device/index.js +5 -4
  178. package/src/screens/Automate/AddNewAction/NewActionWrapper.js +56 -0
  179. package/src/screens/Automate/AddNewAction/SelectControlDevices.js +69 -0
  180. package/src/screens/Automate/AddNewAction/SelectMonitorDevices.js +110 -0
  181. package/src/screens/Automate/AddNewAction/SetupConfigCondition.js +196 -0
  182. package/src/screens/{AddNewAction → Automate/AddNewAction}/Styles/SelectActionStyles.js +1 -1
  183. package/src/screens/{AddNewAction → Automate/AddNewAction}/Styles/SelectSensorDevicesStyles.js +1 -1
  184. package/src/screens/{AddNewAction → Automate/AddNewAction}/Styles/SetupSensorStyles.js +5 -3
  185. package/src/screens/{AddNewAction/__test__/SelectAction.test.js → Automate/AddNewAction/__test__/ChooseAction.test.js} +101 -122
  186. package/src/screens/Automate/AddNewAction/__test__/ChooseConfig.test.js +210 -0
  187. package/src/screens/Automate/AddNewAction/__test__/SelectControlDevices.test.js +130 -0
  188. package/src/screens/Automate/AddNewAction/__test__/SelectMonitorDevices.test.js +92 -0
  189. package/src/screens/Automate/AddNewAction/__test__/SetupSensor.test.js +131 -0
  190. package/src/screens/Automate/Components/InputName.js +64 -0
  191. package/src/screens/{AddNewOneTap/AddNewOneTapStyles.js → Automate/Components/InputNameStyles.js} +2 -2
  192. package/src/screens/{EditActionsList → Automate/EditActionsList}/Styles/indexStyles.js +5 -1
  193. package/src/screens/{EditActionsList → Automate/EditActionsList}/__tests__/index.test.js +20 -12
  194. package/src/screens/{EditActionsList → Automate/EditActionsList}/index.js +18 -19
  195. package/src/screens/Automate/MultiUnits.js +70 -68
  196. package/src/screens/Automate/OneTap/__test__/AddNewOneTap.test.js +134 -0
  197. package/src/screens/Automate/OneTap/index.js +16 -0
  198. package/src/screens/Automate/Scenario/ScenarioName.js +15 -0
  199. package/src/screens/{AddNewOneTap → Automate/Scenario}/__test__/AddNewOneTap.test.js +27 -45
  200. package/src/screens/Automate/ScriptDetail/Components/DeleteScript.js +45 -0
  201. package/src/screens/Automate/ScriptDetail/Components/RenameScript.js +58 -0
  202. package/src/screens/{ScriptDetail → Automate/ScriptDetail}/Styles/indexStyles.js +1 -1
  203. package/src/screens/{ScriptDetail → Automate/ScriptDetail}/__test__/index.test.js +67 -76
  204. package/src/screens/{ScriptDetail → Automate/ScriptDetail}/__test__/useStarredScript.test.js +7 -6
  205. package/src/screens/{ScriptDetail → Automate/ScriptDetail}/hooks/useStarredScript.js +4 -4
  206. package/src/screens/Automate/ScriptDetail/index.js +346 -0
  207. package/src/screens/Automate/ScriptDetail/utils.js +113 -0
  208. package/src/screens/{SetSchedule → Automate/SetSchedule}/__test__/SelectWeekday.test.js +2 -2
  209. package/src/screens/{SetSchedule → Automate/SetSchedule}/__test__/index.test.js +21 -46
  210. package/src/screens/{SetSchedule → Automate/SetSchedule}/components/RepeatOptionsPopup.js +4 -4
  211. package/src/screens/{SetSchedule → Automate/SetSchedule}/components/RowItem.js +2 -2
  212. package/src/screens/{SetSchedule → Automate/SetSchedule}/components/SelectWeekday.js +3 -3
  213. package/src/screens/Automate/SetSchedule/index.js +140 -0
  214. package/src/screens/{SetSchedule → Automate/SetSchedule}/styles/RepeatOptionsPopupStyles.js +1 -1
  215. package/src/screens/{SetSchedule → Automate/SetSchedule}/styles/RowItemStyles.js +1 -1
  216. package/src/screens/{SetSchedule → Automate/SetSchedule}/styles/SelectWeekdayStyles.js +1 -1
  217. package/src/screens/{SetSchedule → Automate/SetSchedule}/styles/indexStyles.js +1 -1
  218. package/src/screens/Automate/ValueChange/ValueChangeName.js +16 -0
  219. package/src/screens/Automate/__test__/MultiUnits.test.js +78 -122
  220. package/src/screens/Automate/__test__/index.test.js +21 -47
  221. package/src/screens/Automate/constants.js +0 -0
  222. package/src/screens/Automate/index.js +18 -24
  223. package/src/screens/ChangePosition/__test__/index.test.js +75 -0
  224. package/src/screens/ChangePosition/index.js +112 -0
  225. package/src/screens/ChangePosition/styles.js +87 -0
  226. package/src/screens/Device/__test__/DetailHistoryChart.test.js +2 -2
  227. package/src/screens/Device/__test__/EmergencyCountdown.test.js +4 -2
  228. package/src/screens/Device/__test__/detail.test.js +202 -257
  229. package/src/screens/Device/__test__/sensorDisplayItem.test.js +14 -10
  230. package/src/screens/Device/components/ChartWrapper.js +3 -3
  231. package/src/screens/Device/components/SensorDisplayItem.js +2 -1
  232. package/src/screens/Device/components/VisualChart.js +56 -9
  233. package/src/screens/Device/components/__test__/VisualChart.test.js +1 -1
  234. package/src/screens/Device/detail.js +14 -0
  235. package/src/screens/Device/hooks/__test__/useEmergencyButton.test.js +35 -13
  236. package/src/screens/Device/hooks/useEvaluateValue.js +28 -2
  237. package/src/screens/Device/styles.js +7 -0
  238. package/src/screens/DeviceInfo/__test__/index.test.js +16 -18
  239. package/src/screens/DeviceInfo/index.js +6 -5
  240. package/src/screens/GuestInfo/components/__test__/AccessScheduleSheet.test.js +52 -0
  241. package/src/screens/MoveToAnotherSubUnit/__test__/index.test.js +18 -13
  242. package/src/screens/Notification/__test__/Notification.test.js +64 -73
  243. package/src/screens/Notification/index.js +14 -14
  244. package/src/screens/PlayBackCamera/index.js +2 -3
  245. package/src/screens/SelectUnit/__test__/index.test.js +0 -5
  246. package/src/screens/SelectUnit/index.js +1 -2
  247. package/src/screens/SharedUnit/index.js +5 -4
  248. package/src/screens/Sharing/Components/TitleCheckBox.js +2 -2
  249. package/src/screens/Sharing/SelectUser.js +2 -2
  250. package/src/screens/Sharing/__test__/MemberList.test.js +9 -15
  251. package/src/screens/Sharing/__test__/MemberList2.test.js +10 -16
  252. package/src/screens/Sharing/__test__/SelectUser.test.js +8 -4
  253. package/src/screens/SideMenuDetail/SideMenuDetailStyles.js +1 -1
  254. package/src/screens/SmartAccount/SuccessfullyConnected/__test__/SuccessfullyConnected.test.js +3 -3
  255. package/src/screens/SmartAccount/__test__/Connecting.test.js +1 -1
  256. package/src/screens/SmartAccount/__test__/SmartAccount.test.js +3 -3
  257. package/src/screens/SmartAccount/index.js +1 -0
  258. package/src/screens/SmartIr/__test__/ButtonsBottom.test.js +1 -1
  259. package/src/screens/SmartIr/__test__/GroupButtonByType.test.js +5 -5
  260. package/src/screens/SmartIr/__test__/SelectBrand.test.js +2 -2
  261. package/src/screens/SmartIr/__test__/SelectDeviceType.test.js +2 -2
  262. package/src/screens/SmartIr/__test__/SmartIr.test.js +2 -2
  263. package/src/screens/SubUnit/ManageSubUnit.js +4 -4
  264. package/src/screens/SubUnit/__test__/ManageSubUnit.test.js +9 -28
  265. package/src/screens/TDSGuide/index.js +1 -1
  266. package/src/screens/Template/GatewayList.js +4 -1
  267. package/src/screens/Template/__test__/detail.test.js +24 -22
  268. package/src/screens/Template/detail.js +1 -0
  269. package/src/screens/UVIndexGuide/index.js +2 -2
  270. package/src/screens/Unit/Detail.js +6 -5
  271. package/src/screens/Unit/SelectAddToFavorites.js +1 -1
  272. package/src/screens/Unit/__test__/ChooseLocation.test.js +8 -13
  273. package/src/screens/Unit/__test__/Detail.test.js +10 -14
  274. package/src/screens/Unit/__test__/SelectAddToFavorites.test.js +1 -1
  275. package/src/screens/Unit/__test__/SmartAccount.test.js +8 -14
  276. package/src/screens/Unit/components/__test__/Header.test.js +4 -4
  277. package/src/screens/UnitSummary/components/3PPowerConsumption/__test__/3PPowerConsumption.test.js +1 -1
  278. package/src/screens/UnitSummary/components/3PPowerConsumption/index.js +14 -6
  279. package/src/screens/UnitSummary/components/PowerConsumption/__test__/PowerConsumption.test.js +1 -1
  280. package/src/screens/UnitSummary/components/Temperature/index.js +2 -2
  281. package/src/screens/UnitSummary/components/UvIndex/__test__/index.test.js +4 -0
  282. package/src/screens/UnitSummary/components/UvIndex/index.js +2 -2
  283. package/src/screens/UnitSummary/components/WaterQuality/__test__/index.test.js +6 -11
  284. package/src/screens/UnitSummary/components/WaterQuality/index.js +2 -2
  285. package/src/screens/UnitSummary/components/__test__/TotalPowerBox.test.js +1 -1
  286. package/src/screens/UnitSummary/components/__test__/TotalPowerConsumption.test.js +1 -1
  287. package/src/screens/UnitSummary/components/__test__/index.test.js +2 -2
  288. package/src/screens/WaterQualityGuide/index.js +10 -5
  289. package/src/utils/Apis/axios.js +3 -0
  290. package/src/utils/I18n/translations/en.json +24 -18
  291. package/src/utils/I18n/translations/vi.json +22 -18
  292. package/src/utils/Route/index.js +9 -3
  293. package/src/utils/Utils.js +29 -0
  294. package/src/utils/__test__/Utils.test.js +6 -0
  295. package/src/commons/ActionGroup/CurtainButtonTemplate.js +0 -130
  296. package/src/commons/ActionGroup/__test__/CurtainButtonTemplate.test.js +0 -109
  297. package/src/commons/Auth/SocialButton.js +0 -54
  298. package/src/commons/Auth/__test__/SocialButton.test.js +0 -44
  299. package/src/commons/Sharing/__test__/StationDevicePermission.test.js +0 -85
  300. package/src/hooks/__test__/useInitDeepLink.test.js +0 -28
  301. package/src/hooks/useInitDeepLink.js +0 -25
  302. package/src/screens/AddNewAction/SelectAction.js +0 -570
  303. package/src/screens/AddNewAction/SelectSensorDevices.js +0 -236
  304. package/src/screens/AddNewAction/SetupSensor.js +0 -263
  305. package/src/screens/AddNewAction/__test__/SelectSensorDevices.test.js +0 -181
  306. package/src/screens/AddNewAction/__test__/SetupSensor.test.js +0 -114
  307. package/src/screens/AddNewOneTap/index.js +0 -147
  308. package/src/screens/ScriptDetail/hooks/index.js +0 -136
  309. package/src/screens/ScriptDetail/index.js +0 -525
  310. package/src/screens/SetSchedule/index.js +0 -200
  311. /package/src/screens/{AddNewAction → Automate/AddNewAction}/Components/index.js +0 -0
  312. /package/src/screens/{AddNewAction → Automate/AddNewAction}/__test__/LoadingSelectAction.test.js +0 -0
@@ -10,6 +10,7 @@ import Notification from '../index';
10
10
  import NotificationItem from '../components/NotificationItem';
11
11
  import { API } from '../../../configs';
12
12
  import api from '../../../utils/Apis/axios';
13
+ import { WrapHeaderScrollable } from '../../../commons';
13
14
 
14
15
  const wrapComponent = () => (
15
16
  <SCProvider initState={mockSCStore({})}>
@@ -48,33 +49,30 @@ describe('test Notification', () => {
48
49
 
49
50
  it('test render', async () => {
50
51
  const response = {
51
- status: 200,
52
- data: {
53
- results: [
54
- {
55
- content_code: 'NOTIFY_INVITE_MEMBER',
56
- created_at: '2021-10-07T08:57:09.370286Z',
57
- icon: 'https://eoh-gateway-backend.eoh.io/Rectangle_65.png',
58
- id: 12905,
59
- is_read: true,
60
- params: "{'unit_owner_name': 'Canh', 'unit_name': 'EoH Office'}",
61
- type: 'NEWS',
62
- },
63
- {
64
- content_code: 'PARKING_COMPLETED',
65
- created_at: '2021-07-26T07:30:00.558123Z',
66
- icon: 'https://eoh-gateway-backend.eoh.io/2021-07-01_00-21_1.png',
67
- id: 11621,
68
- is_read: true,
69
- params: "{'booking_id': 4736}",
70
- type: 'NEWS',
71
- },
72
- ],
73
- },
52
+ results: [
53
+ {
54
+ content_code: 'NOTIFY_INVITE_MEMBER',
55
+ created_at: '2021-10-07T08:57:09.370286Z',
56
+ icon: 'https://eoh-gateway-backend.eoh.io/Rectangle_65.png',
57
+ id: 12905,
58
+ is_read: true,
59
+ params: "{'unit_owner_name': 'Canh', 'unit_name': 'EoH Office'}",
60
+ type: 'NEWS',
61
+ },
62
+ {
63
+ content_code: 'PARKING_COMPLETED',
64
+ created_at: '2021-07-26T07:30:00.558123Z',
65
+ icon: 'https://eoh-gateway-backend.eoh.io/2021-07-01_00-21_1.png',
66
+ id: 11621,
67
+ is_read: true,
68
+ params: "{'booking_id': 4736}",
69
+ type: 'NEWS',
70
+ },
71
+ ],
74
72
  };
75
73
  mock
76
74
  .onGet(API.NOTIFICATION.LIST_EOH_NOTIFICATIONS(1, ''))
77
- .reply(200, response.data);
75
+ .reply(200, response);
78
76
  await act(async () => {
79
77
  tree = await create(wrapComponent());
80
78
  });
@@ -86,73 +84,66 @@ describe('test Notification', () => {
86
84
 
87
85
  it('test handleOnLoadMore', async () => {
88
86
  const response = {
89
- status: 200,
90
- data: {
91
- results: [
92
- {
93
- content_code: 'NOTIFY_INVITE_MEMBER',
94
- created_at: '2021-10-07T08:57:09.370286Z',
95
- icon: 'https://eoh-gateway-backend.eoh.io/Rectangle_65.png',
96
- id: 12905,
97
- is_read: true,
98
- params: "{'unit_owner_name': 'Canh', 'unit_name': 'EoH Office'}",
99
- type: 'NEWS',
100
- },
101
- {
102
- content_code: 'PARKING_COMPLETED',
103
- created_at: '2021-07-26T07:30:00.558123Z',
104
- icon: 'https://eoh-gateway-backend.eoh.io/2021-07-01_00-21_1.png',
105
- id: 11621,
106
- is_read: true,
107
- params: "{'booking_id': 4736}",
108
- type: 'NEWS',
109
- },
110
- ],
111
- },
87
+ count: 13,
88
+ results: [],
112
89
  };
90
+ for (let index = 0; index < 10; index++) {
91
+ response.results.push({
92
+ content_code: 'NOTIFY_INVITE_MEMBER',
93
+ created_at: '2021-10-07T08:57:09.370286Z',
94
+ icon: 'https://eoh-gateway-backend.eoh.io/Rectangle_65.png',
95
+ id: 12905,
96
+ is_read: true,
97
+ params: "{'unit_owner_name': 'Canh', 'unit_name': 'EoH Office'}",
98
+ type: 'NEWS',
99
+ });
100
+ }
113
101
  mock
114
102
  .onGet(API.NOTIFICATION.LIST_EOH_NOTIFICATIONS(1, ''))
115
- .reply(200, response.data);
103
+ .reply(200, response);
116
104
  await act(async () => {
117
105
  tree = await create(wrapComponent());
118
106
  });
119
107
  const instance = tree.root;
108
+ const wrapHeaderScrollable = instance.findByType(WrapHeaderScrollable);
109
+ expect(wrapHeaderScrollable.props.disableLoadMore).toEqual(false);
110
+
120
111
  const scrollView = instance.findByType(Animated.ScrollView);
112
+ mock
113
+ .onGet(API.NOTIFICATION.LIST_EOH_NOTIFICATIONS(2, ''))
114
+ .reply(200, response);
121
115
  await act(async () => {
122
116
  scrollView.props.onMomentumScrollEnd();
123
117
  });
124
- expect(scrollView).toBeDefined();
118
+ expect(wrapHeaderScrollable.props.disableLoadMore).toEqual(true);
125
119
  });
126
120
 
127
121
  it('test onRefresh', async () => {
128
122
  const response = {
129
- status: 200,
130
- data: {
131
- results: [
132
- {
133
- content_code: 'NOTIFY_INVITE_MEMBER',
134
- created_at: '2021-10-07T08:57:09.370286Z',
135
- icon: 'https://eoh-gateway-backend.eoh.io/Rectangle_65.png',
136
- id: 12905,
137
- is_read: true,
138
- params: "{'unit_owner_name': 'Canh', 'unit_name': 'EoH Office'}",
139
- type: 'NEWS',
140
- },
141
- {
142
- content_code: 'PARKING_COMPLETED',
143
- created_at: '2021-07-26T07:30:00.558123Z',
144
- icon: 'https://eoh-gateway-backend.eoh.io/2021-07-01_00-21_1.png',
145
- id: 11621,
146
- is_read: true,
147
- params: "{'booking_id': 4736}",
148
- type: 'NEWS',
149
- },
150
- ],
151
- },
123
+ results: [
124
+ {
125
+ content_code: 'NOTIFY_INVITE_MEMBER',
126
+ created_at: '2021-10-07T08:57:09.370286Z',
127
+ icon: 'https://eoh-gateway-backend.eoh.io/Rectangle_65.png',
128
+ id: 12905,
129
+ is_read: true,
130
+ params: "{'unit_owner_name': 'Canh', 'unit_name': 'EoH Office'}",
131
+ type: 'NEWS',
132
+ },
133
+ {
134
+ content_code: 'PARKING_COMPLETED',
135
+ created_at: '2021-07-26T07:30:00.558123Z',
136
+ icon: 'https://eoh-gateway-backend.eoh.io/2021-07-01_00-21_1.png',
137
+ id: 11621,
138
+ is_read: true,
139
+ params: "{'booking_id': 4736}",
140
+ type: 'NEWS',
141
+ },
142
+ ],
152
143
  };
153
144
  mock
154
145
  .onGet(API.NOTIFICATION.LIST_EOH_NOTIFICATIONS(1, ''))
155
- .reply(200, response.data);
146
+ .reply(200, response);
156
147
  await act(async () => {
157
148
  tree = await create(wrapComponent());
158
149
  });
@@ -17,10 +17,9 @@ import { useSCContextSelector } from '../../context';
17
17
  import { notImplemented } from '../../utils/Utils';
18
18
  import { useReceiveNotifications } from '../../hooks';
19
19
 
20
- let page = 1;
21
-
22
20
  const Notification = memo(() => {
23
21
  const t = useTranslations();
22
+ const [page, setPage] = useState(1);
24
23
  const user = useSCContextSelector((state) => state?.auth?.account?.user);
25
24
  const [notifications, setNotifications] = useState([]);
26
25
  const [maxPageNotification, setMaxPageNotification] = useState(1);
@@ -60,27 +59,21 @@ const Notification = memo(() => {
60
59
  }
61
60
  }, []);
62
61
 
63
- useFocusEffect(
64
- useCallback(() => {
65
- fetchNotifications(1);
66
- // eslint-disable-next-line react-hooks/exhaustive-deps
67
- }, [])
68
- );
69
-
70
62
  const handleOnLoadMore = useCallback(() => {
71
- page += 1;
72
- if (page <= maxPageNotification) {
73
- fetchNotifications(page);
63
+ setPage((preState) => preState + 1);
64
+ if (page < maxPageNotification) {
65
+ fetchNotifications(page + 1);
74
66
  }
75
- }, [maxPageNotification, fetchNotifications]);
67
+ }, [page, maxPageNotification, fetchNotifications]);
76
68
 
77
69
  const onRefresh = useCallback(async () => {
78
- page = 1;
70
+ setPage(1);
79
71
  const { success, data } = await axiosGet(
80
72
  API.NOTIFICATION.LIST_EOH_NOTIFICATIONS(1, '')
81
73
  );
82
74
  if (success) {
83
75
  setNotifications(data.results);
76
+ setMaxPageNotification(Math.ceil(data.count / 10));
84
77
  }
85
78
  }, []);
86
79
 
@@ -91,6 +84,13 @@ const Notification = memo(() => {
91
84
  return () => unwatchNotificationData(user);
92
85
  }, [user, onRefresh]);
93
86
 
87
+ useFocusEffect(
88
+ useCallback(() => {
89
+ onRefresh();
90
+ // eslint-disable-next-line react-hooks/exhaustive-deps
91
+ }, [])
92
+ );
93
+
94
94
  return (
95
95
  <View style={styles.wrap}>
96
96
  <WrapHeaderScrollable
@@ -11,7 +11,7 @@ import { Colors, Images } from '../../configs';
11
11
  import { useTranslations } from '../../hooks/Common/useTranslations';
12
12
  import Text from '../../commons/Text';
13
13
  import Timer from './Timer';
14
- import { useStatusBarPreview } from '../../hooks/Common/useStatusBar';
14
+ import { setStatusBarPreview } from '../../hooks/Common/useStatusBar';
15
15
  import MediaPlayerFull from '../../commons/MediaPlayerDetail/MediaPlayerFull';
16
16
  import { DATE_TIME_FORMAT, AccessibilityLabel } from '../../configs/Constants';
17
17
 
@@ -173,8 +173,7 @@ const PlayBackCamera = () => {
173
173
  }, [selected, getHourWithTimeZone]);
174
174
 
175
175
  useEffect(() => {
176
- // eslint-disable-next-line react-hooks/rules-of-hooks
177
- useStatusBarPreview(
176
+ setStatusBarPreview(
178
177
  isShowDate ? Colors.BlackTransparent4 : Colors.TextTransparent
179
178
  );
180
179
  }, [isShowDate]);
@@ -59,7 +59,6 @@ describe('Test Select unit screen', () => {
59
59
  isAutomateTab: true,
60
60
  isMultiUnits: true,
61
61
  routeName: 'test',
62
- isCreateNewAction: false,
63
62
  },
64
63
  });
65
64
  const response = {
@@ -96,7 +95,6 @@ describe('Test Select unit screen', () => {
96
95
  isAutomateTab: true,
97
96
  isMultiUnits: true,
98
97
  routeName: 'test',
99
- isCreateNewAction: false,
100
98
  },
101
99
  });
102
100
 
@@ -119,7 +117,6 @@ describe('Test Select unit screen', () => {
119
117
  useRoute.mockReturnValue({
120
118
  params: {
121
119
  automateId: 1,
122
- isCreateNewAction: true,
123
120
  scriptName: '1',
124
121
  title: 'select_device',
125
122
  type: 'value_change',
@@ -162,7 +159,6 @@ describe('Test Select unit screen', () => {
162
159
  useRoute.mockReturnValue({
163
160
  params: {
164
161
  automateId: 1,
165
- isCreateNewAction: true,
166
162
  scriptName: '1',
167
163
  title: 'select_device',
168
164
  type: 'value_change',
@@ -189,7 +185,6 @@ describe('Test Select unit screen', () => {
189
185
  expect(mockNavigate).toBeCalledWith(Routes.ScriptDetail, {
190
186
  id: 1,
191
187
  havePermission: true,
192
- isCreateNewAction: true,
193
188
  isMultiUnits: undefined,
194
189
  name: '1',
195
190
  type: undefined,
@@ -67,11 +67,10 @@ const SelectUnit = () => {
67
67
 
68
68
  const onContinue = useCallback(() => {
69
69
  navigate(
70
- isCreateNewAction || !routeName ? Routes.SelectSensorDevices : routeName,
70
+ isCreateNewAction || !routeName ? Routes.SelectMonitorDevices : routeName,
71
71
  {
72
72
  ...params,
73
73
  automate,
74
- title,
75
74
  selectedItem,
76
75
  type,
77
76
  isAutomateTab,
@@ -1,19 +1,20 @@
1
- import React, { useEffect, useCallback, useState, useMemo } from 'react';
2
- import { View, TouchableOpacity, FlatList, RefreshControl } from 'react-native';
3
- import { useNavigation, useIsFocused } from '@react-navigation/native';
1
+ import React, { useCallback, useEffect, useMemo, useState } from 'react';
2
+ import { FlatList, RefreshControl, TouchableOpacity, View } from 'react-native';
3
+ import { useIsFocused, useNavigation } from '@react-navigation/native';
4
4
 
5
5
  import { axiosGet } from '../../utils/Apis/axios';
6
6
  import { useTranslations } from '../../hooks/Common/useTranslations';
7
7
  import { API } from '../../configs';
8
8
  import Text from '../../commons/Text';
9
9
  import SharedUnit from '../../commons/Unit/SharedUnit';
10
- import { useTitleHeader, useBlockBackAndroid } from '../../hooks/Common';
10
+ import { useBlockBackAndroid } from '../../hooks/Common';
11
11
  import { AccessibilityLabel } from '../../configs/Constants';
12
12
 
13
13
  import styles from './styles';
14
14
  import TabHeader from './TabHeader';
15
15
  import { useSCContextSelector } from '../../context';
16
16
  import { ModalCustom } from '../../commons/Modal';
17
+ import useTitleHeader from '../../hooks/Common/useTitleHeader';
17
18
 
18
19
  const Shared = () => {
19
20
  useBlockBackAndroid();
@@ -1,4 +1,4 @@
1
- import React, { memo, useEffect, useState } from 'react';
1
+ import React, { useEffect, useState } from 'react';
2
2
  import { View, Text } from 'react-native';
3
3
  import { CheckBoxCustom } from '.';
4
4
  import t from '../../../hooks/Common/useTranslations';
@@ -48,4 +48,4 @@ const TitleCheckBox = ({
48
48
  );
49
49
  };
50
50
 
51
- export default memo(TitleCheckBox);
51
+ export default TitleCheckBox;
@@ -125,7 +125,7 @@ const SelectUser = ({ route }) => {
125
125
  </View>
126
126
 
127
127
  {users.length > 0 && (
128
- <View style={styles.constainerUsers}>
128
+ <View style={styles.containerUsers}>
129
129
  <View style={styles.padding}>
130
130
  <Text
131
131
  accessibilityLabel={
@@ -201,7 +201,7 @@ const styles = StyleSheet.create({
201
201
  ...Theme.whiteBoxRadius,
202
202
  marginTop: 8,
203
203
  },
204
- constainerUsers: {
204
+ containerUsers: {
205
205
  marginTop: 24,
206
206
  flex: 1,
207
207
  },
@@ -7,6 +7,11 @@ import { SCProvider } from '../../../context';
7
7
  import { mockSCStore } from '../../../context/mockStore';
8
8
  import { TouchableOpacity } from 'react-native';
9
9
  import Routes from '../../../utils/Route';
10
+ import MockAdapter from 'axios-mock-adapter';
11
+ import api from '../../../utils/Apis/axios';
12
+ import { useNavigation } from '@react-navigation/native';
13
+
14
+ new MockAdapter(api.axiosInstance);
10
15
 
11
16
  jest.mock('../../../hooks/Common', () => {
12
17
  return {
@@ -14,21 +19,6 @@ jest.mock('../../../hooks/Common', () => {
14
19
  };
15
20
  });
16
21
 
17
- const mockedNavigate = jest.fn();
18
- const mockUseIsFocused = jest.fn();
19
-
20
- jest.mock('@react-navigation/native', () => {
21
- return {
22
- ...jest.requireActual('@react-navigation/native'),
23
- useNavigation: () => ({
24
- navigate: mockedNavigate,
25
- }),
26
- useIsFocused: () => ({
27
- isFocused: mockUseIsFocused,
28
- }),
29
- };
30
- });
31
-
32
22
  const wrapComponent = (route, state) => (
33
23
  <SCProvider initState={mockSCStore({})}>
34
24
  <MemberList route={route} />
@@ -47,7 +37,11 @@ describe('test MemberList', () => {
47
37
  },
48
38
  };
49
39
 
40
+ const mockedNavigate = useNavigation().navigate;
41
+
50
42
  beforeEach(() => {
43
+ mockedNavigate.mockClear();
44
+
51
45
  route = {
52
46
  params: {
53
47
  unitId: 1,
@@ -7,6 +7,9 @@ import { SCProvider } from '../../../context';
7
7
  import { mockSCStore } from '../../../context/mockStore';
8
8
  import { TouchableOpacity } from 'react-native';
9
9
  import Routes from '../../../utils/Route';
10
+ import { useNavigation } from '@react-navigation/native';
11
+ import MockAdapter from 'axios-mock-adapter';
12
+ import api from '../../../utils/Apis/axios';
10
13
 
11
14
  jest.mock('../../../hooks/Common', () => {
12
15
  return {
@@ -14,27 +17,14 @@ jest.mock('../../../hooks/Common', () => {
14
17
  };
15
18
  });
16
19
 
17
- const mockedNavigate = jest.fn();
18
- const mockUseIsFocused = jest.fn();
19
-
20
- jest.mock('@react-navigation/native', () => {
21
- return {
22
- ...jest.requireActual('@react-navigation/native'),
23
- useNavigation: () => ({
24
- navigate: mockedNavigate,
25
- }),
26
- useIsFocused: () => ({
27
- isFocused: mockUseIsFocused,
28
- }),
29
- };
30
- });
31
-
32
20
  const wrapComponent = (route, state) => (
33
21
  <SCProvider initState={mockSCStore({})}>
34
22
  <MemberList route={route} />
35
23
  </SCProvider>
36
24
  );
37
25
 
26
+ new MockAdapter(api.axiosInstance);
27
+
38
28
  describe('test MemberList', () => {
39
29
  let route;
40
30
  let localState = {
@@ -46,6 +36,7 @@ describe('test MemberList', () => {
46
36
  },
47
37
  },
48
38
  };
39
+ const mockedNavigate = useNavigation().navigate;
49
40
 
50
41
  beforeEach(() => {
51
42
  route = {
@@ -58,6 +49,7 @@ describe('test MemberList', () => {
58
49
  },
59
50
  },
60
51
  };
52
+ mockedNavigate.mockReset();
61
53
  });
62
54
 
63
55
  it('AlertAction rightButtonClick', async () => {
@@ -71,7 +63,9 @@ describe('test MemberList', () => {
71
63
  alertAction.props.rightButtonClick();
72
64
  });
73
65
  const MemberListButtons = instance.findAllByType(TouchableOpacity);
74
- await MemberListButtons[1].props.onPress();
66
+ await act(async () => {
67
+ await MemberListButtons[1].props.onPress();
68
+ });
75
69
  expect(mockedNavigate).not.toBeCalledWith(Routes.AddMemberStack, {
76
70
  screen: Routes.SharingSelectPermission,
77
71
  params: { unit: { id: 1 } },
@@ -160,7 +160,7 @@ describe('test SelectUser container', () => {
160
160
  });
161
161
  mock.onPost(API.SHARE.SHARE()).reply(200, {
162
162
  user: {
163
- id: 2,
163
+ id: 3,
164
164
  name: 'user add',
165
165
  phone_number: '0909123456',
166
166
  },
@@ -168,14 +168,18 @@ describe('test SelectUser container', () => {
168
168
  await act(async () => {
169
169
  await button.props.onPress();
170
170
  });
171
+ expect(textInput.props.errorText).toEqual('');
172
+ accountList = instance.findAllByType(AccountList);
173
+ expect(accountList).toHaveLength(1);
174
+ expect(accountList[0].props.accounts).toHaveLength(1);
175
+
171
176
  await act(async () => {
172
177
  await textInput.props.onChange('test123@gmail.com');
173
178
  });
174
- expect(textInput.props.errorText).toEqual('');
179
+ mock.onPost(API.SHARE.SHARE()).reply(400);
175
180
  await act(async () => {
176
181
  await button.props.onPress();
177
182
  });
178
- accountList = instance.findAllByType(AccountList);
179
- expect(accountList).toHaveLength(1);
183
+ expect(accountList[0].props.accounts).toHaveLength(1);
180
184
  });
181
185
  });
@@ -19,7 +19,7 @@ export default StyleSheet.create({
19
19
  bottom: 0,
20
20
  left: 0,
21
21
  right: 0,
22
- paddingBottom: getBottomSpace() > 0 ? getBottomSpace() : 32,
22
+ paddingBottom: getBottomSpace() || 32,
23
23
  paddingTop: 24,
24
24
  backgroundColor: Colors.White,
25
25
  borderColor: Colors.ShadownTransparent,
@@ -86,7 +86,7 @@ describe('Test SuccessfullyConnected', () => {
86
86
  ],
87
87
  });
88
88
  await act(async () => {
89
- tree = renderer.create(wrapComponent(route));
89
+ tree = await renderer.create(wrapComponent(route));
90
90
  });
91
91
  await flushPromises();
92
92
  const instance = tree.root;
@@ -101,7 +101,7 @@ describe('Test SuccessfullyConnected', () => {
101
101
 
102
102
  it('render function handleContinue ', async () => {
103
103
  await act(async () => {
104
- tree = renderer.create(wrapComponent(route));
104
+ tree = await renderer.create(wrapComponent(route));
105
105
  });
106
106
  const instance = tree.root;
107
107
  const handleContinue = instance.find(
@@ -123,7 +123,7 @@ describe('Test SuccessfullyConnected', () => {
123
123
  });
124
124
  it('render function handleFinish ', async () => {
125
125
  await act(async () => {
126
- tree = renderer.create(wrapComponent(route));
126
+ tree = await renderer.create(wrapComponent(route));
127
127
  });
128
128
  const instance = tree.root;
129
129
 
@@ -44,7 +44,7 @@ describe('Test Connecting', () => {
44
44
  },
45
45
  };
46
46
  await act(async () => {
47
- tree = renderer.create(wrapComponent(route));
47
+ tree = await renderer.create(wrapComponent(route));
48
48
  });
49
49
  const instance = tree.root;
50
50
  const texts = instance.findAllByType(Text);
@@ -38,7 +38,7 @@ describe('Test SmartAccount', () => {
38
38
  },
39
39
  };
40
40
  await act(async () => {
41
- tree = renderer.create(wrapComponent(route));
41
+ tree = await renderer.create(wrapComponent(route));
42
42
  });
43
43
  const instance = tree.root;
44
44
  const scrollView = instance.findAllByType(ScrollView);
@@ -58,7 +58,7 @@ describe('Test SmartAccount', () => {
58
58
  },
59
59
  };
60
60
  await act(async () => {
61
- tree = renderer.create(wrapComponent(route));
61
+ tree = await renderer.create(wrapComponent(route));
62
62
  });
63
63
  const instance = tree.root;
64
64
  const touchableOpacity = instance.find(
@@ -229,7 +229,7 @@ describe('Test SmartAccount', () => {
229
229
  },
230
230
  };
231
231
  await act(async () => {
232
- tree = renderer.create(wrapComponent(route));
232
+ tree = await renderer.create(wrapComponent(route));
233
233
  });
234
234
  const instance = tree.root;
235
235
  const touchSupplierItem = instance.findAll(
@@ -118,6 +118,7 @@ const SmartAccount = ({ route }) => {
118
118
  <View style={styles.logocontainer}>
119
119
  {supplierItems.map((item, index) => (
120
120
  <TouchableOpacity
121
+ key={index}
121
122
  style={[styles.logo]}
122
123
  onPress={() => handleSelectSupplier(index)}
123
124
  accessibilityLabel={AccessibilityLabel.TOUCH_SUPPLIER_ITEM}
@@ -16,7 +16,7 @@ describe('Test ButtonsBottom', () => {
16
16
 
17
17
  it('render ButtonsBottom', async () => {
18
18
  await act(async () => {
19
- tree = renderer.create(wrapComponent());
19
+ tree = await renderer.create(wrapComponent());
20
20
  });
21
21
  const instance = tree.root;
22
22
  const touchableOpacity = instance.findAllByType(TouchableOpacity);
@@ -37,7 +37,7 @@ describe('Test GroupButtonByType', () => {
37
37
  },
38
38
  };
39
39
  await act(async () => {
40
- tree = renderer.create(wrapComponent(route));
40
+ tree = await renderer.create(wrapComponent(route));
41
41
  });
42
42
  const instance = tree.root;
43
43
  const bottomButton = instance.findAllByType(ButtonsBottom)[0];
@@ -70,7 +70,7 @@ describe('Test GroupButtonByType', () => {
70
70
  },
71
71
  };
72
72
  await act(async () => {
73
- tree = renderer.create(wrapComponent(route));
73
+ tree = await renderer.create(wrapComponent(route));
74
74
  });
75
75
  const instance = tree.root;
76
76
  const bottomButton = instance.findAllByType(ButtonsBottom)[0];
@@ -88,7 +88,7 @@ describe('Test GroupButtonByType', () => {
88
88
  },
89
89
  };
90
90
  await act(async () => {
91
- tree = renderer.create(wrapComponent(route));
91
+ tree = await renderer.create(wrapComponent(route));
92
92
  });
93
93
  const instance = tree.root;
94
94
  const bottomButton = instance.findAllByType(ButtonsBottom)[0];
@@ -106,7 +106,7 @@ describe('Test GroupButtonByType', () => {
106
106
  },
107
107
  };
108
108
  await act(async () => {
109
- tree = renderer.create(wrapComponent(route));
109
+ tree = await renderer.create(wrapComponent(route));
110
110
  });
111
111
 
112
112
  const instance = tree.root;
@@ -129,7 +129,7 @@ describe('Test GroupButtonByType', () => {
129
129
  },
130
130
  };
131
131
  await act(async () => {
132
- tree = renderer.create(wrapComponent(route));
132
+ tree = await renderer.create(wrapComponent(route));
133
133
  });
134
134
 
135
135
  const instance = tree.root;
@@ -31,7 +31,7 @@ describe('Test SelectBrand', () => {
31
31
  },
32
32
  };
33
33
  await act(async () => {
34
- tree = renderer.create(wrapComponent(route));
34
+ tree = await renderer.create(wrapComponent(route));
35
35
  });
36
36
  const instance = tree.root;
37
37
  const scrollView = instance.findAllByType(ScrollView);
@@ -45,7 +45,7 @@ describe('Test SelectBrand', () => {
45
45
  },
46
46
  };
47
47
  await act(async () => {
48
- tree = renderer.create(wrapComponent(route));
48
+ tree = await renderer.create(wrapComponent(route));
49
49
  });
50
50
  const instance = tree.root;
51
51
  const scrollView = instance.findAllByType(ScrollView);