@eohjsc/react-native-smart-city 0.3.31 → 0.3.32

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 (351) hide show
  1. package/package.json +7 -5
  2. package/src/commons/Action/ItemQuickAction.js +2 -3
  3. package/src/commons/Action/__test__/ItemQuickAction.test.js +17 -9
  4. package/src/commons/ActionGroup/CurtainButtonTemplate.js +6 -6
  5. package/src/commons/ActionGroup/NumberUpDownActionTemplate.js +4 -4
  6. package/src/commons/ActionGroup/OnOffSmartLock/AutoLock/ButtonWrapper.js +5 -2
  7. package/src/commons/ActionGroup/OnOffSmartLock/AutoLock/__test__/index.test.js +10 -4
  8. package/src/commons/ActionGroup/OnOffSmartLock/AutoLock/index.js +4 -4
  9. package/src/commons/ActionGroup/OnOffSmartLock/OnOffSmartLock.js +2 -2
  10. package/src/commons/ActionGroup/OnOffSmartLock/PasscodeList/ItemPasscode.js +1 -1
  11. package/src/commons/ActionGroup/OnOffSmartLock/PasscodeList/__test__/index.test.js +2 -2
  12. package/src/commons/ActionGroup/OnOffSmartLock/PasscodeList/index.js +2 -2
  13. package/src/commons/ActionGroup/OnOffSmartLock/SetupGeneratePasscode/ButtonWrapper.js +2 -2
  14. package/src/commons/ActionGroup/OnOffSmartLock/SetupGeneratePasscode/__test__/index.test.js +12 -6
  15. package/src/commons/ActionGroup/OnOffSmartLock/SetupGeneratePasscode/index.js +8 -4
  16. package/src/commons/ActionGroup/OnOffTemplate/OnOffButtonTemplate.js +4 -6
  17. package/src/commons/ActionGroup/OneBigButtonTemplate.js +1 -1
  18. package/src/commons/ActionGroup/OptionsDropdownActionTemplate.js +10 -4
  19. package/src/commons/ActionGroup/SmartTiviActionTemplate/SmartTiviActionTemplate.js +25 -9
  20. package/src/commons/ActionGroup/SmartTiviActionTemplate/__test__/ControlPlay.test.js +13 -7
  21. package/src/commons/ActionGroup/SmartTiviActionTemplate/__test__/RectangleButton.test.js +9 -5
  22. package/src/commons/ActionGroup/SmartTiviActionTemplate/__test__/SmartTiviActionTemplate.test.js +25 -9
  23. package/src/commons/ActionGroup/SmartTiviActionTemplate/component/CircleButton.js +16 -6
  24. package/src/commons/ActionGroup/SmartTiviActionTemplate/component/ControlPlay.js +10 -4
  25. package/src/commons/ActionGroup/SmartTiviActionTemplate/component/RectangleButton.js +7 -3
  26. package/src/commons/ActionGroup/StatesGridActionTemplate.js +2 -2
  27. package/src/commons/ActionGroup/ThreeButtonTemplate.js +5 -5
  28. package/src/commons/ActionGroup/TwoButtonTemplate/index.js +4 -4
  29. package/src/commons/ActionGroup/__test__/NumberUpDownTemplate.test.js +7 -7
  30. package/src/commons/ActionGroup/__test__/OnOffSmartLock.test.js +3 -3
  31. package/src/commons/ActionGroup/__test__/OnOffTemplate.test.js +3 -3
  32. package/src/commons/ActionGroup/__test__/OptionsDropdownTemplate.test.js +9 -5
  33. package/src/commons/ActionGroup/__test__/index.test.js +5 -3
  34. package/src/commons/AlertAction/index.js +2 -2
  35. package/src/commons/Auth/AccountItem.js +9 -3
  36. package/src/commons/Auth/__test__/AccountItem.test.js +6 -3
  37. package/src/commons/Automate/ItemAutomate.js +13 -3
  38. package/src/commons/BackDefault/index.js +2 -2
  39. package/src/commons/BottomButtonView/index.js +4 -5
  40. package/src/commons/Button/index.js +0 -2
  41. package/src/commons/ButtonPopup/index.js +3 -3
  42. package/src/commons/Dashboard/MyPinnedSharedUnit/__test__/MyPinnedSharedUnit.test.js +3 -2
  43. package/src/commons/Dashboard/MyPinnedSharedUnit/index.js +4 -2
  44. package/src/commons/Dashboard/MyUnit/__test__/MyUnit.test.js +6 -3
  45. package/src/commons/Dashboard/MyUnit/index.js +5 -3
  46. package/src/commons/Device/ConnectedViewHeader.js +2 -2
  47. package/src/commons/Device/DeviceAlertStatus.js +2 -2
  48. package/src/commons/Device/DisconnectedView.js +2 -2
  49. package/src/commons/Device/Emergency/EmergencyButton.js +2 -2
  50. package/src/commons/Device/Emergency/__test__/EmergencyButton.test.js +3 -2
  51. package/src/commons/Device/FlatListItems.js +2 -2
  52. package/src/commons/Device/ItemAddNew/index.js +7 -12
  53. package/src/commons/Device/ItemDevice.js +16 -11
  54. package/src/commons/Device/SensorConnectedStatus.js +5 -2
  55. package/src/commons/Device/WindDirection/Compass/index.js +5 -2
  56. package/src/commons/Device/__test__/DeviceAlertStatus.test.js +8 -4
  57. package/src/commons/Device/__test__/FlatListItems.test.js +3 -2
  58. package/src/commons/Device/__test__/SensorConnectedStatus.test.js +4 -2
  59. package/src/commons/Explore/ActivityIndicator/index.js +5 -2
  60. package/src/commons/Explore/SearchBox/__test__/SearchBox.test.js +3 -3
  61. package/src/commons/Explore/SearchBox/index.js +2 -2
  62. package/src/commons/FieldTemplate/ChooseUserField/ChoosePopup.js +4 -4
  63. package/src/commons/FieldTemplate/ChooseUserField/__test__/index.test.js +11 -8
  64. package/src/commons/FieldTemplate/ChooseUserField/index.js +2 -2
  65. package/src/commons/FieldTemplate/PasscodeField/__test__/index.test.js +3 -2
  66. package/src/commons/FieldTemplate/PasscodeField/index.js +2 -2
  67. package/src/commons/FieldTemplate/ScheduleField/__test__/index.test.js +12 -7
  68. package/src/commons/Form/TextInput.js +2 -2
  69. package/src/commons/Form/TextInputPassword.js +2 -2
  70. package/src/commons/GroupCheckBox/__test__/GroupCheckBox.test.js +5 -3
  71. package/src/commons/GroupCheckBox/index.js +2 -2
  72. package/src/commons/HeaderAni/index.js +2 -3
  73. package/src/commons/MediaPlayerDetail/index.js +2 -2
  74. package/src/commons/MenuActionList/index.js +2 -2
  75. package/src/commons/MenuActionMore/index.js +2 -3
  76. package/src/commons/NavBar/index.js +2 -3
  77. package/src/commons/OneTapTemplate/NumberUpDownActionTemplate.js +11 -5
  78. package/src/commons/OneTapTemplate/OptionsDropdownActionTemplate.js +7 -3
  79. package/src/commons/OneTapTemplate/StatesGridActionTemplate.js +4 -2
  80. package/src/commons/OneTapTemplate/__test__/NumberUpDownActionTemplate.test.js +11 -8
  81. package/src/commons/OneTapTemplate/__test__/OptionsDropdownActionTemplate.test.js +9 -5
  82. package/src/commons/OneTapTemplate/__test__/StatesGridActionTemplate.test.js +5 -3
  83. package/src/commons/Popover/index.js +2 -13
  84. package/src/commons/PreventAccess/__test__/PreventAccess.test.js +5 -3
  85. package/src/commons/PreventAccess/index.js +3 -3
  86. package/src/commons/{Connecting → Processing}/__test__/Connecting.test.js +5 -4
  87. package/src/commons/Processing/index.js +93 -0
  88. package/src/commons/{Connecting → Processing}/styles.js +9 -1
  89. package/src/commons/SelectGateway/index.js +105 -0
  90. package/src/commons/SelectGateway/styles.js +55 -0
  91. package/src/commons/SelectSubUnit/__test__/SelectSubUnit.test.js +106 -0
  92. package/src/commons/SelectSubUnit/index.js +124 -0
  93. package/src/commons/SelectSubUnit/styles.js +55 -0
  94. package/src/commons/SelectUnit/__test__/SelectUnit.test.js +120 -0
  95. package/src/commons/SelectUnit/index.js +106 -0
  96. package/src/commons/SelectUnit/styles.js +54 -0
  97. package/src/commons/Sharing/WrapHeaderScrollable.js +2 -2
  98. package/src/commons/SubUnit/OneTap/ItemOneTap.js +4 -4
  99. package/src/commons/SubUnit/OneTap/__test__/SubUnitAutomate.test.js +25 -10
  100. package/src/commons/SubUnit/OneTap/index.js +9 -4
  101. package/src/commons/SubUnit/ShortDetail.js +11 -29
  102. package/src/commons/SubUnit/__test__/ShortDetail.test.js +15 -10
  103. package/src/commons/SummaryItem/index.js +2 -2
  104. package/src/commons/Unit/HeaderUnit/index.js +4 -5
  105. package/src/commons/Unit/SharedUnit.js +10 -8
  106. package/src/commons/Unit/__test__/HeaderUnit.test.js +13 -5
  107. package/src/commons/Unit/__test__/SharedUnit.test.js +30 -11
  108. package/src/commons/UnitSummary/AirQuality/__test__/index.test.js +13 -8
  109. package/src/commons/UnitSummary/AirQuality/index.js +7 -3
  110. package/src/commons/UnitSummary/TotalPowerBox.js +2 -2
  111. package/src/commons/UnitSummary/TotalPowerConsumption/index.js +2 -2
  112. package/src/commons/UnitSummary/__test__/TotalPowerBox.test.js +3 -2
  113. package/src/commons/UnitSummary/__test__/TotalPowerConsumption.test.js +4 -2
  114. package/src/commons/ViewButtonBottom/index.js +4 -4
  115. package/src/commons/WheelDateTimePicker/index.js +5 -3
  116. package/src/commons/WrapParallaxScrollView/index.js +2 -1
  117. package/src/configs/API.js +6 -14
  118. package/src/configs/AccessibilityLabel.js +608 -0
  119. package/src/configs/Constants.js +1 -604
  120. package/src/context/actionType.ts +7 -3
  121. package/src/context/mockStore.ts +6 -3
  122. package/src/context/reducer.ts +23 -8
  123. package/src/hoc/withRemoteControl.js +1 -0
  124. package/src/hooks/Common/index.js +2 -2
  125. package/src/hooks/Common/{useGGHomeDeviceConnected.js → useHomeAssistantDeviceConnected.js} +3 -3
  126. package/src/hooks/Common/usePopover.js +6 -1
  127. package/src/hooks/IoT/__test__/{useGGHomeConnection.test.js → useHomeAssistantConnection.test.js} +18 -18
  128. package/src/hooks/IoT/__test__/useRemoteControl.test.js +17 -12
  129. package/src/hooks/IoT/index.js +2 -2
  130. package/src/hooks/IoT/useHomeAssistantConnection.js +91 -0
  131. package/src/hooks/IoT/useRemoteControl.js +6 -6
  132. package/src/iot/RemoteControl/{GoogleHome.js → HomeAssistant.js} +21 -17
  133. package/src/iot/RemoteControl/LG.js +2 -1
  134. package/src/iot/RemoteControl/__test__/{GoogleHome.test.js → HomeAssistant.test.js} +30 -30
  135. package/src/navigations/AddDeviceStack.js +0 -14
  136. package/src/navigations/AddGatewayStack.js +51 -21
  137. package/src/navigations/Main.js +2 -2
  138. package/src/navigations/SmartIrStack.js +3 -3
  139. package/src/navigations/UnitStack.js +1 -1
  140. package/src/screens/AQIGuide/__test__/AQIGuide.test.js +5 -3
  141. package/src/screens/AQIGuide/index.js +5 -3
  142. package/src/screens/ActivityLog/FilterPopup.js +2 -2
  143. package/src/screens/ActivityLog/__test__/FilterPopup.test.js +2 -2
  144. package/src/screens/ActivityLog/__test__/index.test.js +3 -2
  145. package/src/screens/ActivityLog/index.js +3 -3
  146. package/src/screens/AddCommon/SelectSubUnit.js +44 -191
  147. package/src/screens/AddCommon/SelectUnit.js +51 -204
  148. package/src/screens/AddCommon/__test__/SelectSubUnit.test.js +7 -50
  149. package/src/screens/AddCommon/__test__/SelectUnit.test.js +28 -26
  150. package/src/screens/AddLocationMaps/__test__/index.test.js +13 -7
  151. package/src/screens/AddLocationMaps/index.js +3 -3
  152. package/src/screens/AddNewAction/Device/index.js +2 -2
  153. package/src/screens/AddNewAction/SelectAction.js +6 -6
  154. package/src/screens/AddNewAction/SelectSensorDevices.js +3 -3
  155. package/src/screens/AddNewAction/__test__/SelectAction.test.js +2 -2
  156. package/src/screens/AddNewAction/__test__/SelectSensorDevices.test.js +8 -3
  157. package/src/screens/AddNewAutoSmart/__test__/AddNewAutoSmart.test.js +11 -7
  158. package/src/screens/AddNewAutoSmart/index.js +9 -12
  159. package/src/screens/AddNewDevice/ConnectingDevices.js +1 -1
  160. package/src/screens/AddNewDevice/__test__/AddNewDevice.test.js +7 -4
  161. package/src/screens/AddNewDevice/index.js +4 -4
  162. package/src/screens/AddNewGateway/ConnectingDevice.js +40 -0
  163. package/src/screens/AddNewGateway/ConnectingModbusDevice.js +61 -0
  164. package/src/screens/AddNewGateway/ConnectingWifiDevice.js +70 -0
  165. package/src/screens/AddNewGateway/ConnectingZigbeeDevice.js +60 -0
  166. package/src/screens/AddNewGateway/PlugAndPlay/FirstWarning.js +21 -8
  167. package/src/screens/AddNewGateway/PlugAndPlay/__test__/FirstWarning.test.js +23 -4
  168. package/src/screens/AddNewGateway/RenameNewDevices.js +141 -0
  169. package/src/screens/AddNewGateway/RenameNewDevicesStyles.js +75 -0
  170. package/src/screens/AddNewGateway/ScanGatewayQR.js +57 -0
  171. package/src/screens/AddNewGateway/ScanModbusQR.js +53 -0
  172. package/src/screens/AddNewGateway/ScanWifiDeviceQR.js +55 -0
  173. package/src/screens/AddNewGateway/SelectDeviceSubUnit.js +31 -0
  174. package/src/screens/AddNewGateway/SelectDeviceType.js +52 -0
  175. package/src/screens/AddNewGateway/SelectDeviceUnit.js +29 -0
  176. package/src/screens/AddNewGateway/SelectModbusGateway.js +34 -0
  177. package/src/screens/AddNewGateway/SelectZigbeeGateway.js +34 -0
  178. package/src/screens/AddNewGateway/ShareWifiPassword.js +302 -0
  179. package/src/screens/AddNewGateway/ShareWifiPasswordStyles.js +44 -0
  180. package/src/screens/AddNewGateway/__test__/AddNewGateway.test.js +7 -4
  181. package/src/screens/AddNewGateway/__test__/ConnectingModbusDevice.test.js +63 -0
  182. package/src/screens/AddNewGateway/__test__/{SelectGateway.test.js → ConnectingWifiDevice.test.js} +15 -10
  183. package/src/screens/AddNewGateway/__test__/ConnectingZigbeeDevice.test.js +62 -0
  184. package/src/screens/AddNewGateway/__test__/RenameNewDevices.test.js +191 -0
  185. package/src/screens/AddNewGateway/__test__/ScanGatewayQR.test.js +73 -0
  186. package/src/screens/AddNewGateway/__test__/ScanModbusQR.test.js +75 -0
  187. package/src/screens/AddNewGateway/__test__/ScanWifiDeviceQR.test.js +73 -0
  188. package/src/screens/AddNewGateway/__test__/SelectDeviceSubUnit.test.js +47 -0
  189. package/src/screens/AddNewGateway/__test__/SelectDeviceType.test.js +89 -0
  190. package/src/screens/AddNewGateway/__test__/SelectDeviceUnit.test.js +48 -0
  191. package/src/screens/AddNewGateway/__test__/SelectModbusGateway.test.js +77 -0
  192. package/src/screens/AddNewGateway/__test__/SelectZigbeeGateway.test.js +77 -0
  193. package/src/screens/AddNewGateway/__test__/ShareWifiPassword.test.js +294 -0
  194. package/src/screens/AddNewGateway/hooks/__Tests__/index.test.js +1 -1
  195. package/src/screens/AddNewGateway/index.js +4 -4
  196. package/src/screens/AddNewOneTap/__test__/AddNewOneTap.test.js +5 -4
  197. package/src/screens/AddNewOneTap/index.js +4 -4
  198. package/src/screens/Automate/__test__/index.test.js +2 -2
  199. package/src/screens/Automate/index.js +6 -2
  200. package/src/screens/ConfirmUnitDeletion/__test__/ConfirmUnitDeletion.test.js +3 -2
  201. package/src/screens/ConfirmUnitDeletion/index.js +3 -3
  202. package/src/screens/Device/EditDevice/__test__/EditDevice.test.js +5 -5
  203. package/src/screens/Device/EditDevice/index.js +3 -3
  204. package/src/screens/Device/__test__/detail.test.js +38 -22
  205. package/src/screens/Device/components/SensorConnectStatusViewHeader.js +6 -6
  206. package/src/screens/Device/components/SensorDisplayItem.js +2 -2
  207. package/src/screens/Device/detail.js +28 -22
  208. package/src/screens/Device/hooks/useEvaluateValue.js +0 -2
  209. package/src/screens/DeviceInfo/__test__/index.test.js +8 -4
  210. package/src/screens/DeviceInfo/index.js +10 -6
  211. package/src/screens/Drawer/index.js +21 -9
  212. package/src/screens/EmergencyContacts/EmergencyContactsAddNew.js +8 -4
  213. package/src/screens/EmergencyContacts/EmergencyContactsList.js +1 -1
  214. package/src/screens/EmergencyContacts/EmergencyContactsSelectContacts.js +5 -3
  215. package/src/screens/EmergencyContacts/__test__/EmergencyContactAddNew.test.js +9 -5
  216. package/src/screens/EmergencyContacts/__test__/EmergencyContactList.test.js +7 -3
  217. package/src/screens/EmergencyContacts/__test__/EmergencyContactsSelectContacts.test.js +7 -3
  218. package/src/screens/EmergencySetting/__test__/DropDownItem.test.js +3 -2
  219. package/src/screens/EmergencySetting/components/DropDownItem.js +2 -2
  220. package/src/screens/EnterPassword/__test__/EnterPassword.test.js +6 -3
  221. package/src/screens/EnterPassword/index.js +5 -3
  222. package/src/screens/GuestInfo/__test__/index.test.js +18 -12
  223. package/src/screens/GuestInfo/components/AccessScheduleItem.js +2 -2
  224. package/src/screens/GuestInfo/components/AccessScheduleSheet.js +3 -3
  225. package/src/screens/GuestInfo/components/HeaderGuestInfo.js +2 -2
  226. package/src/screens/GuestInfo/components/RecurringDetail.js +4 -4
  227. package/src/screens/GuestInfo/components/TemporaryDetail.js +3 -3
  228. package/src/screens/GuestInfo/index.js +1 -1
  229. package/src/screens/HanetCamera/Detail.js +10 -4
  230. package/src/screens/HanetCamera/ManageAccess.js +4 -4
  231. package/src/screens/HanetCamera/MemberInfo.js +1 -1
  232. package/src/screens/HanetCamera/__test__/Detail.test.js +5 -3
  233. package/src/screens/HanetCamera/__test__/ManageAccess.test.js +10 -4
  234. package/src/screens/HanetCamera/__test__/MemberInfo.test.js +4 -2
  235. package/src/screens/HanetCamera/components/RequestFaceIDPopup.js +2 -2
  236. package/src/screens/ManageAccess/index.js +1 -1
  237. package/src/screens/MoveToAnotherSubUnit/__test__/index.test.js +4 -4
  238. package/src/screens/MoveToAnotherSubUnit/index.js +2 -2
  239. package/src/screens/PlayBackCamera/__test__/index.test.js +9 -6
  240. package/src/screens/PlayBackCamera/index.js +6 -6
  241. package/src/screens/ScanChipQR/components/QRScan/__test__/QRScan.test.js +1 -1
  242. package/src/screens/ScanChipQR/components/QRScan/index.js +10 -3
  243. package/src/screens/ScriptDetail/__test__/index.test.js +8 -4
  244. package/src/screens/ScriptDetail/index.js +7 -6
  245. package/src/screens/SelectUnit/__test__/index.test.js +4 -3
  246. package/src/screens/SelectUnit/index.js +3 -3
  247. package/src/screens/SetSchedule/index.js +1 -1
  248. package/src/screens/Sharing/Components/SensorItem.js +2 -2
  249. package/src/screens/Sharing/Components/__test__/SensorItem.test.js +4 -2
  250. package/src/screens/Sharing/InfoMemberUnit.js +7 -6
  251. package/src/screens/Sharing/MemberList.js +4 -4
  252. package/src/screens/Sharing/SelectPermission.js +9 -4
  253. package/src/screens/Sharing/SelectUser.js +9 -5
  254. package/src/screens/Sharing/__test__/InfoMemberUnit.test.js +3 -2
  255. package/src/screens/Sharing/__test__/SelectUser.test.js +7 -4
  256. package/src/screens/SideMenuDetail/__test__/index.test.js +11 -7
  257. package/src/screens/SideMenuDetail/index.js +2 -2
  258. package/src/screens/SmartIr/__test__/GroupButtonByType.test.js +4 -2
  259. package/src/screens/SmartIr/__test__/SelectDeviceType.test.js +5 -5
  260. package/src/screens/SmartIr/__test__/SmartIr.test.js +14 -6
  261. package/src/screens/SmartIr/components/GroupButtonByType/GroupButtonByType.js +4 -2
  262. package/src/screens/SmartIr/components/{SelectDeviceType.js → SelectIrDeviceType.js} +2 -2
  263. package/src/screens/SmartIr/index.js +1 -1
  264. package/src/screens/SubUnit/AddSubUnit.js +7 -3
  265. package/src/screens/SubUnit/Detail.js +6 -6
  266. package/src/screens/SubUnit/EditSubUnit.js +10 -6
  267. package/src/screens/SubUnit/ManageSubUnit.js +2 -2
  268. package/src/screens/SubUnit/__test__/AddSubUnit.test.js +6 -3
  269. package/src/screens/SubUnit/__test__/Detail.test.js +5 -3
  270. package/src/screens/SubUnit/__test__/EditSubUnit.test.js +9 -5
  271. package/src/screens/SubUnit/__test__/ManageSubUnit.test.js +3 -2
  272. package/src/screens/SyncLGDevice/AddLGDevice.js +4 -4
  273. package/src/screens/SyncLGDevice/__test__/AddLGDevice.test.js +7 -4
  274. package/src/screens/TDSGuide/__test__/TDSGuide.test.js +4 -2
  275. package/src/screens/TDSGuide/index.js +2 -2
  276. package/src/screens/Template/EditTemplate.js +2 -1
  277. package/src/screens/Template/__test__/detail.test.js +9 -1
  278. package/src/screens/Template/index.js +0 -1
  279. package/src/screens/UVIndexGuide/__test__/UVIndexGuide.test.js +3 -2
  280. package/src/screens/UVIndexGuide/index.js +2 -2
  281. package/src/screens/Unit/AddMenu.js +6 -20
  282. package/src/screens/Unit/ChooseLocation.js +1 -1
  283. package/src/screens/Unit/Detail.js +10 -10
  284. package/src/screens/Unit/ManageUnit.js +21 -15
  285. package/src/screens/Unit/MyAllUnit/index.js +1 -1
  286. package/src/screens/Unit/SelectAddToFavorites.js +7 -8
  287. package/src/screens/Unit/SelectAddress.js +4 -4
  288. package/src/screens/Unit/SmartAccountItem.js +3 -3
  289. package/src/screens/Unit/Station/__test__/index.test.js +1 -1
  290. package/src/screens/Unit/Station/index.js +2 -2
  291. package/src/screens/Unit/Summaries.js +2 -2
  292. package/src/screens/Unit/__test__/CheckSendEmail.test.js +6 -6
  293. package/src/screens/Unit/__test__/Detail.test.js +17 -12
  294. package/src/screens/Unit/__test__/ManageUnit.test.js +40 -18
  295. package/src/screens/Unit/__test__/SelectAddress.test.js +15 -8
  296. package/src/screens/Unit/__test__/SmartAccountItem.test.js +4 -3
  297. package/src/screens/Unit/components/AutomateScript/index.js +5 -2
  298. package/src/screens/Unit/components/ListMyAllUnit/index.js +1 -1
  299. package/src/screens/Unit/components/MyAllUnit/__test__/Header.test.js +9 -5
  300. package/src/screens/Unit/components/MyAllUnit/index.js +1 -1
  301. package/src/screens/Unit/components/MyUnitDevice/index.js +8 -5
  302. package/src/screens/Unit/components/SharedUnit/index.js +12 -6
  303. package/src/screens/Unit/components/__test__/MyUnitDevice.test.js +2 -2
  304. package/src/screens/Unit/components/__test__/SharedUnit.test.js +24 -9
  305. package/src/screens/Unit/hook/useUnitConnectRemoteDevices.js +25 -11
  306. package/src/screens/UnitSummary/__test__/index.test.js +4 -2
  307. package/src/screens/UnitSummary/components/3PPowerConsumption/__test__/3PPowerConsumption.test.js +4 -2
  308. package/src/screens/UnitSummary/components/3PPowerConsumption/index.js +2 -2
  309. package/src/screens/UnitSummary/components/PowerConsumption/__test__/PowerConsumption.test.js +4 -2
  310. package/src/screens/UnitSummary/components/PowerConsumption/index.js +2 -2
  311. package/src/screens/UnitSummary/components/RunningDevices/__test__/index.test.js +5 -4
  312. package/src/screens/UnitSummary/components/RunningDevices/index.js +6 -3
  313. package/src/screens/UnitSummary/components/TotalPowerBox/index.js +2 -2
  314. package/src/screens/UnitSummary/components/TotalPowerConsumption/index.js +2 -2
  315. package/src/screens/UnitSummary/components/__test__/TotalPowerBox.test.js +3 -2
  316. package/src/screens/UnitSummary/components/__test__/TotalPowerConsumption.test.js +4 -2
  317. package/src/screens/UnitSummary/index.js +10 -8
  318. package/src/screens/WaterQualityGuide/__test__/index.test.js +17 -12
  319. package/src/screens/WaterQualityGuide/index.js +26 -10
  320. package/src/utils/Apis/axios.js +1 -0
  321. package/src/utils/I18n/translations/en.json +9 -9
  322. package/src/utils/I18n/translations/vi.json +8 -8
  323. package/src/utils/Route/index.js +16 -10
  324. package/src/commons/Connecting/index.js +0 -67
  325. package/src/commons/ConnectingProcess/DeviceItem/DeviceItem.js +0 -28
  326. package/src/commons/ConnectingProcess/DeviceItem/DeviceItemStyles.js +0 -41
  327. package/src/commons/ConnectingProcess/__test__/Connecting.test.js +0 -163
  328. package/src/commons/ConnectingProcess/__test__/DeviceItem.test.js +0 -19
  329. package/src/commons/ConnectingProcess/index.js +0 -213
  330. package/src/commons/ConnectingProcess/styles.js +0 -69
  331. package/src/hooks/IoT/useGGHomeConnection.js +0 -91
  332. package/src/iot/RemoteControl/index.js +0 -55
  333. package/src/screens/AddNewDevice/ConnectDevices.js +0 -184
  334. package/src/screens/AddNewDevice/__test__/ConnectDevices.test.js +0 -131
  335. package/src/screens/AddNewGateway/ConnectedGateway.js +0 -139
  336. package/src/screens/AddNewGateway/ConnectingGateway.js +0 -137
  337. package/src/screens/AddNewGateway/PlugAndPlay/ConnectWifiWarning.js +0 -214
  338. package/src/screens/AddNewGateway/PlugAndPlay/GatewayWifiList.js +0 -319
  339. package/src/screens/AddNewGateway/PlugAndPlay/__test__/ConnectWifiWarning.test.js +0 -75
  340. package/src/screens/AddNewGateway/PlugAndPlay/__test__/GatewayWifiList.test.js +0 -130
  341. package/src/screens/AddNewGateway/SelectGateway.js +0 -133
  342. package/src/screens/AddNewGateway/SetupGatewayWifi.js +0 -207
  343. package/src/screens/AddNewGateway/__test__/ConnectedGateway.test.js +0 -71
  344. package/src/screens/AddNewGateway/__test__/ConnectingGateway.test.js +0 -96
  345. package/src/screens/AddNewGateway/__test__/SetupGateway.test.js +0 -120
  346. package/src/screens/ScanChipQR/__test__/ScanChipQR.test.js +0 -115
  347. package/src/screens/ScanChipQR/hooks/index.js +0 -120
  348. package/src/screens/ScanChipQR/index.js +0 -29
  349. package/src/screens/ScanSensorQR/__test__/ScanSensorQR.test.js +0 -111
  350. package/src/screens/ScanSensorQR/hooks/index.js +0 -40
  351. package/src/screens/ScanSensorQR/index.js +0 -39
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@eohjsc/react-native-smart-city",
3
3
  "title": "React Native Smart Home",
