@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
@@ -14,7 +14,7 @@ const wrapComponent = (actionGroup, doAction) => (
14
14
 
15
15
  describe('Test SmartTiviActionTemplate', () => {
16
16
  let wrapper;
17
- test('render SmartTiviActionTemplate', async () => {
17
+ it('render SmartTiviActionTemplate', async () => {
18
18
  await act(async () => {
19
19
  wrapper = await create(wrapComponent());
20
20
  });
@@ -22,7 +22,7 @@ describe('Test SmartTiviActionTemplate', () => {
22
22
  const touchableOpacity = instance.findAllByType(ScrollView);
23
23
  expect(touchableOpacity).toHaveLength(1);
24
24
  });
25
- test('render CircleButton small OnOff and exit', async () => {
25
+ it('render CircleButton small OnOff and exit', async () => {
26
26
  await act(async () => {
27
27
  wrapper = await create(wrapComponent());
28
28
  });
@@ -33,7 +33,7 @@ describe('Test SmartTiviActionTemplate', () => {
33
33
  AccessibilityLabel.SMART_TIVI_TEMPLATE.ONOFF_BUTTON
34
34
  );
35
35
  expect(circleButtonOnOff).toBeDefined();
36
- await act(() => {
36
+ await act(async () => {
37
37
  circleButtonOnOff.props.onPress();
38
38
  });
39
39
 
@@ -45,11 +45,11 @@ describe('Test SmartTiviActionTemplate', () => {
45
45
  expect(circleButtonExit).toBeDefined();
46
46
  // expect(circleButton).toHaveLength(2);
47
47
 
48
- await act(() => {
48
+ await act(async () => {
49
49
  circleButtonExit.props.onPress();
50
50
  });
51
51
  });
52
- test('render RectangleButton column Volume and CH', async () => {
52
+ it('render RectangleButton column Volume and CH', async () => {
53
53
  await act(async () => {
54
54
  wrapper = await create(wrapComponent());
55
55
  });
@@ -60,10 +60,10 @@ describe('Test SmartTiviActionTemplate', () => {
60
60
  AccessibilityLabel.SMART_TIVI_TEMPLATE.VOLUME_BUTTON
61
61
  );
62
62
  expect(RectangleButtonVolume).toBeDefined();
63
- await act(() => {
63
+ await act(async () => {
64
64
  RectangleButtonVolume.props.onPressUp();
65
65
  });
66
- await act(() => {
66
+ await act(async () => {
67
67
  RectangleButtonVolume.props.onPressDown();
68
68
  });
69
69
  const RectangleButtonCH = instance.find(
@@ -72,14 +72,14 @@ describe('Test SmartTiviActionTemplate', () => {
72
72
  AccessibilityLabel.SMART_TIVI_TEMPLATE.CH_BUTTON
73
73
  );
74
74
  expect(RectangleButtonCH).toBeDefined();
75
- await act(() => {
75
+ await act(async () => {
76
76
  RectangleButtonCH.props.onPressUp();
77
77
  });
78
- await act(() => {
78
+ await act(async () => {
79
79
  RectangleButtonCH.props.onPressDown();
80
80
  });
81
81
  });
82
- test('render CircleButton big button', async () => {
82
+ it('render CircleButton big button', async () => {
83
83
  await act(async () => {
84
84
  wrapper = await create(wrapComponent());
85
85
  });
@@ -90,23 +90,23 @@ describe('Test SmartTiviActionTemplate', () => {
90
90
  AccessibilityLabel.SMART_TIVI_TEMPLATE.BIG_BUTTON
91
91
  );
92
92
  expect(CircleButtonBig).toBeDefined();
93
- await act(() => {
93
+ await act(async () => {
94
94
  CircleButtonBig.props.onPressUp();
95
95
  });
96
- await act(() => {
96
+ await act(async () => {
97
97
  CircleButtonBig.props.onPressDown();
98
98
  });
99
- await act(() => {
99
+ await act(async () => {
100
100
  CircleButtonBig.props.onPressLeft();
101
101
  });
102
- await act(() => {
102
+ await act(async () => {
103
103
  CircleButtonBig.props.onPressRight();
104
104
  });
105
- await act(() => {
105
+ await act(async () => {
106
106
  CircleButtonBig.props.onPressOk();
107
107
  });
108
108
  });
109
- test('render ControlPlay button', async () => {
109
+ it('render ControlPlay button', async () => {
110
110
  await act(async () => {
111
111
  wrapper = await create(wrapComponent());
112
112
  });
@@ -117,17 +117,17 @@ describe('Test SmartTiviActionTemplate', () => {
117
117
  AccessibilityLabel.SMART_TIVI_TEMPLATE.CONTROL_BUTTON
118
118
  );
119
119
  expect(ControlPlay).toBeDefined();
120
- await act(() => {
120
+ await act(async () => {
121
121
  ControlPlay.props.onPressPrev();
122
122
  });
123
- await act(() => {
123
+ await act(async () => {
124
124
  ControlPlay.props.onPressStop();
125
125
  });
126
- await act(() => {
126
+ await act(async () => {
127
127
  ControlPlay.props.onPressNext();
128
128
  });
129
129
  });
130
- test('render controlHome button', async () => {
130
+ it('render controlHome button', async () => {
131
131
  await act(async () => {
132
132
  wrapper = await create(wrapComponent());
133
133
  });
@@ -138,11 +138,11 @@ describe('Test SmartTiviActionTemplate', () => {
138
138
  AccessibilityLabel.SMART_TIVI_TEMPLATE.HOME_BUTTON
139
139
  );
140
140
  expect(controlHome).toBeDefined();
141
- await act(() => {
141
+ await act(async () => {
142
142
  controlHome.props.onPress();
143
143
  });
144
144
  });
145
- test('render controlBack button', async () => {
145
+ it('render controlBack button', async () => {
146
146
  await act(async () => {
147
147
  wrapper = await create(wrapComponent());
148
148
  });
@@ -153,7 +153,7 @@ describe('Test SmartTiviActionTemplate', () => {
153
153
  AccessibilityLabel.SMART_TIVI_TEMPLATE.BACK_BUTTON
154
154
  );
155
155
  expect(controlBack).toBeDefined();
156
- await act(() => {
156
+ await act(async () => {
157
157
  controlBack.props.onPress();
158
158
  });
159
159
  });
@@ -41,11 +41,9 @@ const GridItem = ({ item, index, length, doAction, sensor, title }) => {
41
41
  const checkIcon = /\d/.test(icon); // to do check icon svg and icon antDesign
42
42
  const doActionAndWatchConfig = useCallback(
43
43
  (actionData) => {
44
- let data = {};
44
+ let data = null;
45
45
  if (allow_config_store_value && config) {
46
46
  data = JSON.stringify({ config_id: config, config_value: is_on_value });
47
- } else {
48
- data = null;
49
47
  }
50
48
  doAction(actionData, data);
51
49
  if (sensor?.is_managed_by_backend) {
@@ -55,7 +55,7 @@ describe('Test ColorPickerTemplate', () => {
55
55
  };
56
56
  });
57
57
 
58
- test('render template ColorPickerTemplate', async () => {
58
+ it('render template ColorPickerTemplate', async () => {
59
59
  useConfigGlobalState.mockImplementation(() => [{}, jest.fn()]);
60
60
  const sensor = {
61
61
  is_managed_by_backend: true,
@@ -78,8 +78,8 @@ describe('Test CurtainButtonTemplate', () => {
78
78
 
79
79
  let wrapper;
80
80
 
81
- test('render without params', async () => {
82
- await act(() => {
81
+ it('render without params', async () => {
82
+ await act(async () => {
83
83
  wrapper = renderer.create(wrapComponent());
84
84
  });
85
85
  const instance = wrapper.root;
@@ -87,8 +87,8 @@ describe('Test CurtainButtonTemplate', () => {
87
87
  expect(touchableOpacities.length).toEqual(3);
88
88
  });
89
89
 
90
- test('render CurtainButtonTemplate', async () => {
91
- await act(() => {
90
+ it('render CurtainButtonTemplate', async () => {
91
+ await act(async () => {
92
92
  wrapper = renderer.create(wrapComponent(actionGroup, sensor));
93
93
  });
94
94
  const instance = wrapper.root;
@@ -48,7 +48,7 @@ describe('Test NumberUpDownActionTemplate', () => {
48
48
  };
49
49
  });
50
50
 
51
- test('render template', async () => {
51
+ it('render template', async () => {
52
52
  const mockDoAction = jest.fn();
53
53
  await act(async () => {
54
54
  wrapper = await create(
@@ -75,7 +75,7 @@ describe('Test NumberUpDownActionTemplate', () => {
75
75
  expect(watchMultiConfigs).toBeCalled();
76
76
  });
77
77
 
78
- test('do action not call watchConfigs cause is_managed_by_backend false', async () => {
78
+ it('do action not call watchConfigs cause is_managed_by_backend false', async () => {
79
79
  const mockDoAction = jest.fn();
80
80
  await act(async () => {
81
81
  wrapper = await create(
@@ -97,7 +97,7 @@ describe('Test NumberUpDownActionTemplate', () => {
97
97
  expect(watchMultiConfigs).not.toBeCalled();
98
98
  });
99
99
 
100
- test('do action not call watchConfigs cause device_type not lq_thinq', async () => {
100
+ it('do action not call watchConfigs cause device_type not lq_thinq', async () => {
101
101
  const mockDoAction = jest.fn();
102
102
  await act(async () => {
103
103
  wrapper = await create(
@@ -122,7 +122,7 @@ describe('Test NumberUpDownActionTemplate', () => {
122
122
  expect(watchMultiConfigs).not.toBeCalled();
123
123
  });
124
124
 
125
- test('do action watchConfigs cause allow_config_store_value true', async () => {
125
+ it('do action watchConfigs cause allow_config_store_value true', async () => {
126
126
  const mockDoAction = jest.fn();
127
127
  actionGroup.configuration.allow_config_store_value = true;
128
128
  await act(async () => {
@@ -148,7 +148,7 @@ describe('Test NumberUpDownActionTemplate', () => {
148
148
  expect(watchMultiConfigs).toBeCalled();
149
149
  });
150
150
 
151
- test('action down without config', async () => {
151
+ it('action down without config', async () => {
152
152
  actionGroup.configuration.allow_config_store_value = true;
153
153
  actionGroup.configuration.config = undefined;
154
154
  const mockDoAction = jest.fn();
@@ -172,7 +172,7 @@ describe('Test NumberUpDownActionTemplate', () => {
172
172
  expect(watchMultiConfigs).not.toBeCalled();
173
173
  });
174
174
 
175
- test('action down allow_config_store_value true', async () => {
175
+ it('action down allow_config_store_value true', async () => {
176
176
  const mockDoAction = jest.fn();
177
177
  actionGroup.configuration.allow_config_store_value = true;
178
178
  actionGroup.configuration.config = null;
@@ -199,7 +199,7 @@ describe('Test NumberUpDownActionTemplate', () => {
199
199
  expect(text.props.children).toEqual('27 *C');
200
200
  });
201
201
 
202
- test('action up allow_config_store_value true', async () => {
202
+ it('action up allow_config_store_value true', async () => {
203
203
  const mockDoAction = jest.fn();
204
204
  actionGroup.configuration.allow_config_store_value = true;
205
205
  actionGroup.configuration.config = null;
@@ -227,7 +227,7 @@ describe('Test NumberUpDownActionTemplate', () => {
227
227
  expect(text.props.children).toEqual('29 *C');
228
228
  });
229
229
 
230
- test('action down with allow_config_store_value false', async () => {
230
+ it('action down with allow_config_store_value false', async () => {
231
231
  const mockDoAction = jest.fn();
232
232
  await act(async () => {
233
233
  wrapper = await create(
@@ -253,7 +253,7 @@ describe('Test NumberUpDownActionTemplate', () => {
253
253
  expect(text.props.children).toEqual('24 *C'); // TODO should 24, configValues make changes again
254
254
  });
255
255
 
256
- test('action up with allow_config_store_value false', async () => {
256
+ it('action up with allow_config_store_value false', async () => {
257
257
  const mockDoAction = jest.fn();
258
258
  await act(async () => {
259
259
  wrapper = await create(
@@ -279,7 +279,7 @@ describe('Test NumberUpDownActionTemplate', () => {
279
279
  expect(text.props.children).toEqual('26 *C'); // TODO should 26, configValues make changes again
280
280
  });
281
281
 
282
- test('action down limit ', async () => {
282
+ it('action down limit ', async () => {
283
283
  actionGroup.configuration.min_value = 25;
284
284
  const mockDoAction = jest.fn();
285
285
  await act(async () => {
@@ -303,7 +303,7 @@ describe('Test NumberUpDownActionTemplate', () => {
303
303
  expect(text.props.children).toEqual('25 *C');
304
304
  });
305
305
 
306
- test('action up limit ', async () => {
306
+ it('action up limit ', async () => {
307
307
  actionGroup.configuration.max_value = 25;
308
308
  const mockDoAction = jest.fn();
309
309
  await act(async () => {
@@ -326,7 +326,7 @@ describe('Test NumberUpDownActionTemplate', () => {
326
326
  const text = instance.findByType(Text);
327
327
  expect(text.props.children).toEqual('25 *C');
328
328
  });
329
- test('render template have title', async () => {
329
+ it('render template have title', async () => {
330
330
  const mockDoAction = jest.fn();
331
331
  actionGroup.title = 'title';
332
332
  await act(async () => {
@@ -345,7 +345,7 @@ describe('Test NumberUpDownActionTemplate', () => {
345
345
  const text = instance.findAllByType(Text);
346
346
  expect(text).toHaveLength(2);
347
347
  });
348
- test('render template watch config not exits', async () => {
348
+ it('render template watch config not exits', async () => {
349
349
  const mockDoAction = jest.fn();
350
350
  actionGroup.configuration.config = 100;
351
351
  await act(async () => {
@@ -363,7 +363,7 @@ describe('Test NumberUpDownActionTemplate', () => {
363
363
  const text = instance.findAllByType(ActivityIndicator);
364
364
  expect(text).toHaveLength(0);
365
365
  });
366
- test('action up sensor device type is GOOGLE_HOME', async () => {
366
+ it('action up sensor device type is GOOGLE_HOME', async () => {
367
367
  const mockDoAction = jest.fn();
368
368
  await act(async () => {
369
369
  wrapper = await create(
@@ -61,11 +61,11 @@ describe('Test OneBigButtonTemplate', () => {
61
61
  const setState = jest.fn();
62
62
  useState.mockImplementation((init) => [init, setState]);
63
63
 
64
- const assertRender = (state, text) => {
64
+ const assertRender = async (state, text) => {
65
65
  useState.mockImplementationOnce((init) => [state, setState]);
66
66
  const mockDoAction = jest.fn();
67
67
 
68
- act(() => {
68
+ await act(async () => {
69
69
  wrapper = create(wrapComponent(actionGroup, mockDoAction));
70
70
  });
71
71
 
@@ -75,29 +75,29 @@ describe('Test OneBigButtonTemplate', () => {
75
75
  expect(renderJson?.type).toEqual('Modal');
76
76
  };
77
77
 
78
- test('render state on', () => {
79
- assertRender(true, 'ON');
78
+ it('render state on', async () => {
79
+ await assertRender(true, 'ON');
80
80
  });
81
81
 
82
- test('render state off', () => {
83
- assertRender(false, 'OFF');
82
+ it('render state off', async () => {
83
+ await assertRender(false, 'OFF');
84
84
  });
85
85
 
86
- const assertActionCall = (state, action_data) => {
86
+ const assertActionCall = async (state, action_data) => {
87
87
  useState.mockImplementationOnce((init) => [state, setState]);
88
88
  const mockDoAction = jest.fn();
89
- act(() => {
89
+ await act(async () => {
90
90
  wrapper = create(wrapComponent(actionGroup, mockDoAction));
91
91
  });
92
92
 
93
93
  expect(mockDoAction).not.toHaveBeenCalled();
94
94
  };
95
95
 
96
- test('action state on', () => {
97
- assertActionCall(true, action_off_data);
96
+ it('action state on', async () => {
97
+ await assertActionCall(true, action_off_data);
98
98
  });
99
99
 
100
- test('action state off', () => {
101
- assertActionCall(false, action_on_data);
100
+ it('action state off', async () => {
101
+ await assertActionCall(false, action_on_data);
102
102
  });
103
103
  });
@@ -71,7 +71,7 @@ describe('Test OnOffTemplate', () => {
71
71
  };
72
72
  });
73
73
 
74
- test('render with template OnOffSmartLockActionTemplate doAction lock', async () => {
74
+ it('render with template OnOffSmartLockActionTemplate doAction lock', async () => {
75
75
  useConfigGlobalState.mockImplementation(() => [
76
76
  { 5: { value: 2 } },
77
77
  jest.fn(),
@@ -90,7 +90,7 @@ describe('Test OnOffTemplate', () => {
90
90
  expect(mockDoAction).toBeCalledWith(action_on_data, '{"door_lock":0}');
91
91
  });
92
92
 
93
- test('render with template OnOffSmartLockActionTemplate doAction unlock', async () => {
93
+ it('render with template OnOffSmartLockActionTemplate doAction unlock', async () => {
94
94
  actionGroup.configuration.is_on_value = null;
95
95
  const sensor = { is_managed_by_backend: false, name: 'Sensor' };
96
96
  useConfigGlobalState.mockImplementation(() => [
@@ -100,7 +100,7 @@ describe('Test OnOffTemplate', () => {
100
100
  });
101
101
  });
102
102
 
103
- test('render with template OnOffSimpleActionTemplate', async () => {
103
+ it('render with template OnOffSimpleActionTemplate', async () => {
104
104
  const mockDoAction = jest.fn();
105
105
  await act(async () => {
106
106
  tree = await create(wrapComponent(actionGroup, mockDoAction, {}));
@@ -110,7 +110,7 @@ describe('Test OnOffTemplate', () => {
110
110
  expect(template).toHaveLength(1);
111
111
  });
112
112
 
113
- test('render with template on_off_button_action_template', async () => {
113
+ it('render with template on_off_button_action_template', async () => {
114
114
  actionGroup.template = 'on_off_button_action_template';
115
115
  const mockDoAction = jest.fn();
116
116
  await act(async () => {
@@ -121,7 +121,7 @@ describe('Test OnOffTemplate', () => {
121
121
  expect(template).toHaveLength(0);
122
122
  });
123
123
 
124
- test('render with wrong template', async () => {
124
+ it('render with wrong template', async () => {
125
125
  actionGroup.template = 'wrong_template';
126
126
  const mockDoAction = jest.fn();
127
127
  await act(async () => {
@@ -140,7 +140,7 @@ describe('Test OnOffTemplate', () => {
140
140
  expect(templateOnOffSimple).not.toHaveLength(1);
141
141
  });
142
142
 
143
- test('render with template OnOffSimpleActionTemplate with is_managed_by_backend', async () => {
143
+ it('render with template OnOffSimpleActionTemplate with is_managed_by_backend', async () => {
144
144
  const mockDoAction = jest.fn();
145
145
  await act(async () => {
146
146
  tree = await create(wrapComponent(actionGroup, mockDoAction, {}));
@@ -151,7 +151,7 @@ describe('Test OnOffTemplate', () => {
151
151
  expect(watchMultiConfigs).toBeCalledTimes(0);
152
152
  });
153
153
 
154
- test('template OnOffSimpleActionTemplate doAction with is_on_value, match configValue', async () => {
154
+ it('template OnOffSimpleActionTemplate doAction with is_on_value, match configValue', async () => {
155
155
  const mockDoAction = jest.fn();
156
156
  await act(async () => {
157
157
  tree = await create(wrapComponent(actionGroup, mockDoAction, sensor));
@@ -168,7 +168,7 @@ describe('Test OnOffTemplate', () => {
168
168
  expect(watchMultiConfigs).toBeCalledTimes(0);
169
169
  });
170
170
 
171
- test('template OnOffSimpleActionTemplate doAction with is_on_value, not match configValue', async () => {
171
+ it('template OnOffSimpleActionTemplate doAction with is_on_value, not match configValue', async () => {
172
172
  actionGroup.configuration.is_on_value = [1];
173
173
  const mockDoAction = jest.fn();
174
174
  await act(async () => {
@@ -184,7 +184,7 @@ describe('Test OnOffTemplate', () => {
184
184
  expect(mockDoAction).toHaveBeenCalledWith(action_on_data, null);
185
185
  });
186
186
 
187
- test('template OnOffSimpleActionTemplate doAction with is_on_value and is_managed_by_backend', async () => {
187
+ it('template OnOffSimpleActionTemplate doAction with is_on_value and is_managed_by_backend', async () => {
188
188
  const mockDoAction = jest.fn();
189
189
  await act(async () => {
190
190
  tree = await create(wrapComponent(actionGroup, mockDoAction, sensor));
@@ -200,7 +200,7 @@ describe('Test OnOffTemplate', () => {
200
200
  expect(watchMultiConfigs).toBeCalledTimes(0);
201
201
  });
202
202
 
203
- test('render with template OnOffSimpleActionTemplate with just action_data', async () => {
203
+ it('render with template OnOffSimpleActionTemplate with just action_data', async () => {
204
204
  actionGroup = {
205
205
  template: 'OnOffSimpleActionTemplate',
206
206
  configuration: {
@@ -226,7 +226,7 @@ describe('Test OnOffTemplate', () => {
226
226
  expect(mockDoAction).toHaveBeenCalledWith(action_data, false);
227
227
  });
228
228
 
229
- test('render with template OnOffSimpleActionTemplate with just action_data lg_thinq', async () => {
229
+ it('render with template OnOffSimpleActionTemplate with just action_data lg_thinq', async () => {
230
230
  actionGroup = {
231
231
  template: 'OnOffSimpleActionTemplate',
232
232
  configuration: {
@@ -259,7 +259,7 @@ describe('Test OnOffTemplate', () => {
259
259
  );
260
260
  });
261
261
 
262
- test('render with template OnOffSimpleActionTemplate disabled', async () => {
262
+ it('render with template OnOffSimpleActionTemplate disabled', async () => {
263
263
  actionGroup = {
264
264
  template: 'OnOffSimpleActionTemplate',
265
265
  configuration: {
@@ -55,7 +55,7 @@ describe('Test OneBigButtonTemplate', () => {
55
55
  sensor = { name: 'Sensor' };
56
56
  });
57
57
 
58
- test('render OneBigButtonTemplate', async () => {
58
+ it('render OneBigButtonTemplate', async () => {
59
59
  const mockDoAction = jest.fn();
60
60
  await act(async () => {
61
61
  tree = await create(wrapComponent(actionGroup, mockDoAction, sensor));
@@ -64,7 +64,7 @@ describe('Test OneBigButtonTemplate', () => {
64
64
  const buttons = instance.findAllByType(TouchableOpacity);
65
65
  expect(buttons.length).toEqual(1);
66
66
 
67
- act(() => {
67
+ await act(async () => {
68
68
  buttons[0].props.onPress();
69
69
  });
70
70
 
@@ -78,7 +78,7 @@ describe('Test OptionsDropdownActionTemplate', () => {
78
78
  };
79
79
  });
80
80
 
81
- test('render template', async () => {
81
+ it('render template', async () => {
82
82
  const mockDoAction = jest.fn();
83
83
  sensor.is_managed_by_backend = true;
84
84
  await act(async () => {
@@ -95,7 +95,7 @@ describe('Test OptionsDropdownActionTemplate', () => {
95
95
  expect(touchs).toHaveLength(5); // show-hide alert + 2 options + onDone
96
96
  });
97
97
 
98
- test('render template without selectedOption match, get first one', async () => {
98
+ it('render template without selectedOption match, get first one', async () => {
99
99
  actionGroup.configuration.options[1].value_int = 3;
100
100
  sensor.is_managed_by_backend = true;
101
101
  const mockDoAction = jest.fn();
@@ -169,15 +169,15 @@ describe('Test OptionsDropdownActionTemplate', () => {
169
169
  expect(texts[1].props.children).toEqual('Level2'); // TODO: should be Level1, configValues make change again
170
170
  };
171
171
 
172
- test('show popup, change selectedOption and watchMultiConfigs', async () => {
172
+ it('show popup, change selectedOption and watchMultiConfigs', async () => {
173
173
  await assertUpdateSelectedOption(true);
174
174
  });
175
175
 
176
- test('show popup, change selectedOption and not watchMultiConfigs', async () => {
176
+ it('show popup, change selectedOption and not watchMultiConfigs', async () => {
177
177
  await assertUpdateSelectedOption(false);
178
178
  });
179
179
 
180
- test('doAction with text when have value_text', async () => {
180
+ it('doAction with text when have value_text', async () => {
181
181
  actionGroup.configuration.options[0].value_text = 'level-1';
182
182
  const mockDoAction = jest.fn();
183
183
  await act(async () => {
@@ -235,7 +235,7 @@ describe('Test OptionsDropdownActionTemplate', () => {
235
235
  expect(texts[1].props.children).toEqual('Level2');
236
236
  });
237
237
 
238
- test('render template without read config', async () => {
238
+ it('render template without read config', async () => {
239
239
  delete actionGroup.configuration.config;
240
240
  sensor.is_managed_by_backend = true;
241
241
 
@@ -254,7 +254,7 @@ describe('Test OptionsDropdownActionTemplate', () => {
254
254
  getTranslate('en', 'not_available')
255
255
  );
256
256
  });
257
- test('doAction sensor device type is GOOGLE_HOME', async () => {
257
+ it('doAction sensor device type is GOOGLE_HOME', async () => {
258
258
  actionGroup.configuration.options[0].value_text = 'level-1';
259
259
  sensor.device_type = DEVICE_TYPE.GOOGLE_HOME;
260
260
  const mockDoAction = jest.fn();
@@ -55,7 +55,7 @@ describe('Test SliderRangeTemplate', () => {
55
55
  };
56
56
  });
57
57
 
58
- test('render template SliderRangeTemplate', async () => {
58
+ it('render template SliderRangeTemplate', async () => {
59
59
  useConfigGlobalState.mockImplementation(() => [{}, jest.fn()]);
60
60
  const sensor = { is_managed_by_backend: true, name: 'Sensor' };
61
61
  await act(async () => {
@@ -48,7 +48,7 @@ describe('Test StatesGridActionTemplate', () => {
48
48
  name: 'Sensor name',
49
49
  };
50
50
 
51
- test('test render without params', async () => {
51
+ it('test render without params', async () => {
52
52
  await act(async () => {
53
53
  tree = await create(<StatesGridActionTemplate />);
54
54
  });
@@ -57,7 +57,7 @@ describe('Test StatesGridActionTemplate', () => {
57
57
  expect(Texts).toHaveLength(1);
58
58
  });
59
59
 
60
- test('test render with params', async () => {
60
+ it('test render with params', async () => {
61
61
  await act(async () => {
62
62
  tree = await create(
63
63
  <StatesGridActionTemplate
@@ -61,8 +61,8 @@ describe('Test ThreeButtonTemplate', () => {
61
61
 
62
62
  let wrapper;
63
63
 
64
- test('render ThreeButtonTemplate', async () => {
65
- await act(() => {
64
+ it('render ThreeButtonTemplate', async () => {
65
+ await act(async () => {
66
66
  wrapper = renderer.create(wrapComponent(actionGroup));
67
67
  });
68
68
  const instance = wrapper.root;
@@ -68,7 +68,7 @@ describe('Test TimerActionTemplate success with config value', () => {
68
68
  };
69
69
  });
70
70
 
71
- test('render without params', async () => {
71
+ it('render without params', async () => {
72
72
  await act(async () => {
73
73
  wrapper = await create(wrapComponent());
74
74
  });
@@ -77,7 +77,7 @@ describe('Test TimerActionTemplate success with config value', () => {
77
77
  expect(texts).toHaveLength(6);
78
78
  });
79
79
 
80
- test('render template', async () => {
80
+ it('render template', async () => {
81
81
  await act(async () => {
82
82
  wrapper = await create(wrapComponent(actionGroup, sensor));
83
83
  });
@@ -105,7 +105,7 @@ describe('Test TimerActionTemplate success with config value', () => {
105
105
  );
106
106
  });
107
107
 
108
- test('render template with config_hour', async () => {
108
+ it('render template with config_hour', async () => {
109
109
  actionGroup = {
110
110
  ...actionGroup,
111
111
  configuration: {
@@ -60,7 +60,7 @@ describe('Test TimerActionTemplate without config value', () => {
60
60
  };
61
61
  });
62
62
 
63
- test('render template', async () => {
63
+ it('render template', async () => {
64
64
  Date.now = jest.fn(() => new Date('2021-09-09T10:00:00.000Z'));
65
65
  const mockDoAction = jest.fn();
66
66
  await act(async () => {
@@ -82,7 +82,7 @@ describe('Test TimerActionTemplate without config value', () => {
82
82
  );
83
83
  });
84
84
 
85
- test('timer onConfirm', async () => {
85
+ it('timer onConfirm', async () => {
86
86
  Date.now = jest.fn(() => new Date('2021-09-09T10:00:00.000Z'));
87
87
  const mockDoAction = jest.fn();
88
88
  await act(async () => {