@eohjsc/react-native-smart-city 0.3.36 → 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 (301) hide show
  1. package/package.json +1 -1
  2. package/src/commons/Action/__test__/ItemQuickAction.test.js +36 -32
  3. package/src/commons/ActionGroup/ColorPickerTemplate.js +61 -23
  4. package/src/commons/ActionGroup/OnOffSmartLock/AutoLock/__test__/index.test.js +2 -2
  5. package/src/commons/ActionGroup/OnOffSmartLock/PasscodeList/__test__/ItemPasscode.test.js +1 -1
  6. package/src/commons/ActionGroup/OnOffSmartLock/PasscodeList/__test__/index.test.js +1 -1
  7. package/src/commons/ActionGroup/OnOffSmartLock/SetupGeneratePasscode/__test__/index.test.js +2 -2
  8. package/src/commons/ActionGroup/SliderRangeTemplate.js +35 -20
  9. package/src/commons/ActionGroup/SmartTiviActionTemplate/__test__/CircleButton.test.js +12 -12
  10. package/src/commons/ActionGroup/SmartTiviActionTemplate/__test__/ControlPlay.test.js +10 -10
  11. package/src/commons/ActionGroup/SmartTiviActionTemplate/__test__/RectangleButton.test.js +7 -7
  12. package/src/commons/ActionGroup/SmartTiviActionTemplate/__test__/SmartTiviActionTemplate.test.js +23 -23
  13. package/src/commons/ActionGroup/StatesGridActionTemplate.js +1 -3
  14. package/src/commons/ActionGroup/__test__/ColorPickerTemplate.test.js +1 -1
  15. package/src/commons/ActionGroup/__test__/CurtainButtonTemplate.test.js +4 -4
  16. package/src/commons/ActionGroup/__test__/NumberUpDownTemplate.test.js +14 -14
  17. package/src/commons/ActionGroup/__test__/OnOffButtonTemplate.test.js +12 -12
  18. package/src/commons/ActionGroup/__test__/OnOffSmartLock.test.js +2 -2
  19. package/src/commons/ActionGroup/__test__/OnOffTemplate.test.js +10 -10
  20. package/src/commons/ActionGroup/__test__/OneBigButtonTemplate.test.js +2 -2
  21. package/src/commons/ActionGroup/__test__/OptionsDropdownTemplate.test.js +7 -7
  22. package/src/commons/ActionGroup/__test__/SliderRangeTemplate.test.js +1 -1
  23. package/src/commons/ActionGroup/__test__/StatesGridActionTemplate.test.js +2 -2
  24. package/src/commons/ActionGroup/__test__/ThreeButtonTemplate.test.js +2 -2
  25. package/src/commons/ActionGroup/__test__/TimerActionTemplate.test.js +3 -3
  26. package/src/commons/ActionGroup/__test__/TimerActionTemplateWithutConfigValue.test.js +2 -2
  27. package/src/commons/ActionGroup/__test__/TwoButtonTemplate.test.js +14 -14
  28. package/src/commons/ActionGroup/__test__/index.test.js +41 -41
  29. package/src/commons/ActionTemplate/OnOffButtonAction.js +6 -4
  30. package/src/commons/ActionTemplate/OnOffSimpleAction.js +9 -3
  31. package/src/commons/ActionTemplate/OnOffSmartLockAction.js +12 -10
  32. package/src/commons/ActionTemplate/__test__/OnOffButtonAction.test.js +3 -3
  33. package/src/commons/ActionTemplate/__test__/OnOffSimpleAction.test.js +3 -3
  34. package/src/commons/ActionTemplate/__test__/OneButtonAction.test.js +3 -3
  35. package/src/commons/ActionTemplate/__test__/ThreeButtonAction.test.js +3 -3
  36. package/src/commons/ActionTemplate/__test__/index.test.js +6 -6
  37. package/src/commons/ActionTemplate/index.js +15 -3
  38. package/src/commons/Alert/__test__/Alert.test.js +2 -2
  39. package/src/commons/AlertAction/__test__/AlertAction.test.js +2 -2
  40. package/src/commons/Auth/__test__/AccountItem.test.js +4 -4
  41. package/src/commons/Auth/__test__/AccountList.test.js +4 -4
  42. package/src/commons/Auth/__test__/OtpInputList.test.js +20 -16
  43. package/src/commons/Auth/__test__/SocialButton.test.js +6 -6
  44. package/src/commons/Automate/__test__/ItemAutomate.test.js +2 -2
  45. package/src/commons/Automate/__test__/ItemScriptAction.test.js +2 -2
  46. package/src/commons/BackDefault/__test__/BackDefault.test.js +2 -2
  47. package/src/commons/Button/__test__/Button.test.js +3 -3
  48. package/src/commons/ButtonPopup/__test__/ButtonPopup.test.js +2 -2
  49. package/src/commons/Calendar/__test__/Calendar.test.js +2 -2
  50. package/src/commons/ChartLoading/__test__/ChartLoading.test.js +2 -2
  51. package/src/commons/CircleButton/__test__/CircleButton.test.js +2 -2
  52. package/src/commons/CircleView/__test__/CircleView.test.js +2 -2
  53. package/src/commons/Dashboard/MyPinnedSharedUnit/__test__/MyPinnedSharedUnit.test.js +3 -3
  54. package/src/commons/Dashboard/MyUnit/__test__/MyUnit.test.js +2 -2
  55. package/src/commons/DateTimeRangeChange/__test__/DateTimeButton.test.js +4 -4
  56. package/src/commons/Device/Emergency/__test__/EmergencyButton.test.js +5 -5
  57. package/src/commons/Device/Emergency/__test__/EmergencyDetail.test.js +2 -2
  58. package/src/commons/Device/Hanet/ItemHanetDevice.test.js +5 -5
  59. package/src/commons/Device/LinearChart/LinearChart.test.js +2 -2
  60. package/src/commons/Device/RainningSensor/__test__/CurrentRainSensor.test.js +6 -6
  61. package/src/commons/Device/SonosSpeaker/__test__/SonosSpeaker.test.js +8 -8
  62. package/src/commons/Device/WindDirection/Compass/Compass.test.js +4 -4
  63. package/src/commons/Device/WindSpeed/LinearChart/__test__/LinearChart.test.js +2 -2
  64. package/src/commons/Device/WindSpeed/LinearChart/__test__/ValueBalloon.test.js +2 -2
  65. package/src/commons/Device/WindSpeed/__test__/Anemometer.test.js +4 -4
  66. package/src/commons/Device/WindSpeed/__test__/ChartInfo.test.js +5 -5
  67. package/src/commons/Device/__test__/ConnectedViewHeader.test.js +6 -6
  68. package/src/commons/Device/__test__/DeviceAlertStatus.test.js +6 -6
  69. package/src/commons/Device/__test__/DisconnectedView.test.js +12 -12
  70. package/src/commons/Device/__test__/FlatListItems.test.js +2 -2
  71. package/src/commons/Device/__test__/FooterInfo.test.js +2 -2
  72. package/src/commons/Device/__test__/SensorConnectedStatus.test.js +2 -2
  73. package/src/commons/DisplayChecking/__test__/DisplayChecking.test.js +2 -2
  74. package/src/commons/Explore/SearchBox/__test__/SearchBox.test.js +6 -6
  75. package/src/commons/Explore/__test__/CityItem.test.js +6 -6
  76. package/src/commons/Explore/__test__/HeaderExplore.test.js +2 -2
  77. package/src/commons/Explore/__test__/HeaderLabel.test.js +3 -3
  78. package/src/commons/Explore/__test__/LocationItem.test.js +3 -3
  79. package/src/commons/FieldTemplate/ChooseUserField/__test__/index.test.js +4 -4
  80. package/src/commons/FieldTemplate/PasscodeField/__test__/index.test.js +2 -2
  81. package/src/commons/FieldTemplate/ScheduleField/__test__/index.test.js +1 -1
  82. package/src/commons/Form/__test__/CurrencyInput.test.js +12 -12
  83. package/src/commons/Form/__test__/TextInput.test.js +4 -4
  84. package/src/commons/Form/__test__/TextInputPassword.test.js +5 -5
  85. package/src/commons/FourButtonFilterHistory/__test__/FourButtonFilterHistory.test.js +1 -1
  86. package/src/commons/GroupCheckBox/__test__/GroupCheckBox.test.js +12 -10
  87. package/src/commons/Header/__test__/HeaderCT.test.js +11 -11
  88. package/src/commons/ImageButton/__test__/ImageButton.test.js +2 -2
  89. package/src/commons/ImagePicker/__test__/ImagePicker.test.js +8 -8
  90. package/src/commons/MediaPlayerDetail/__test__/MediaPlayerDetail.test.js +1 -1
  91. package/src/commons/MediaPlayerDetail/__test__/MediaPlayerFull.test.js +8 -8
  92. package/src/commons/MenuActionAddnew/__test__/MenuActionAddNew.test.js +3 -3
  93. package/src/commons/MenuActionList/__test__/MenuActionList.test.js +3 -3
  94. package/src/commons/MenuActionMore/__test__/MenuActionMore.test.js +2 -2
  95. package/src/commons/Modal/__test__/ModalBottom.test.js +4 -4
  96. package/src/commons/OneTapTemplate/NumberUpDownActionTemplate.js +39 -13
  97. package/src/commons/OneTapTemplate/OptionsDropdownActionTemplate.js +33 -14
  98. package/src/commons/OneTapTemplate/StatesGridActionTemplate.js +9 -4
  99. package/src/commons/OneTapTemplate/__test__/NumberUpDownActionTemplate.test.js +25 -12
  100. package/src/commons/OneTapTemplate/__test__/OptionsDropdownActionTemplate.test.js +13 -13
  101. package/src/commons/OneTapTemplate/__test__/StatesGridActionTemplate.test.js +7 -7
  102. package/src/commons/PreventAccess/__test__/PreventAccess.test.js +7 -5
  103. package/src/commons/Processing/__test__/Connecting.test.js +61 -25
  104. package/src/commons/Processing/index.js +21 -7
  105. package/src/commons/RowItem/__test__/RowItem.test.js +2 -2
  106. package/src/commons/RowUser/__test__/RowUser.test.js +2 -2
  107. package/src/commons/SearchLocation/__test__/RowLocation.test.js +4 -4
  108. package/src/commons/Section/Section.test.js +4 -4
  109. package/src/commons/SelectSubUnit/__test__/SelectSubUnit.test.js +3 -3
  110. package/src/commons/SelectSubUnit/index.js +1 -1
  111. package/src/commons/SelectUnit/__test__/SelectUnit.test.js +3 -3
  112. package/src/commons/SelectUnit/index.js +3 -4
  113. package/src/commons/Sharing/__test__/BtnRemoveMember.test.js +3 -3
  114. package/src/commons/Sharing/__test__/ButtonRemoveMember.test.js +2 -2
  115. package/src/commons/Sharing/__test__/DevicePermissionsCheckbox.test.js +3 -3
  116. package/src/commons/Sharing/__test__/MemberList.test.js +8 -8
  117. package/src/commons/Sharing/__test__/RowMember.test.js +4 -4
  118. package/src/commons/Sharing/__test__/StationDevicePermission.test.js +7 -7
  119. package/src/commons/Sharing/__test__/WrapHeaderScrollable.test.js +6 -6
  120. package/src/commons/SubUnit/OneTap/__test__/SubUnitAutomate.test.js +6 -6
  121. package/src/commons/SubUnit/__test__/Favorites.test.js +3 -3
  122. package/src/commons/SubUnit/__test__/Item.test.js +4 -4
  123. package/src/commons/SubUnit/__test__/ShortDetail.test.js +16 -16
  124. package/src/commons/SummaryItem/__test__/SummaryItem.test.js +7 -7
  125. package/src/commons/Tabbar/__test__/index.test.js +1 -1
  126. package/src/commons/TextButton/__test__/TextButton.test.js +6 -6
  127. package/src/commons/Today/__test__/Today.test.js +2 -2
  128. package/src/commons/TouchableScale/__test__/TouchableScale.test.js +5 -5
  129. package/src/commons/Unit/__test__/HeaderUnit.test.js +3 -3
  130. package/src/commons/Unit/__test__/SharedUnit.test.js +13 -13
  131. package/src/commons/UnitSummary/AirQuality/__test__/index.test.js +25 -25
  132. package/src/commons/UnitSummary/ConfigHistoryChart/__test__/ConfigHistoryChart.test.js +258 -25
  133. package/src/commons/UnitSummary/ConfigHistoryChart/index.js +90 -1
  134. package/src/commons/UnitSummary/__test__/TotalPowerBox.test.js +2 -2
  135. package/src/commons/UnitSummary/__test__/TotalPowerConsumption.test.js +2 -2
  136. package/src/commons/ViewButtonBottom/__test__/ViewButtonBottom.test.js +3 -3
  137. package/src/commons/WheelDateTimePicker/__test__/index.test.js +2 -2
  138. package/src/commons/WrapParallaxScrollView/index.js +2 -1
  139. package/src/configs/API.js +6 -2
  140. package/src/configs/AccessibilityLabel.js +5 -0
  141. package/src/hooks/Common/__test__/useAndroidTranslucentStatusBar.test.js +2 -2
  142. package/src/hooks/Common/__test__/useStatusbar.test.js +4 -4
  143. package/src/hooks/Common/__test__/useTranslations.test.js +1 -1
  144. package/src/hooks/IoT/__test__/useRemoteControl.test.js +7 -7
  145. package/src/hooks/IoT/useRemoteControl.js +0 -1
  146. package/src/iot/RemoteControl/__test__/Bluetooth.test.js +17 -17
  147. package/src/iot/RemoteControl/__test__/Internet.test.js +4 -4
  148. package/src/screens/AQIGuide/__test__/AQIGuide.test.js +3 -3
  149. package/src/screens/ActivityLog/__test__/FilterPopup.test.js +2 -2
  150. package/src/screens/ActivityLog/__test__/ItemLog.test.js +21 -21
  151. package/src/screens/ActivityLog/hooks/__test__/index.test.js +1 -1
  152. package/src/screens/AddCommon/SelectUnit.js +1 -1
  153. package/src/screens/AddCommon/__test__/SelectSubUnit.test.js +4 -4
  154. package/src/screens/AddCommon/__test__/SelectUnit.test.js +11 -6
  155. package/src/screens/AddLocationMaps/__test__/index.test.js +6 -6
  156. package/src/screens/AddNewAction/Device/__test__/index.test.js +3 -3
  157. package/src/screens/AddNewAction/SelectAction.js +6 -1
  158. package/src/screens/AddNewAction/__test__/SelectAction.test.js +128 -20
  159. package/src/screens/AddNewAction/__test__/SelectSensorDevices.test.js +10 -10
  160. package/src/screens/AddNewAction/__test__/SetupSensor.test.js +8 -8
  161. package/src/screens/AddNewAutoSmart/__test__/AddNewAutoSmart.test.js +2 -2
  162. package/src/screens/AddNewDevice/__test__/AddNewDevice.test.js +8 -8
  163. package/src/screens/AddNewDevice/__test__/ConnectingDevices.test.js +8 -8
  164. package/src/screens/AddNewGateway/ConnectingDevice.js +29 -7
  165. package/src/screens/AddNewGateway/ConnectingWifiGuide.js +2 -2
  166. package/src/screens/AddNewGateway/ConnectingZigbeeDevice.js +3 -2
  167. package/src/screens/AddNewGateway/PlugAndPlay/__test__/FirstWarning.test.js +5 -5
  168. package/src/screens/AddNewGateway/__test__/AddNewGateway.test.js +6 -6
  169. package/src/screens/AddNewGateway/__test__/ConnectingModbusDevice.test.js +1 -1
  170. package/src/screens/AddNewGateway/__test__/ConnectingWifiDevice.test.js +1 -1
  171. package/src/screens/AddNewGateway/__test__/ConnectingWifiGuide.test.js +9 -9
  172. package/src/screens/AddNewGateway/__test__/ConnectingZigbeeDevice.test.js +1 -1
  173. package/src/screens/AddNewGateway/__test__/RenameNewDevices.test.js +4 -4
  174. package/src/screens/AddNewGateway/__test__/ScanGatewayQR.test.js +4 -4
  175. package/src/screens/AddNewGateway/__test__/ScanModbusQR.test.js +4 -4
  176. package/src/screens/AddNewGateway/__test__/ScanWifiDeviceQR.test.js +4 -4
  177. package/src/screens/AddNewGateway/__test__/SelectDeviceSubUnit.test.js +2 -2
  178. package/src/screens/AddNewGateway/__test__/SelectDeviceType.test.js +6 -6
  179. package/src/screens/AddNewGateway/__test__/SelectDeviceUnit.test.js +1 -1
  180. package/src/screens/AddNewGateway/__test__/SelectModbusGateway.test.js +2 -2
  181. package/src/screens/AddNewGateway/__test__/SelectZigbeeGateway.test.js +2 -2
  182. package/src/screens/AddNewGateway/__test__/ShareWifiPassword.test.js +6 -6
  183. package/src/screens/AddNewOneTap/__test__/AddNewOneTap.test.js +4 -4
  184. package/src/screens/AllCamera/__test__/index.test.js +2 -2
  185. package/src/screens/Automate/__test__/Loading.test.js +2 -2
  186. package/src/screens/Automate/__test__/MultiUnits.test.js +10 -10
  187. package/src/screens/Automate/__test__/index.test.js +3 -3
  188. package/src/screens/ConfirmUnitDeletion/__test__/ConfirmUnitDeletion.test.js +2 -2
  189. package/src/screens/Device/EditDevice/__test__/EditDevice.test.js +4 -4
  190. package/src/screens/Device/__test__/DetailHistoryChart.test.js +2 -2
  191. package/src/screens/Device/__test__/detail.test.js +14 -14
  192. package/src/screens/Device/detail.js +10 -3
  193. package/src/screens/Device/utils/index.test.js +4 -4
  194. package/src/screens/Drawer/Drawer.test.js +1 -1
  195. package/src/screens/EditActionsList/__tests__/index.test.js +5 -5
  196. package/src/screens/EmergencyContacts/__test__/EmergencyContactAddNew.test.js +15 -15
  197. package/src/screens/EmergencyContacts/__test__/EmergencyContactList.test.js +19 -19
  198. package/src/screens/EmergencyContacts/__test__/EmergencyContactsSelectContacts.test.js +12 -12
  199. package/src/screens/EmergencySetting/__test__/DropDownItem.test.js +7 -7
  200. package/src/screens/EmergencySetting/__test__/index.test.js +3 -3
  201. package/src/screens/EnterPassword/__test__/EnterPassword.test.js +12 -12
  202. package/src/screens/Explore/__test__/Explore.test.js +3 -3
  203. package/src/screens/GuestInfo/__test__/index.test.js +3 -3
  204. package/src/screens/HanetCamera/__test__/CaptureFaceID.test.js +2 -2
  205. package/src/screens/HanetCamera/__test__/Detail.test.js +2 -2
  206. package/src/screens/HanetCamera/__test__/ManageAccess.test.js +5 -5
  207. package/src/screens/HanetCamera/__test__/MemberInfo.test.js +5 -5
  208. package/src/screens/HanetCamera/hooks/__test__/useHanetCheckinData.test.js +6 -6
  209. package/src/screens/HanetCamera/hooks/__test__/useHanetPlaceMembers.test.js +3 -3
  210. package/src/screens/ManageAccess/hooks/__test__/useManageAccess.test.js +11 -7
  211. package/src/screens/MoveToAnotherSubUnit/__test__/index.test.js +1 -1
  212. package/src/screens/Notification/__test__/Notification.test.js +5 -5
  213. package/src/screens/Notification/__test__/NotificationItem.test.js +41 -41
  214. package/src/screens/PlayBackCamera/__test__/Timer.test.js +3 -3
  215. package/src/screens/ScanChipQR/components/QRScan/__test__/QRScan.test.js +7 -7
  216. package/src/screens/ScriptDetail/__test__/index.test.js +31 -31
  217. package/src/screens/SetSchedule/__test__/SelectWeekday.test.js +1 -1
  218. package/src/screens/SetSchedule/__test__/index.test.js +4 -4
  219. package/src/screens/SharedUnit/__test__/ShareUnit.test.js +2 -2
  220. package/src/screens/SharedUnit/__test__/TabHeader.test.js +3 -3
  221. package/src/screens/Sharing/Components/__test__/DeviceItem.test.js +4 -4
  222. package/src/screens/Sharing/Components/__test__/ItemChangeRole.test.js +4 -4
  223. package/src/screens/Sharing/Components/__test__/TitleCheckBox.test.js +4 -4
  224. package/src/screens/Sharing/__test__/MemberList.test.js +1 -1
  225. package/src/screens/Sharing/__test__/MemberList2.test.js +1 -1
  226. package/src/screens/Sharing/__test__/SelectPermission.test.js +41 -41
  227. package/src/screens/Sharing/__test__/SelectUser.test.js +14 -14
  228. package/src/screens/SideMenuDetail/__test__/index.test.js +25 -4
  229. package/src/screens/SideMenuDetail/index.js +32 -19
  230. package/src/screens/SmartAccount/ListDevice/__test__/DeviceItem.test.js +3 -3
  231. package/src/screens/SmartAccount/ListDevice/__test__/ListDevice.test.js +13 -21
  232. package/src/screens/SmartAccount/ListDevice/index.js +1 -0
  233. package/src/screens/SmartAccount/SuccessfullyConnected/__test__/DeviceItem.test.js +6 -6
  234. package/src/screens/SmartAccount/SuccessfullyConnected/__test__/SuccessfullyConnected.test.js +6 -5
  235. package/src/screens/SmartAccount/SuccessfullyConnected/index.js +1 -0
  236. package/src/screens/SmartAccount/__test__/Connecting.test.js +4 -4
  237. package/src/screens/SmartAccount/__test__/SmartAccount.test.js +17 -17
  238. package/src/screens/SmartIr/__test__/ButtonsBottom.test.js +2 -2
  239. package/src/screens/SmartIr/__test__/GroupButtonByType.test.js +12 -12
  240. package/src/screens/SmartIr/__test__/SelectBrand.test.js +5 -5
  241. package/src/screens/SmartIr/__test__/SelectDeviceType.test.js +5 -5
  242. package/src/screens/SmartIr/__test__/SmartIr.test.js +5 -5
  243. package/src/screens/SubUnit/__test__/AddSubUnit.test.js +12 -12
  244. package/src/screens/SubUnit/__test__/Detail.test.js +6 -6
  245. package/src/screens/SubUnit/__test__/EditSubUnit.test.js +44 -44
  246. package/src/screens/SubUnit/__test__/ManageSubUnit.test.js +6 -6
  247. package/src/screens/SubUnit/hooks/__test__/useManageSubUnit.test.js +5 -5
  248. package/src/screens/SyncLGDevice/__test__/AddLGDevice.test.js +10 -10
  249. package/src/screens/TDSGuide/__test__/TDSGuide.test.js +3 -3
  250. package/src/screens/UVIndexGuide/__test__/UVIndexGuide.test.js +3 -3
  251. package/src/screens/Unit/ManageUnit.js +4 -45
  252. package/src/screens/Unit/ManageUnitStyles.js +5 -35
  253. package/src/screens/Unit/Station/__test__/index.test.js +1 -1
  254. package/src/screens/Unit/Summaries.js +11 -20
  255. package/src/screens/Unit/__test__/AddMenu.test.js +8 -8
  256. package/src/screens/Unit/__test__/CheckSendEmail.test.js +3 -3
  257. package/src/screens/Unit/__test__/ChooseLocation.test.js +2 -2
  258. package/src/screens/Unit/__test__/Detail.test.js +17 -17
  259. package/src/screens/Unit/__test__/ManageUnit.test.js +17 -17
  260. package/src/screens/Unit/__test__/MyAllUnit.test.js +5 -5
  261. package/src/screens/Unit/__test__/SelectAddToFavorites.test.js +4 -4
  262. package/src/screens/Unit/__test__/SelectAddress.test.js +10 -10
  263. package/src/screens/Unit/__test__/SmartAccount.test.js +4 -4
  264. package/src/screens/Unit/__test__/SmartAccountItem.test.js +1 -1
  265. package/src/screens/Unit/__test__/Summaries.test.js +2 -2
  266. package/src/screens/Unit/components/ButtonWrapper/index.js +60 -0
  267. package/src/screens/Unit/components/ButtonWrapper/styles.js +37 -0
  268. package/src/screens/Unit/components/MyAllUnit/__test__/Header.test.js +19 -19
  269. package/src/screens/Unit/components/MyAllUnit/__test__/MyAllUnit.test.js +3 -3
  270. package/src/screens/Unit/components/MyAllUnit/__test__/index.test.js +4 -4
  271. package/src/screens/Unit/components/__test__/Header.test.js +12 -12
  272. package/src/screens/Unit/components/__test__/MyUnitDevice.test.js +2 -2
  273. package/src/screens/Unit/components/__test__/SharedUnit.test.js +6 -6
  274. package/src/screens/UnitSummary/__test__/index.test.js +24 -24
  275. package/src/screens/UnitSummary/components/3PPowerConsumption/__test__/3PPowerConsumption.test.js +3 -3
  276. package/src/screens/UnitSummary/components/PowerConsumption/__test__/ItemPower.test.js +3 -3
  277. package/src/screens/UnitSummary/components/PowerConsumption/__test__/PowerConsumption.test.js +5 -5
  278. package/src/screens/UnitSummary/components/RunningDevices/__test__/index.test.js +3 -3
  279. package/src/screens/UnitSummary/components/Temperature/__test__/ChartAverage.test.js +3 -3
  280. package/src/screens/UnitSummary/components/Temperature/__test__/ItemAverage.test.js +3 -3
  281. package/src/screens/UnitSummary/components/UvIndex/__test__/index.test.js +18 -18
  282. package/src/screens/UnitSummary/components/WaterQuality/__test__/index.test.js +12 -12
  283. package/src/screens/UnitSummary/components/__test__/TotalPowerBox.test.js +2 -2
  284. package/src/screens/UnitSummary/components/__test__/TotalPowerConsumption.test.js +2 -2
  285. package/src/screens/UnitSummary/components/__test__/UnitSummary.test.js +8 -8
  286. package/src/screens/UnitSummary/components/__test__/index.test.js +5 -5
  287. package/src/screens/WaterQualityGuide/__test__/index.test.js +12 -12
  288. package/src/utils/Apis/axios.js +22 -0
  289. package/src/utils/Converter/__test__/array.test.js +1 -1
  290. package/src/utils/Converter/__test__/url.test.js +1 -1
  291. package/src/utils/Functions/__test__/Search.test.js +1 -1
  292. package/src/utils/Functions/__test__/ShortEmail.test.js +1 -1
  293. package/src/utils/I18n/translations/en.json +3 -1
  294. package/src/utils/I18n/translations/vi.json +3 -1
  295. package/src/utils/__test__/InitData.test.js +2 -2
  296. package/src/utils/__test__/Utils.test.js +2 -2
  297. package/src/commons/UnitSummary/ConfigHistoryChart.js +0 -105
  298. package/src/screens/AddNewDevice/hooks/ConnectDevices.js +0 -67
  299. package/src/screens/AddNewDevice/hooks/useStateAlertRename.js +0 -32
  300. package/src/screens/UnitSummary/components/PowerConsumeHistoryChart/__test__/index.test.js +0 -63
  301. package/src/screens/UnitSummary/components/PowerConsumeHistoryChart/index.js +0 -53