4
- "version": "0.3.31",
4
+ "version": "0.3.32",
5
5
  "description": "TODO",
6
6
  "main": "index.js",
7
7
  "files": [
@@ -39,11 +39,12 @@
39
39
  "reset-cache": "react-native start --reset-cache",
40
40
  "merge_conflict": "yarn jest && yarn update_coverage_result && yarn check_coverage_config",
41
41
  "jest": "jest --detectOpenHandles",
42
+ "jest1": "jest --detectOpenHandles --coverage=0",
42
43
  "example": "yarn --cwd example",
43
44
  "pods": "cd example && pod-install --quiet",
44
45
  "bootstrap": "yarn example && yarn && yarn pods",
45
- "build": "sync-files ./src ../EohMobile/node_modules/@eohjsc/react-native-smart-city/src",
46
- "watch": "sync-files --watch ./src ../EohMobile/node_modules/@eohjsc/react-native-smart-city/src"
46
+ "build": "syncdir ./src ../EohMobile/node_modules/@eohjsc/react-native-smart-city/src",
47
+ "watch": "syncdir ./src ../EohMobile/node_modules/@eohjsc/react-native-smart-city/src --watch"
47
48
  },
48
49
  "repository": {
49
50
  "type": "git",
@@ -139,7 +140,7 @@
139
140
  "patch-package": "^6.2.2",
140
141
  "pluralize": "^8.0.0",
141
142
  "postinstall": "^0.7.0",
142
- "pusher-js": "^7.0.3",
143
+ "pusher-js": "^7.4.0",
143
144
  "pusher-js-auth": "^4.0.1",
144
145
  "querystring": "^0.2.0",
145
146
  "react-content-loader": "^6.0.3",
@@ -207,9 +208,10 @@
207
208
  "redux-persist": "^6.0.0",
208
209
  "redux-saga": "^1.1.3",
209
210
  "string-format": "^2.0.0",
210
- "sync-files": "^1.0.3",
211
+ "sync-directory": "^5.1.7",
211
212
  "timezone-mock": "^1.1.3",
212
213
  "uuid-by-string": "^3.0.2",
214
+ "uuidv4": "^6.2.13",
213
215
  "validator": "^13.1.1",
214
216
  "victory-native": "^35.0.1"
215
217
  },