@@ -24,36 +24,36 @@ describe('Test HeaderCustom', () => {
24
24
  showPopoverWithRef: mockShowPopoverWithRef,
25
25
  };
26
26
 
27
- it('Test not render right', () => {
28
- act(() => {
29
- tree = create(wrapComponent(defaultProps));
27
+ it('Test not render right', async () => {
28
+ await act(async () => {
29
+ tree = await create(wrapComponent(defaultProps));
30
30
  });
31
31
  const instance = tree.root;
32
32
  const TouchableOpacityElement = instance.findAllByType(TouchableOpacity);
33
33
  expect(TouchableOpacityElement).toHaveLength(1);
34
34
  });
35
35
 
36
- it('Test render right', () => {
36
+ it('Test render right', async () => {
37
37
  defaultProps = { ...defaultProps, isShowRight: true };
38
- act(() => {
39
- tree = create(wrapComponent(defaultProps));
38
+ await act(async () => {
39
+ tree = await create(wrapComponent(defaultProps));
40
40
  });
41
41
  const instance = tree.root;
42
42
  const TouchableOpacityElement = instance.findAllByType(TouchableOpacity);
43
43
  expect(TouchableOpacityElement).toHaveLength(3);
44
- act(() => {
44
+ await act(async () => {
45
45
  TouchableOpacityElement[1].props.onPress();
46
46
  });
47
47
  expect(mockOnRefresh).toBeCalled();
48
- act(() => {
48
+ await act(async () => {
49
49
  TouchableOpacityElement[2].props.onPress();
50
50
  });
51
51
  expect(mockShowPopoverWithRef).toBeCalled();
52
52
  });
53
53
 
54
- it('Test render without props', () => {
55
- act(() => {
56
- tree = create(wrapComponent(defaultProps));
54
+ it('Test render without props', async () => {
55
+ await act(async () => {
56
+ tree = await create(wrapComponent(defaultProps));
57
57
  });
58
58
  const instance = tree.root;
59
59
  const TouchableOpacityElement = instance.findAllByType(TouchableOpacity);
@@ -7,8 +7,8 @@ import AddMemberIcon from '../../../../assets/images/Popover/Dashboard/AddMember
7
7
  describe('Test ImageButton component', () => {
8
8
  let tree;
9
9
  const mockFunc = jest.fn();
10
- test('create ImageButton', () => {
11
- act(() => {
10
+ it('create ImageButton', async () => {
11
+ await act(async () => {
12
12
  tree = renderer.create(
13
13
  <ImageButton
14
14
  onPress={mockFunc}
@@ -27,9 +27,9 @@ describe('Test ImagePicker', () => {
27
27
  beforeEach(() => {
28
28
  Platform = require('react-native').Platform;
29
29
  });
30
- test('create ImagePicker', () => {
30
+ it('create ImagePicker', async () => {
31
31
  Platform.OS = 'android';
32
- act(() => {
32
+ await act(async () => {
33
33
  tree = renderer.create(wrapComponent());
34
34
  });
35
35
  const instance = tree.root;
@@ -37,7 +37,7 @@ describe('Test ImagePicker', () => {
37
37
  expect(textInputs.length).toBe(1);
38
38
  });
39
39
 
40
- test('create ImagePicker optionsCapture', () => {
40
+ it('create ImagePicker optionsCapture', async () => {
41
41
  Platform.OS = 'android';
42
42
  const options = {
43
43
  mediaType: 'photo',
@@ -45,17 +45,17 @@ describe('Test ImagePicker', () => {
45
45
  compressImageMaxHeight: 720,
46
46
  compressImageQuality: 0.8,
47
47
  };
48
- act(() => {
48
+ await act(async () => {
49
49
  tree = renderer.create(wrapComponent(options));
50
50
  });
51
51
  const instance = tree.root;
52
52
  const textInputs = instance.findAllByType(ButtonPopup);
53
53
  expect(textInputs.length).toBe(1);
54
- act(() => {
54
+ await act(async () => {
55
55
  textInputs[0].props.onPressMain();
56
56
  });
57
57
  });
58
- test('create ImagePicker onChooseFile', () => {
58
+ it('create ImagePicker onChooseFile', async () => {
59
59
  Platform.OS = 'android';
60
60
  const options = {
61
61
  mediaType: 'photo',
@@ -63,13 +63,13 @@ describe('Test ImagePicker', () => {
63
63
  compressImageMaxHeight: 720,
64
64
  compressImageQuality: 0.8,
65
65
  };
66
- act(() => {
66
+ await act(async () => {
67
67
  tree = renderer.create(wrapComponent(options));
68
68
  });
69
69
  const instance = tree.root;
70
70
  const textInputs = instance.findAllByType(ButtonPopup);
71
71
  expect(textInputs.length).toBe(1);
72
- act(() => {
72
+ await act(async () => {
73
73
  textInputs[0].props.onPressSecondary();
74
74
  });
75
75
  });
@@ -20,7 +20,7 @@ const wrapComponent = () => (
20
20
  describe('Test MediaPlayerDetail', () => {
21
21
  let wrapper;
22
22
 
23
- test('MediaPlayerDetail render when onTap setPause', async () => {
23
+ it('MediaPlayerDetail render when onTap setPause', async () => {
24
24
  await act(async () => {
25
25
  wrapper = await create(wrapComponent());
26
26
  });
@@ -31,8 +31,8 @@ describe('Test MediaPlayerFull', () => {
31
31
  useState.mockImplementationOnce((init) => [false, mockSetState]);
32
32
  useState.mockImplementationOnce((init) => [false, mockSetState]);
33
33
  useState.mockImplementationOnce((init) => [init, mockSetState]);
34
- await act(() => {
35
- tree = create(
34
+ await act(async () => {
35
+ tree = await create(
36
36
  wrapComponent({
37
37
  isShowFullScreenIcon: true,
38
38
  thumbnail: { uri: 'test' },
@@ -42,11 +42,11 @@ describe('Test MediaPlayerFull', () => {
42
42
  const instance = tree.root;
43
43
  const TouchableOpacities = instance.findAllByType(TouchableOpacity);
44
44
  expect(TouchableOpacities).toHaveLength(3);
45
- act(() => {
45
+ await act(async () => {
46
46
  TouchableOpacities[0].props.onPress();
47
47
  });
48
48
  expect(mockSetState).toBeCalledWith(false);
49
- act(() => {
49
+ await act(async () => {
50
50
  TouchableOpacities[1].props.onPress();
51
51
  TouchableOpacities[2].props.onPress();
52
52
  });
@@ -57,8 +57,8 @@ describe('Test MediaPlayerFull', () => {
57
57
  useState.mockImplementationOnce((init) => [true, mockSetState]);
58
58
  useState.mockImplementationOnce((init) => [true, mockSetState]);
59
59
  useState.mockImplementationOnce((init) => [init, mockSetState]);
60
- await act(() => {
61
- tree = create(
60
+ await act(async () => {
61
+ tree = await create(
62
62
  wrapComponent({
63
63
  isShowFullScreenIcon: true,
64
64
  cameraName: 'test',
@@ -70,11 +70,11 @@ describe('Test MediaPlayerFull', () => {
70
70
  const instance = tree.root;
71
71
  const TouchableOpacities = instance.findAllByType(TouchableOpacity);
72
72
  expect(TouchableOpacities).toHaveLength(3);
73
- act(() => {
73
+ await act(async () => {
74
74
  TouchableOpacities[0].props.onPress();
75
75
  });
76
76
  expect(mockSetState).toBeCalledWith(false);
77
- act(() => {
77
+ await act(async () => {
78
78
  TouchableOpacities[1].props.onPress();
79
79
  TouchableOpacities[2].props.onPress();
80
80
  });
@@ -16,14 +16,14 @@ describe('Test MenuActionAddNew', () => {
16
16
  const dataActions = [item(1), item(2)];
17
17
  let wrapper;
18
18
 
19
- test('onItemClick MenuActionAddNew', () => {
19
+ it('onItemClick MenuActionAddNew', async () => {
20
20
  const mockFunc = jest.fn();
21
- act(() => {
21
+ await act(async () => {
22
22
  wrapper = create(wrapComponent(dataActions));
23
23
  });
24
24
  const instance = wrapper.root;
25
25
  const imageButtons = instance.findAllByType(ImageButton);
26
- act(() => {
26
+ await act(async () => {
27
27
  imageButtons[0].props.onPress();
28
28
  });
29
29
  expect(imageButtons.length).toEqual(2);
@@ -9,11 +9,11 @@ describe('Test MenuActionList', () => {
9
9
  const listItem = [item(1)];
10
10
  let wrapper;
11
11
 
12
- test('onItemClick MenuActionList', () => {
12
+ it('onItemClick MenuActionList', async () => {
13
13
  const mockOnItemClick = jest.fn();
14
14
  const mockHideModal = jest.fn();
15
15
 
16
- act(() => {
16
+ await act(async () => {
17
17
  wrapper = create(
18
18
  <MenuActionList
19
19
  title="Title"
@@ -26,7 +26,7 @@ describe('Test MenuActionList', () => {
26
26
  const instance = wrapper.root;
27
27
  const button = instance.findByType(TouchableOpacity);
28
28
 
29
- act(() => {
29
+ await act(async () => {
30
30
  button.props.onPress();
31
31
  });
32
32
 
@@ -6,7 +6,7 @@ import MenuActionMore from '..';
6
6
  describe('Test MenuActionMore', () => {
7
7
  let wrapper;
8
8
  const mockFunc = jest.fn();
9
- test('render MenuActionMore', async () => {
9
+ it('render MenuActionMore', async () => {
10
10
  let listMenuItem = [{ text: 'text' }];
11
11
  await act(async () => {
12
12
  wrapper = await renderer.create(
@@ -22,7 +22,7 @@ describe('Test MenuActionMore', () => {
22
22
  const instance = wrapper.root;
23
23
  const buttons = instance.findAllByType(TouchableOpacity);
24
24
  expect(buttons.length).toEqual(1);
25
- act(() => {
25
+ await act(async () => {
26
26
  buttons[0].props.onPress();
27
27
  });
28
28
  expect(mockFunc).toHaveBeenCalled();
@@ -20,8 +20,8 @@ describe('Test ModalBottom', () => {
20
20
  });
21
21
 
22
22
  it('Test render with isVisible', async () => {
23
- await act(() => {
24
- tree = create(wrapComponent(true));
23
+ await act(async () => {
24
+ tree = await create(wrapComponent(true));
25
25
  });
26
26
  const instance = tree.root;
27
27
  const Views = instance.findAllByType(View);
@@ -29,8 +29,8 @@ describe('Test ModalBottom', () => {
29
29
  });
30
30
 
31
31
  it('Test render without isVisible', async () => {
32
- await act(() => {
33
- tree = create(wrapComponent());
32
+ await act(async () => {
33
+ tree = await create(wrapComponent());
34
34
  });
35
35
  const instance = tree.root;
36
36
  const Views = instance.findAllByType(View);
@@ -8,16 +8,23 @@ import { Colors } from '../../configs';
8
8
  import SelectActionCard from '../SelectActionCard';
9
9
  import Text from '../Text';
10
10
  import { useConfigGlobalState } from '../../iot/states';
11
- import { AccessibilityLabel } from '../../configs/Constants';
11
+ import { AccessibilityLabel, DEVICE_TYPE } from '../../configs/Constants';
12
12
  import { ModalCustom } from '../Modal';
13
13
 
14
- const NumberUpDownActionTemplate = memo(({ data, onSelectAction }) => {
14
+ const NumberUpDownActionTemplate = ({ device, data = {}, onSelectAction }) => {
15
15
  const t = useTranslations();
16
16
  const [visible, setVisible] = useState(false);
17
17
  const onClose = () => setVisible(false);
18
18
  const onPress = () => setVisible(true);
19
19
  const { configuration, template, title } = data;
20
- const { config, text_format, min_value, max_value, action } = configuration;
20
+ const {
21
+ config,
22
+ text_format,
23
+ min_value,
24
+ max_value,
25
+ action,
26
+ allow_config_store_value,
27
+ } = configuration || {};
21
28
  const [configValues] = useConfigGlobalState('configValues');
22
29
  const [value, setValue] = useState();
23
30
  const [actionName, setActionName] = useState(null);
@@ -49,21 +56,40 @@ const NumberUpDownActionTemplate = memo(({ data, onSelectAction }) => {
49
56
  }, [value, max_value]);
50
57
 
51
58
  const onPressDone = useCallback(() => {
59
+ let data = String(value);
60
+ if (device?.device_type !== DEVICE_TYPE.GOOGLE_HOME) {
61
+ data = { temperature: value };
62
+ if (allow_config_store_value && config) {
63
+ data.config_id = config;
64
+ data.config_value = value;
65
+ }
66
+ } else if (device?.device_type === DEVICE_TYPE.LG_THINQ) {
67
+ data = {
68
+ temperature: {
69
+ targetTemperature: value,
70
+ unit: 'C',
71
+ locationName: 'FREEZER',
72
+ },
73
+ };
74
+ }
52
75
  setActionName(text_format.replace('{number}', value));
53
76
  onSelectAction &&
54
77
  onSelectAction({
55
78
  action,
56
- data: {
57
- temperature: {
58
- targetTemperature: value,
59
- unit: 'C',
60
- locationName: 'FREEZER',
61
- },
62
- },
79
+ data: data,
63
80
  template,
64
81
  });
65
82
  onClose();
66
- }, [text_format, value, action, template, onSelectAction]);
83
+ }, [
84
+ device?.device_type,
85
+ text_format,
86
+ value,
87
+ onSelectAction,
88
+ action,
89
+ template,
90
+ allow_config_store_value,
91
+ config,
92
+ ]);
67
93
 
68
94
  return (
69
95
  <>
@@ -141,6 +167,6 @@ const NumberUpDownActionTemplate = memo(({ data, onSelectAction }) => {
141
167
  </ModalCustom>
142
168
  </>
143
169
  );
144
- });
170
+ };
145
171
 
146
- export default NumberUpDownActionTemplate;
172
+ export default memo(NumberUpDownActionTemplate);
@@ -8,9 +8,9 @@ import styles from './OptionsDropdownActionTemplateStyles';
8
8
  import { Colors } from '../../configs';
9
9
  import SelectActionCard from '../SelectActionCard';
10
10
  import Text from '../Text';
11
- import { AccessibilityLabel } from '../../configs/Constants';
11
+ import { AccessibilityLabel, DEVICE_TYPE } from '../../configs/Constants';
12
12
 
13
- const OptionsDropdownActionTemplate = memo(({ data, onSelectAction }) => {
13
+ const OptionsDropdownActionTemplate = ({ device, data, onSelectAction }) => {
14
14
  const t = useTranslations();
15
15
  const [visible, setVisible] = useState(false);
16
16
  const [actionName, setActionName] = useState(null);
@@ -18,29 +18,49 @@ const OptionsDropdownActionTemplate = memo(({ data, onSelectAction }) => {
18
18
  const onClose = () => setVisible(false);
19
19
  const onPress = () => setVisible(true);
20
20
  const { title, configuration, template } = data;
21
- const { options, action } = configuration;
21
+ const { options, action, config, allow_config_store_value } = configuration;
22
22
 
23
23
  const handleOnPressItem = useCallback(
24
- (item, index) => {
24
+ (index) => {
25
25
  setActiveAction(index);
26
26
  },
27
27
  [setActiveAction]
28
28
  );
29
29
 
30
30
  const onPressDone = useCallback(() => {
31
+ const { value_text, value_int } = options[activeAction];
32
+ let data = { level: value_text, key_code: value_int };
33
+ if (allow_config_store_value && config) {
34
+ data.config_id = config;
35
+ data.config_value = value_int;
36
+ } else if (device?.device_type === DEVICE_TYPE.LG_THINQ) {
37
+ data = {
38
+ airFlow: {
39
+ windStrength: value_text,
40
+ },
41
+ };
42
+ } else if (device?.device_type === DEVICE_TYPE.GOOGLE_HOME) {
43
+ data = value_text;
44
+ }
45
+
31
46
  onSelectAction &&
32
47
  onSelectAction({
33
48
  action,
34
- data: {
35
- airFlow: {
36
- windStrength: options[activeAction]?.value_text,
37
- },
38
- },
49
+ data: data,
39
50
  template,
40
51
  });
41
52
  setActionName(options[activeAction]?.text);
42
53
  setVisible(false);
43
- }, [onSelectAction, setVisible, activeAction, action, template, options]);
54
+ }, [
55
+ options,
56
+ activeAction,
57
+ allow_config_store_value,
58
+ config,
59
+ device?.device_type,
60
+ onSelectAction,
61
+ action,
62
+ template,
63
+ ]);
44
64
 
45
65
  return (
46
66
  <View>
@@ -65,7 +85,7 @@ const OptionsDropdownActionTemplate = memo(({ data, onSelectAction }) => {
65
85
  <View style={styles.lineBottom} key={index}>
66
86
  <TouchableOpacity
67
87
  style={styles.flexRow}
68
- onPress={() => handleOnPressItem(item, index)}
88
+ onPress={() => handleOnPressItem(index)}
69
89
  accessibilityLabel={
70
90
  AccessibilityLabel.OPTIONS_DROPDOWN_ACTION_CHOOSING_ITEM
71
91
  }
@@ -112,6 +132,5 @@ const OptionsDropdownActionTemplate = memo(({ data, onSelectAction }) => {
112
132
  </Modal>
113
133
  </View>
114
134
  );
115
- });
116
-
117
- export default OptionsDropdownActionTemplate;
135
+ };
136
+ export default memo(OptionsDropdownActionTemplate);
@@ -8,7 +8,7 @@ import { AccessibilityLabel } from '../../configs/Constants';
8
8
  import { useTranslations } from '../../hooks/Common/useTranslations';
9
9
  import { ModalCustom } from '../Modal';
10
10
 
11
- const StatesGridActionTemplate = memo(({ data, onSelectAction }) => {
11
+ const StatesGridActionTemplate = ({ device, data, onSelectAction }) => {
12
12
  const t = useTranslations();
13
13
  const [visible, setVisible] = useState(false);
14
14
  const [actionName, setActionName] = useState(null);
@@ -19,11 +19,16 @@ const StatesGridActionTemplate = memo(({ data, onSelectAction }) => {
19
19
 
20
20
  const hanleSelectAction = useCallback(
21
21
  (item) => {
22
+ let data = null;
23
+ const { allow_config_store_value, config, is_on_value } = item;
24
+ if (allow_config_store_value && config) {
25
+ data = { config_id: config, config_value: is_on_value };
26
+ }
22
27
  setActionName(item.text);
23
28
  onSelectAction &&
24
29
  onSelectAction({
25
30
  action: item.action,
26
- data: null,
31
+ data: data,
27
32
  template,
28
33
  });
29
34
  setVisible(false);
@@ -64,6 +69,6 @@ const StatesGridActionTemplate = memo(({ data, onSelectAction }) => {
64
69
  </ModalCustom>
65
70
  </View>
66
71
  );
67
- });
72
+ };
68
73
 
69
- export default StatesGridActionTemplate;
74
+ export default memo(StatesGridActionTemplate);
@@ -40,9 +40,9 @@ describe('Test NumberUpDownActionTemplate', () => {
40
40
  text_format: '{number} *C',
41
41
  },
42
42
  };
43
- test('Test onPressDown', () => {
44
- act(() => {
45
- tree = create(wrapComponent(data));
43
+ it('Test onPressDown', async () => {
44
+ await act(async () => {
45
+ tree = await create(wrapComponent(data));
46
46
  });
47
47
  const instance = tree.root;
48
48
  const touchableOpacity = instance.find(
@@ -56,15 +56,15 @@ describe('Test NumberUpDownActionTemplate', () => {
56
56
  item.props.accessibilityLabel ===
57
57
  AccessibilityLabel.NUMBER_UP_DOWN_ACTION_TEXT && item.type === Text
58
58
  );
59
- act(() => {
59
+ await act(async () => {
60
60
  touchableOpacity.props.onPress();
61
61
  });
62
62
  expect(textElement.props.children).toEqual('27 *C');
63
63
  });
64
64
 
65
- test('Test onPressUp', () => {
66
- act(() => {
67
- tree = create(wrapComponent(data));
65
+ it('Test onPressUp', async () => {
66
+ await act(async () => {
67
+ tree = await create(wrapComponent(data));
68
68
  });
69
69
  const instance = tree.root;
70
70
  const touchableOpacity = instance.find(
@@ -78,15 +78,15 @@ describe('Test NumberUpDownActionTemplate', () => {
78
78
  item.props.accessibilityLabel ===
79
79
  AccessibilityLabel.NUMBER_UP_DOWN_ACTION_TEXT && item.type === Text
80
80
  );
81
- act(() => {
81
+ await act(async () => {
82
82
  touchableOpacity.props.onPress();
83
83
  });
84
84
  expect(textElement.props.children).toEqual('29 *C');
85
85
  });
86
86
 
87
- test('Test onPressDone', () => {
88
- act(() => {
89
- tree = create(wrapComponent(data));
87
+ it('Test onPressDone', async () => {
88
+ await act(async () => {
89
+ tree = await create(wrapComponent(data));
90
90
  });
91
91
  const instance = tree.root;
92
92
  const touchableOpacity = instance.find(
@@ -95,9 +95,22 @@ describe('Test NumberUpDownActionTemplate', () => {
95
95
  AccessibilityLabel.NUMBER_UP_DOWN_ACTION_DONE &&
96
96
  item.type === TouchableOpacity
97
97
  );
98
- act(() => {
98
+ await act(async () => {
99
99
  touchableOpacity.props.onPress();
100
100
  });
101
101
  expect(mockOnSelectAction).toHaveBeenCalled();
102
102
  });
103
+ it('Test config null show valueDefault', async () => {
104
+ data.configuration.config = null;
105
+ await act(async () => {
106
+ tree = await create(wrapComponent(data));
107
+ });
108
+ const instance = tree.root;
109
+ const textElement = instance.find(
110
+ (item) =>
111
+ item.props.accessibilityLabel ===
112
+ AccessibilityLabel.NUMBER_UP_DOWN_ACTION_TEXT && item.type === Text
113
+ );
114
+ expect(textElement.props.children).toEqual('28 *C');
115
+ });
103
116
  });
@@ -75,9 +75,9 @@ describe('Test OptionsDropdownActionTemplate', () => {
75
75
  icon_kit: 43,
76
76
  },
77
77
  };
78
- test('Test render OptionsDropdownActionTemplate', () => {
79
- act(() => {
80
- tree = create(wrapComponent(data));
78
+ it('Test render OptionsDropdownActionTemplate', async () => {
79
+ await act(async () => {
80
+ tree = await create(wrapComponent(data));
81
81
  });
82
82
  const instance = tree.root;
83
83
  const touchOpacity = instance.findAll(
@@ -89,9 +89,9 @@ describe('Test OptionsDropdownActionTemplate', () => {
89
89
  expect(touchOpacity).toHaveLength(7);
90
90
  });
91
91
 
92
- test('Test handleOnPressItem', () => {
93
- act(() => {
94
- tree = create(wrapComponent(data));
92
+ it('Test handleOnPressItem', async () => {
93
+ await act(async () => {
94
+ tree = await create(wrapComponent(data));
95
95
  });
96
96
  const instance = tree.root;
97
97
  const touchOpacity = instance.findAll(
@@ -102,15 +102,15 @@ describe('Test OptionsDropdownActionTemplate', () => {
102
102
  );
103
103
  const radioCircle = instance.findAllByType(RadioCircle);
104
104
 
105
- act(() => {
105
+ await act(async () => {
106
106
  touchOpacity[0].props.onPress(data.configuration.options[0], 0);
107
107
  });
108
108
  expect(radioCircle[0].props.active).toEqual(true);
109
109
  });
110
110
 
111
- test('Test onPressDone', () => {
112
- act(() => {
113
- tree = create(wrapComponent(data));
111
+ it.only('Test onPressDone', async () => {
112
+ await act(async () => {
113
+ tree = await create(wrapComponent(data));
114
114
  });
115
115
  const instance = tree.root;
116
116
  const selectOptions = instance.findAll(
@@ -126,9 +126,9 @@ describe('Test OptionsDropdownActionTemplate', () => {
126
126
  item.type === TouchableOpacity
127
127
  );
128
128
 
129
- act(() => {
130
- selectOptions[0].props.onPress(data.configuration.options[0], 0);
131
- touchOpacity.props.onPress();
129
+ await act(async () => {
130
+ await selectOptions[0].props.onPress(0);
131
+ await touchOpacity.props.onPress();
132
132
  });
133
133
  expect(mockOnSelectAction).toHaveBeenCalled();
134
134
  });
@@ -64,9 +64,9 @@ describe('Test StatesGridActionTempalte', () => {
64
64
  ],
65
65
  },
66
66
  };
67
- test('Test render StatesGridActionTempalte', () => {
68
- act(() => {
69
- tree = create(wrapComponent(data));
67
+ it('Test render StatesGridActionTempalte', async () => {
68
+ await act(async () => {
69
+ tree = await create(wrapComponent(data));
70
70
  });
71
71
  const instance = tree.root;
72
72
  const touchOpacity = instance.findAll(
@@ -78,9 +78,9 @@ describe('Test StatesGridActionTempalte', () => {
78
78
  expect(touchOpacity).toHaveLength(4);
79
79
  });
80
80
 
81
- test('Test onPress hanleSelectAction', () => {
82
- act(() => {
83
- tree = create(wrapComponent(data));
81
+ it('Test onPress hanleSelectAction', async () => {
82
+ await act(async () => {
83
+ tree = await create(wrapComponent(data));
84
84
  });
85
85
  const instance = tree.root;
86
86
  const touchOpacity = instance.findAll(
@@ -91,7 +91,7 @@ describe('Test StatesGridActionTempalte', () => {
91
91
  );
92
92
  expect(touchOpacity).toHaveLength(4);
93
93
 
94
- act(() => {
94
+ await act(async () => {
95
95
  touchOpacity[0].props.onPress(data.configuration.options[0]);
96
96
  });
97
97
  expect(mockOnSelectAction).toHaveBeenCalled();
@@ -35,9 +35,11 @@ describe('Test PreventAccess.test', () => {
35
35
  let visible;
36
36
  let hidePreventAccess = () => {};
37
37
 
38
- test('onItemClick MenuActionList', () => {
39
- act(() => {
40
- tree = create(wrapComponent(headerBodyText, visible, hidePreventAccess));
38
+ it('onItemClick MenuActionList', async () => {
39
+ await act(async () => {
40
+ tree = await create(
41
+ wrapComponent(headerBodyText, visible, hidePreventAccess)
42
+ );
41
43
  });
42
44
  const instance = tree.root;
43
45
  const text = instance.findAllByType(Text);
@@ -50,11 +52,11 @@ describe('Test PreventAccess.test', () => {
50
52
  (el) =>
51
53
  el.props.accessibilityLabel === AccessibilityLabel.TEXT_PREVENT_ACCESS
52
54
  );
53
- act(() => {
55
+ await act(async () => {
54
56
  button1.props.onBackButtonPress();
55
57
  });
56
58
 
57
- act(() => {
59
+ await act(async () => {
58
60
  button2.props.onPress();
59
61
  });
60
62
  expect(button1).toBeDefined();