@@ -1,6 +1,6 @@
1
1
  import React, { memo, useCallback, useEffect, useState } from 'react';
2
2
  import { TouchableOpacity, View } from 'react-native';
3
- import { TESTID } from '../../configs/Constants';
3
+ import { AccessibilityLabel } from '../../configs/Constants';
4
4
  import { useSCContextSelector } from '../../context';
5
5
  import { useRemoteControl } from '../../hooks/IoT';
6
6
  import { useConfigGlobalState } from '../../iot/states';
@@ -87,8 +87,7 @@ const ItemQuickAction = memo(({ sensor, wrapperStyle, setStatus }) => {
87
87
 
88
88
  return (
89
89
  <TouchableOpacity
90
- testID={TESTID.ITEM_QUICK_ACTION_PRESS}
91
- accessibilityLabel={`${TESTID.ITEM_QUICK_ACTION_PRESS}-${sensor?.id}`}
90
+ accessibilityLabel={`${AccessibilityLabel.ITEM_QUICK_ACTION_PRESS}-${sensor?.id}`}
92
91
  onPress={onActionPress}
93
92
  >
94
93
  <View style={wrapperStyle}>
@@ -3,7 +3,7 @@ import { TouchableOpacity } from 'react-native';
3
3
  import { act, create } from 'react-test-renderer';
4
4
  import ItemQuickAction from '../ItemQuickAction';
5
5
  import { Colors } from '../../../configs';
6
- import { TESTID } from '../../../configs/Constants';
6
+ import { AccessibilityLabel } from '../../../configs/Constants';
7
7
  import { factory } from 'factory-girl';
8
8
 
9
9
  class Sensor {}
@@ -95,7 +95,8 @@ describe('Test ItemQuickAction', () => {
95
95
  const instance = tree.root;
96
96
  const buttonOnActionPress = instance.findAll(
97
97
  (el) =>
98
- el.props.testID === TESTID.ITEM_QUICK_ACTION_PRESS &&
98
+ el.props.accessibilityLabel ===
99
+ `${AccessibilityLabel.ITEM_QUICK_ACTION_PRESS}-${sensor?.id}` &&
99
100
  el.type === TouchableOpacity
100
101
  );
101
102
  expect(buttonOnActionPress).toHaveLength(0);
@@ -117,7 +118,8 @@ describe('Test ItemQuickAction', () => {
117
118
  const instance = tree.root;
118
119
  const buttonOnActionPress = instance.find(
119
120
  (el) =>
120
- el.props.testID === TESTID.ITEM_QUICK_ACTION_PRESS &&
121
+ el.props.accessibilityLabel ===
122
+ `${AccessibilityLabel.ITEM_QUICK_ACTION_PRESS}-${sensor?.id}` &&
121
123
  el.type === TouchableOpacity
122
124
  );
123
125
  expect(buttonOnActionPress).toBeDefined();
@@ -150,7 +152,8 @@ describe('Test ItemQuickAction', () => {
150
152
  const instance = tree.root;
151
153
  const buttonOnActionPress = instance.find(
152
154
  (el) =>
153
- el.props.testID === TESTID.ITEM_QUICK_ACTION_PRESS &&
155
+ el.props.accessibilityLabel ===
156
+ `${AccessibilityLabel.ITEM_QUICK_ACTION_PRESS}-${sensor?.id}` &&
154
157
  el.type === TouchableOpacity
155
158
  );
156
159
  expect(buttonOnActionPress).toBeDefined();
@@ -196,7 +199,8 @@ describe('Test ItemQuickAction', () => {
196
199
  const instance = tree.root;
197
200
  const buttonOnActionPress = instance.find(
198
201
  (el) =>
199
- el.props.testID === TESTID.ITEM_QUICK_ACTION_PRESS &&
202
+ el.props.accessibilityLabel ===
203
+ `${AccessibilityLabel.ITEM_QUICK_ACTION_PRESS}-${sensor?.id}` &&
200
204
  el.type === TouchableOpacity
201
205
  );
202
206
 
@@ -219,7 +223,8 @@ describe('Test ItemQuickAction', () => {
219
223
  const instance = tree.root;
220
224
  const buttonOnActionPress = instance.find(
221
225
  (el) =>
222
- el.props.testID === TESTID.ITEM_QUICK_ACTION_PRESS &&
226
+ el.props.accessibilityLabel ===
227
+ `${AccessibilityLabel.ITEM_QUICK_ACTION_PRESS}-${sensor?.id}` &&
223
228
  el.type === TouchableOpacity
224
229
  );
225
230
  expect(buttonOnActionPress).toBeDefined();
@@ -235,7 +240,8 @@ describe('Test ItemQuickAction', () => {
235
240
  const instance = tree.root;
236
241
  const buttonOnActionPress = instance.find(
237
242
  (el) =>
238
- el.props.testID === TESTID.ITEM_QUICK_ACTION_PRESS &&
243
+ el.props.accessibilityLabel ===
244
+ `${AccessibilityLabel.ITEM_QUICK_ACTION_PRESS}-${sensor?.id}` &&
239
245
  el.type === TouchableOpacity
240
246
  );
241
247
  expect(buttonOnActionPress).toBeDefined();
@@ -282,7 +288,8 @@ describe('Test ItemQuickAction', () => {
282
288
  const instance = tree.root;
283
289
  const buttonOnActionPress = instance.find(
284
290
  (el) =>
285
- el.props.testID === TESTID.ITEM_QUICK_ACTION_PRESS &&
291
+ el.props.accessibilityLabel ===
292
+ `${AccessibilityLabel.ITEM_QUICK_ACTION_PRESS}-${sensor?.id}` &&
286
293
  el.type === TouchableOpacity
287
294
  );
288
295
 
@@ -313,7 +320,8 @@ describe('Test ItemQuickAction', () => {
313
320
  const instance = tree.root;
314
321
  const buttonOnActionPress = instance.find(
315
322
  (el) =>
316
- el.props.testID === TESTID.ITEM_QUICK_ACTION_PRESS &&
323
+ el.props.accessibilityLabel ===
324
+ `${AccessibilityLabel.ITEM_QUICK_ACTION_PRESS}-${sensor?.id}` &&
317
325
  el.type === TouchableOpacity
318
326
  );
319
327
 
@@ -3,7 +3,7 @@ import { TouchableOpacity, View, Switch, Image } from 'react-native';
3
3
  import { Icon } from '@ant-design/react-native';
4
4
  import styles from './CurtainButtonTemplateStyle';
5
5
  import Text from '../Text';
6
- import { TESTID } from '../../configs/Constants';
6
+ import { AccessibilityLabel } from '../../configs/Constants';
7
7
  import { Colors, Images } from '../../configs';
8
8
 
9
9
  const CurtainButtonTemplate = memo(({ actionGroup, doAction, sensor }) => {
@@ -50,21 +50,21 @@ const CurtainButtonTemplate = memo(({ actionGroup, doAction, sensor }) => {
50
50
  icon: Images.buttonLeftCurtain,
51
51
  text: text1,
52
52
  onPress: onButtonClosePress,
53
- testID: TESTID.BUTTON_TEMPLATE_1,
53
+ accessibilityLabel: AccessibilityLabel.BUTTON_TEMPLATE_1,
54
54
  },
55
55
  {
56
56
  style: styles.buttonActionCurtainCenter,
57
57
  icon: Images.buttonPauseCurtain,
58
58
  text: '',
59
59
  onPress: onButtonStopPress,
60
- testID: TESTID.BUTTON_TEMPLATE_2,
60
+ accessibilityLabel: AccessibilityLabel.BUTTON_TEMPLATE_2,
61
61
  },
62
62
  {
63
63
  style: styles.buttonActionCurtain,
64
64
  icon: Images.buttonRightCurtain,
65
65
  text: text3,
66
66
  onPress: onButtonOpenPress,
67
- testID: TESTID.BUTTON_TEMPLATE_3,
67
+ accessibilityLabel: AccessibilityLabel.BUTTON_TEMPLATE_3,
68
68
  },
69
69
  ];
70
70
 
@@ -72,7 +72,7 @@ const CurtainButtonTemplate = memo(({ actionGroup, doAction, sensor }) => {
72
72
  <>
73
73
  {buttons.map((item, index) => (
74
74
  <TouchableOpacity
75
- testID={item.testID}
75
+ accessibilityLabel={item.accessibilityLabel}
76
76
  style={item?.style}
77
77
  onPress={item.onPress}
78
78
  underlayColor={Colors.Gray2}
@@ -91,7 +91,7 @@ const CurtainButtonTemplate = memo(({ actionGroup, doAction, sensor }) => {
91
91
  <Icon name={icon} size={15} color={color} style={styles.iconLock} />
92
92
  <Text
93
93
  style={styles.textLockDoor}
94
- testID={TESTID.TEXT_DOOR_LOOK_ON_OFF}
94
+ accessibilityLabel={AccessibilityLabel.TEXT_DOOR_LOOK_ON_OFF}
95
95
  >
96
96
  {text_door_lock}{' '}
97
97
  </Text>
@@ -8,7 +8,7 @@ import { useConfigGlobalState } from '../../iot/states';
8
8
  import { useUnwatchLGDeviceConfigControl } from '../../hooks/IoT';
9
9
  import styles from './NumberUpDownActionTemplateStyle';
10
10
  import { watchMultiConfigs } from '../../iot/Monitor';
11
- import { DEVICE_TYPE, TESTID } from '../../configs/Constants';
11
+ import { DEVICE_TYPE, AccessibilityLabel } from '../../configs/Constants';
12
12
 
13
13
  const NumberUpDownActionTemplate = ({
14
14
  actionGroup = {},
@@ -114,12 +114,12 @@ const NumberUpDownActionTemplate = ({
114
114
  <TouchableOpacity
115
115
  style={styles.downButton}
116
116
  onPress={doActionDown}
117
- testID={TESTID.NUMBER_ACTION_DOWN}
117
+ accessibilityLabel={AccessibilityLabel.NUMBER_ACTION_DOWN}
118
118
  >
119
119
  <IconOutline name="down" size={32} color={Colors.Primary} />
120
120
  </TouchableOpacity>
121
121
 
122
- <Text testID={'abcd'} type="H2">
122
+ <Text accessibilityLabel={'abcd'} type="H2">
123
123
  {value !== undefined ? (
124
124
  text_format.replace('{number}', value)
125
125
  ) : (
@@ -130,7 +130,7 @@ const NumberUpDownActionTemplate = ({
130
130
  <TouchableOpacity
131
131
  style={styles.upButton}
132
132
  onPress={doActionUp}
133
- testID={TESTID.NUMBER_ACTION_UP}
133
+ accessibilityLabel={AccessibilityLabel.NUMBER_ACTION_UP}
134
134
  >
135
135
  <IconOutline name="up" size={32} color={Colors.Primary} />
136
136
  </TouchableOpacity>
@@ -14,10 +14,13 @@ const ButtonWrapper = memo(
14
14
  isButtonReLockTiming,
15
15
  toggleSwitch,
16
16
  isEnabled,
17
- testID,
17
+ accessibilityLabel,
18
18
  }) => {
19
19
  return (
20
- <View style={styles.buttonWrapper} testID={testID}>
20
+ <View
21
+ style={styles.buttonWrapper}
22
+ accessibilityLabel={accessibilityLabel}
23
+ >
21
24
  {isButtonReLockTiming ? (
22
25
  <View style={styles.wrapHeadline}>
23
26
  <SvgBrightnessBlack />
@@ -4,7 +4,7 @@ import { Switch } from 'react-native';
4
4
 
5
5
  import AutoLock from '../index';
6
6
  import { mockSCStore } from '../../../../../context/mockStore';
7
- import { TESTID } from '../../../../../configs/Constants';
7
+ import { AccessibilityLabel } from '../../../../../configs/Constants';
8
8
  import { SCProvider } from '../../../../../context';
9
9
 
10
10
  const wrapComponent = () => (
@@ -18,13 +18,19 @@ describe('Test AutoLock', () => {
18
18
 
19
19
  const getElement = (instance) => {
20
20
  const buttonEnable = instance.findAll(
21
- (item) => item.props.testID === TESTID.AUTO_LOCK_BUTTON_ENABLE
21
+ (item) =>
22
+ item.props.accessibilityLabel ===
23
+ AccessibilityLabel.AUTO_LOCK_BUTTON_ENABLE
22
24
  );
23
25
  const buttonInstant = instance.findAll(
24
- (item) => item.props.testID === TESTID.AUTO_LOCK_BUTTON_INSTANT
26
+ (item) =>
27
+ item.props.accessibilityLabel ===
28
+ AccessibilityLabel.AUTO_LOCK_BUTTON_INSTANT
25
29
  );
26
30
  const buttonRelockTiming = instance.findAll(
27
- (item) => item.props.testID === TESTID.AUTO_LOCK_BUTTON_RELOCK_TIMING
31
+ (item) =>
32
+ item.props.accessibilityLabel ===
33
+ AccessibilityLabel.AUTO_LOCK_BUTTON_RELOCK_TIMING
28
34
  );
29
35
  return {
30
36
  buttonEnable,
@@ -4,7 +4,7 @@ import Slider from 'react-native-slider';
4
4
  import Text from '../../../Text';
5
5
  import { HeaderCustom } from '../../../Header';
6
6
  import ButtonWrapper from './ButtonWrapper';
7
- import { TESTID } from '../../../../configs/Constants';
7
+ import { AccessibilityLabel } from '../../../../configs/Constants';
8
8
  import styles from './AutoLockStyles';
9
9
  import t from '../../../../hooks/Common/useTranslations';
10
10
  import { Colors } from '../../../../configs';
@@ -25,16 +25,16 @@ const AutoLock = memo(() => {
25
25
  isButtonEnable
26
26
  toggleSwitch={handleToggleSwitch}
27
27
  isEnabled={isEnabled}
28
- testID={TESTID.AUTO_LOCK_BUTTON_ENABLE}
28
+ accessibilityLabel={AccessibilityLabel.AUTO_LOCK_BUTTON_ENABLE}
29
29
  />
30
30
  <ButtonWrapper
31
31
  isButtonInstant
32
- testID={TESTID.AUTO_LOCK_BUTTON_INSTANT}
32
+ accessibilityLabel={AccessibilityLabel.AUTO_LOCK_BUTTON_INSTANT}
33
33
  />
34
34
  <ButtonWrapper
35
35
  isButtonReLockTiming
36
36
  isEnabled={isEnabled}
37
- testID={TESTID.AUTO_LOCK_BUTTON_RELOCK_TIMING}
37
+ accessibilityLabel={AccessibilityLabel.AUTO_LOCK_BUTTON_RELOCK_TIMING}
38
38
  />
39
39
  <View style={styles.slider}>
40
40
  <Slider
@@ -8,7 +8,7 @@ import ButtonUnLock from '../../../../assets/images/Device/button-unlock.svg';
8
8
  import { useConfigGlobalState } from '../../../iot/states';
9
9
  import { useUnwatchLGDeviceConfigControl } from '../../../hooks/IoT';
10
10
  import { watchMultiConfigs } from '../../../iot/Monitor';
11
- import { DEVICE_TYPE, TESTID } from '../../../configs/Constants';
11
+ import { DEVICE_TYPE, AccessibilityLabel } from '../../../configs/Constants';
12
12
 
13
13
  const OnOffSmartLock = memo(({ actionGroup = {}, doAction, sensor = {} }) => {
14
14
  const t = useTranslations();
@@ -60,7 +60,7 @@ const OnOffSmartLock = memo(({ actionGroup = {}, doAction, sensor = {} }) => {
60
60
  <View>
61
61
  <TouchableOpacity
62
62
  onPress={handleActionSmartLock}
63
- testID={TESTID.BUTTON_ON_OFF}
63
+ accessibilityLabel={AccessibilityLabel.BUTTON_ON_OFF}
64
64
  style={styles.wrapButtonSmartLock}
65
65
  >
66
66
  {isUnlock ? (
@@ -19,7 +19,7 @@ const ButtonWrapper = ({ item, textHeadline }) => {
19
19
  };
20
20
 
21
21
  const ItemPasscode = memo(({ route }) => {
22
- const { item = {} } = route.params || {};
22
+ const { item = {} } = route?.params || {};
23
23
 
24
24
  return (
25
25
  <SafeAreaView style={styles.container}>
@@ -2,7 +2,7 @@ import React from 'react';
2
2
  import { act, create } from 'react-test-renderer';
3
3
 
4
4
  import { mockSCStore } from '../../../../../context/mockStore';
5
- import { TESTID } from '../../../../../configs/Constants';
5
+ import { AccessibilityLabel } from '../../../../../configs/Constants';
6
6
  import { SCProvider } from '../../../../../context';
7
7
  import PasscodeList from '../index';
8
8
  import { TouchableOpacity } from 'react-native';
@@ -38,7 +38,7 @@ describe('Test SetupGeneratePasscode', () => {
38
38
  const instance = tree.root;
39
39
  const passcode_list = instance.findAll(
40
40
  (item) =>
41
- item.props.testID === TESTID.PASSCODE_LIST &&
41
+ item.props.accessibilityLabel === AccessibilityLabel.PASSCODE_LIST &&
42
42
  item.type === TouchableOpacity
43
43
  );
44
44
 
@@ -9,7 +9,7 @@ import t from '../../../../hooks/Common/useTranslations';
9
9
  import { Colors } from '../../../../configs';
10
10
  import Routes from '../../../../utils/Route';
11
11
  import styles from './PasscodeListStyles';
12
- import { TESTID } from '../../../../configs/Constants';
12
+ import { AccessibilityLabel } from '../../../../configs/Constants';
13
13
 
14
14
  const PasscodeList = memo(() => {
15
15
  const navigation = useNavigation();
@@ -51,7 +51,7 @@ const PasscodeList = memo(() => {
51
51
  <TouchableOpacity
52
52
  onPress={handleClickButton(item)}
53
53
  style={styles.buttonWrapper}
54
- testID={TESTID.PASSCODE_LIST}
54
+ accessibilityLabel={AccessibilityLabel.PASSCODE_LIST}
55
55
  >
56
56
  <View>
57
57
  <Text style={styles.textCode}>{item.code}</Text>
@@ -8,7 +8,7 @@ import styles from './SetupGeneratePasscodeStyles';
8
8
 
9
9
  const ButtonWrapper = memo(
10
10
  ({
11
- testID,
11
+ accessibilityLabel,
12
12
  textHeadline,
13
13
  textMinutes,
14
14
  value,
@@ -27,7 +27,7 @@ const ButtonWrapper = memo(
27
27
  const boxNotSelect = { ...styles.boxSetTime, ...styles.boxSetTimeDuration };
28
28
  return (
29
29
  <View
30
- testID={testID}
30
+ accessibilityLabel={accessibilityLabel}
31
31
  style={
32
32
  !isButtonDuration
33
33
  ? styles.buttonWrapper
@@ -3,7 +3,7 @@ import { act, create } from 'react-test-renderer';
3
3
 
4
4
  import SetupGeneratePasscode from '../index';
5
5
  import { mockSCStore } from '../../../../../context/mockStore';
6
- import { TESTID } from '../../../../../configs/Constants';
6
+ import { AccessibilityLabel } from '../../../../../configs/Constants';
7
7
  import { SCProvider } from '../../../../../context';
8
8
 
9
9
  const mockNavigate = jest.fn();
@@ -32,13 +32,19 @@ describe('Test SetupGeneratePasscode', () => {
32
32
 
33
33
  const getElement = (instance) => {
34
34
  const changeName = instance.findAll(
35
- (item) => item.props.testID === TESTID.GENERATE_PASSCODE_CHOOSE_USER
35
+ (item) =>
36
+ item.props.accessibilityLabel ===
37
+ AccessibilityLabel.GENERATE_PASSCODE_CHOOSE_USER
36
38
  );
37
39
  const changeTime = instance.findAll(
38
- (item) => item.props.testID === TESTID.GENERATE_PASSCODE_SET_TIME
40
+ (item) =>
41
+ item.props.accessibilityLabel ===
42
+ AccessibilityLabel.GENERATE_PASSCODE_SET_TIME
39
43
  );
40
44
  const changeDuration = instance.findAll(
41
- (item) => item.props.testID === TESTID.GENERATE_PASSCODE_SET_DURATION
45
+ (item) =>
46
+ item.props.accessibilityLabel ===
47
+ AccessibilityLabel.GENERATE_PASSCODE_SET_DURATION
42
48
  );
43
49
 
44
50
  return {
@@ -66,8 +72,8 @@ describe('Test SetupGeneratePasscode', () => {
66
72
 
67
73
  const wheelDateTimePicker = instance.findAll(
68
74
  (item) =>
69
- item.props.testID ===
70
- `${TESTID.WHEEL_DATE_TIME_PICKER_BUTTON}${TESTID.VIEW_BUTTON_BOTTOM_RIGHT_BUTTON}`
75
+ item.props.accessibilityLabel ===
76
+ `${AccessibilityLabel.WHEEL_DATE_TIME_PICKER_BUTTON}${AccessibilityLabel.VIEW_BUTTON_BOTTOM_RIGHT_BUTTON}`
71
77
  );
72
78
  await wheelDateTimePicker[5].props.onClick();
73
79
  await wheelDateTimePicker[11].props.onClick();
@@ -11,7 +11,7 @@ import TemporaryDetail from '../../../../screens/GuestInfo/components/TemporaryD
11
11
  import AccessScheduleItem from '../../../../screens/GuestInfo/components/AccessScheduleItem';
12
12
  import BottomButtonView from '../../../BottomButtonView';
13
13
  import { ACCESS_SCHEDULE } from '../../../../screens/GuestInfo/constant';
14
- import { TESTID } from '../../../../configs/Constants';
14
+ import { AccessibilityLabel } from '../../../../configs/Constants';
15
15
  import ButtonWrapper from './ButtonWrapper';
16
16
  import moment from 'moment';
17
17
  import styles from './SetupGeneratePasscodeStyles';
@@ -187,14 +187,16 @@ const SetupGeneratePasscode = memo(() => {
187
187
  textHeadline={t('choose_user')}
188
188
  value={'Name'}
189
189
  isButtonChooseUser
190
- testID={TESTID.GENERATE_PASSCODE_CHOOSE_USER}
190
+ accessibilityLabel={
191
+ AccessibilityLabel.GENERATE_PASSCODE_CHOOSE_USER
192
+ }
191
193
  />
192
194
  <ButtonWrapper
193
195
  textHeadline={t('set_time')}
194
196
  valueTime={time.format('HH:mm')}
195
197
  onPressSetTime={handleSetTime}
196
198
  isButtonSetTime
197
- testID={TESTID.GENERATE_PASSCODE_SET_TIME}
199
+ accessibilityLabel={AccessibilityLabel.GENERATE_PASSCODE_SET_TIME}
198
200
  />
199
201
  <ButtonWrapper
200
202
  textHeadline={t('duration')}
@@ -204,7 +206,9 @@ const SetupGeneratePasscode = memo(() => {
204
206
  onPressSelectCircle={handleSelectCircle}
205
207
  isButtonDuration
206
208
  isSelectCircle={isSelectCircle}
207
- testID={TESTID.GENERATE_PASSCODE_SET_DURATION}
209
+ accessibilityLabel={
210
+ AccessibilityLabel.GENERATE_PASSCODE_SET_DURATION
211
+ }
208
212
  />
209
213
  <View>
210
214
  <Text style={styles.textHeadLine}>{t('access_schedule')}</Text>
@@ -5,7 +5,7 @@ import React, { memo } from 'react';
5
5
  import { TouchableOpacity, View } from 'react-native';
6
6
  import { Colors } from '../../../configs';
7
7
  import styles from './OnOffButtonTemplateStyle';
8
- import { TESTID } from '../../../configs/Constants';
8
+ import { AccessibilityLabel } from '../../../configs/Constants';
9
9
 
10
10
  const OnOffButtonTemplate = memo(
11
11
  ({ isOn, triggerAction, actionGroup = {}, isLight = false }) => {
@@ -18,8 +18,7 @@ const OnOffButtonTemplate = memo(
18
18
  <TouchableOpacity
19
19
  style={styles.bigCircle}
20
20
  onPress={triggerAction}
21
- testID={`${TESTID.ON_OFF_BUTTON}-${id}`}
22
- accessibilityLabel={`${TESTID.ON_OFF_BUTTON}-${id}`}
21
+ accessibilityLabel={`${AccessibilityLabel.ON_OFF_BUTTON}-${id}`}
23
22
  >
24
23
  <View style={styles.smallCircle}>
25
24
  <Icon
@@ -32,8 +31,7 @@ const OnOffButtonTemplate = memo(
32
31
  styles.textBig,
33
32
  { color: isOn ? Colors.Gray8 : Colors.Gray6 },
34
33
  ]}
35
- testID={`${TESTID.SENSOR_STATUS}-${id}`}
36
- accessibilityLabel={`${TESTID.SENSOR_STATUS}-${id}`}
34
+ accessibilityLabel={`${AccessibilityLabel.SENSOR_STATUS}-${id}`}
37
35
  >
38
36
  {isOn ? text_on : text_off}
39
37
  </Text>
@@ -41,7 +39,7 @@ const OnOffButtonTemplate = memo(
41
39
  </TouchableOpacity>
42
40
  </View>
43
41
  {!!actionGroup.title && !isLight && (
44
- <Text size={20} semibold center>
42
+ <Text type="H3" semibold center>
45
43
  {actionGroup.title}
46
44
  </Text>
47
45
  )}
@@ -25,7 +25,7 @@ const OneBigButtonTemplate = memo(({ actionGroup = {}, doAction, sensor }) => {
25
25
  </TouchableOpacity>
26
26
  </View>
27
27
  {!!actionGroup.title && (
28
- <Text size={20} semibold center>
28
+ <Text type="H3" semibold center>
29
29
  {actionGroup.title}
30
30
  </Text>
31
31
  )}
@@ -10,7 +10,7 @@ import { useConfigGlobalState } from '../../iot/states';
10
10
  import { useUnwatchLGDeviceConfigControl } from '../../hooks/IoT';
11
11
  import styles from './OptionsDropdownActionTemplateStyle';
12
12
  import { watchMultiConfigs } from '../../iot/Monitor';
13
- import { DEVICE_TYPE, TESTID } from '../../configs/Constants';
13
+ import { DEVICE_TYPE, AccessibilityLabel } from '../../configs/Constants';
14
14
  import IconComponent from '../../commons/IconComponent';
15
15
  import { useTranslations } from '../../hooks/Common/useTranslations';
16
16
  import SvgDoorState from '../../../assets/images/Device/door-state.svg';
@@ -138,7 +138,9 @@ const OptionsDropdownActionTemplate = ({
138
138
  </View>
139
139
  <TouchableOpacity style={styles.iconAndTextOption} onPress={onShowAlert}>
140
140
  <Text
141
- testID={TESTID.OPTIONS_DROPDOWN_ACTION_DISPLAY_SELECTED}
141
+ accessibilityLabel={
142
+ AccessibilityLabel.OPTIONS_DROPDOWN_ACTION_DISPLAY_SELECTED
143
+ }
142
144
  color={
143
145
  displaySelected === t('not_available') ? Colors.Gray6 : Colors.Gray8
144
146
  }
@@ -167,7 +169,9 @@ const OptionsDropdownActionTemplate = ({
167
169
  <Text
168
170
  color={Colors.Gray6}
169
171
  style={styles.writeNotAvailable}
170
- testID={TESTID.OPTIONS_DROPDOWN_ACTION_WRITE_NOT_AVAILABLE}
172
+ accessibilityLabel={
173
+ AccessibilityLabel.OPTIONS_DROPDOWN_ACTION_WRITE_NOT_AVAILABLE
174
+ }
171
175
  >
172
176
  {t('write_not_available')}
173
177
  </Text>
@@ -176,7 +180,9 @@ const OptionsDropdownActionTemplate = ({
176
180
  <View key={index} style={styles.rowContainer}>
177
181
  <RadioCircle active={selectedIndex === index} />
178
182
  <TouchableOpacity
179
- testID={TESTID.OPTIONS_DROPDOWN_ACTION_CHOOSING_ITEM}
183
+ accessibilityLabel={
184
+ AccessibilityLabel.OPTIONS_DROPDOWN_ACTION_CHOOSING_ITEM
185
+ }
180
186
  style={styles.row}
181
187
  onPress={() => {
182
188
  setSelectedIndex(index);