@eohjsc/react-native-smart-city 0.3.90 → 0.3.92
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/Images/Common/reorder.svg +3 -0
- package/src/commons/ActionGroup/OnOffSmartLock/AutoLock/AutoLockStyles.js +1 -1
- package/src/commons/ActionGroup/OnOffSmartLock/AutoLock/__test__/index.test.js +3 -1
- package/src/commons/ActionGroup/OnOffSmartLock/AutoLock/index.js +3 -3
- package/src/commons/ActionGroup/OnOffSmartLock/PasscodeList/__test__/index.test.js +3 -10
- package/src/commons/ActionGroup/OnOffSmartLock/PasscodeList/index.js +1 -0
- package/src/commons/ActionGroup/OnOffSmartLock/SetupGeneratePasscode/SetupGeneratePasscodeStyles.js +1 -1
- package/src/commons/ActionGroup/OnOffTemplate/SwitchButtonTemplate.js +13 -5
- package/src/commons/ActionGroup/SliderRangeTemplate.js +100 -69
- package/src/commons/ActionGroup/SliderRangeTemplateStyles.js +27 -27
- package/src/commons/ActionGroup/StatesGridActionTemplate.js +4 -1
- package/src/commons/ActionGroup/__test__/NumberUpDownTemplate.test.js +1 -1
- package/src/commons/ActionGroup/__test__/OnOffTemplate.test.js +4 -1
- package/src/commons/ActionGroup/__test__/SliderRangeTemplate.test.js +56 -0
- package/src/commons/ActionGroup/__test__/StatesGridActionTemplate.test.js +2 -2
- package/src/commons/ActionGroup/__test__/SwitchButtonTemplate.test.js +45 -8
- package/src/commons/ActionGroup/__test__/index.test.js +0 -19
- package/src/commons/ActionGroup/index.js +0 -3
- package/src/commons/ActionTemplate/CurtainAction.js +5 -5
- package/src/commons/ActionTemplate/CurtainActionStyles.js +1 -1
- package/src/commons/ActionTemplate/OnOffButtonAction.js +4 -4
- package/src/commons/ActionTemplate/OnOffButtonActionStyles.js +1 -1
- package/src/commons/ActionTemplate/OnOffSimpleAction.js +4 -4
- package/src/commons/ActionTemplate/OnOffSimpleActionStyles.js +1 -1
- package/src/commons/ActionTemplate/OnOffSmartLockAction.js +4 -4
- package/src/commons/ActionTemplate/OnOffSmartLockActionStyles.js +1 -1
- package/src/commons/ActionTemplate/OneButtonAction.js +3 -3
- package/src/commons/ActionTemplate/OneButtonActionStyles.js +1 -1
- package/src/commons/ActionTemplate/ThreeButtonAction.js +5 -5
- package/src/commons/ActionTemplate/ThreeButtonActionStyles.js +1 -1
- package/src/commons/ActionTemplate/__test__/CurtainAction.test.js +1 -1
- package/src/commons/ActionTemplate/__test__/OnOffButtonAction.test.js +1 -1
- package/src/commons/ActionTemplate/__test__/OnOffSimpleAction.test.js +1 -1
- package/src/commons/ActionTemplate/__test__/OnOffSmartLockAction.test.js +1 -1
- package/src/commons/ActionTemplate/__test__/OneButtonAction.test.js +1 -1
- package/src/commons/ActionTemplate/__test__/ThreeButtonAction.test.js +1 -1
- package/src/commons/ActionTemplate/__test__/index.test.js +21 -70
- package/src/commons/ActionTemplate/index.js +19 -55
- package/src/commons/Alert/__test__/Alert.test.js +1 -1
- package/src/commons/Auth/AccountList.js +1 -1
- package/src/commons/Auth/__test__/OtpInputList.test.js +17 -19
- package/src/commons/Automate/ItemAutomate.js +10 -4
- package/src/commons/Automate/__test__/ItemAutomate.test.js +11 -11
- package/src/commons/BackDefault/__test__/BackDefault.test.js +1 -1
- package/src/commons/Button/__test__/Button.test.js +1 -1
- package/src/commons/ButtonPopup/__test__/ButtonPopup.test.js +1 -1
- package/src/commons/Calendar/__test__/Calendar.test.js +1 -1
- package/src/commons/ChartLoading/__test__/ChartLoading.test.js +1 -1
- package/src/commons/CircleButton/__test__/CircleButton.test.js +1 -1
- package/src/commons/CircleView/__test__/CircleView.test.js +1 -1
- package/src/commons/DateTimeRangeChange/__test__/DateTimeButton.test.js +4 -2
- package/src/commons/DateTimeRangeChange/index.js +31 -48
- package/src/commons/Device/DeviceAlertStatus.js +2 -1
- package/src/commons/Device/Emergency/__test__/EmergencyButton.test.js +2 -2
- package/src/commons/Device/Emergency/__test__/EmergencyDetail.test.js +1 -1
- package/src/commons/Device/FlatListItems.js +1 -1
- package/src/commons/Device/Hanet/ItemHanetDevice.test.js +2 -2
- package/src/commons/Device/HistoryChart.js +6 -49
- package/src/commons/Device/LinearChart/LinearChart.test.js +1 -1
- package/src/commons/Device/ProgressBar/__test__/ProgressBar.test.js +1 -1
- package/src/commons/Device/ProgressBar/index.js +5 -11
- package/src/commons/Device/ProgressBar/styles.js +11 -3
- package/src/commons/Device/RainningSensor/__test__/CurrentRainSensor.test.js +5 -5
- package/src/commons/Device/SonosSpeaker/__test__/SonosSpeaker.test.js +3 -3
- package/src/commons/Device/WindDirection/Compass/Compass.test.js +2 -2
- package/src/commons/Device/WindSpeed/Anemometer/index.js +2 -0
- package/src/commons/Device/WindSpeed/LinearChart/__test__/LinearChart.test.js +14 -1
- package/src/commons/Device/WindSpeed/LinearChart/index.js +5 -3
- package/src/commons/Device/__test__/DeviceAlertStatus.test.js +3 -3
- package/src/commons/Device/__test__/DisconnectedView.test.js +2 -2
- package/src/commons/Device/__test__/FlatListItems.test.js +1 -1
- package/src/commons/Device/__test__/SensorConnectedStatus.test.js +1 -1
- package/src/commons/DisplayChecking/__test__/DisplayChecking.test.js +1 -1
- package/src/commons/FlatListDnD/__test__/index.test.js +49 -0
- package/src/commons/FlatListDnD/index.js +37 -0
- package/src/commons/FlatListDnD/styles.js +12 -0
- package/src/commons/Form/__test__/CurrencyInput.test.js +2 -2
- package/src/commons/Form/__test__/TextInput.test.js +3 -3
- package/src/commons/Form/__test__/TextInputPassword.test.js +2 -2
- package/src/commons/FullLoading/__test__/index.test.js +2 -2
- package/src/commons/Header/HeaderCustom.js +2 -1
- package/src/commons/HorizontalPicker/index.js +65 -38
- package/src/commons/IconComponent/index.js +3 -2
- package/src/commons/ImageButton/__test__/ImageButton.test.js +1 -1
- package/src/commons/MediaPlayer/__test__/index.test.js +8 -3
- package/src/commons/MediaPlayer/index.js +11 -7
- package/src/commons/MenuActionMore/index.js +6 -4
- package/src/commons/Modal/ModalBottom.js +2 -3
- package/src/commons/Modal/ModalCustom.js +2 -3
- package/src/commons/NavBar/index.js +48 -50
- package/src/commons/OneTapTemplate/NumberUpDownActionTemplate.js +3 -3
- package/src/commons/OneTapTemplate/NumberUpDownActionTemplateStyles.js +1 -1
- package/src/commons/OneTapTemplate/OptionsDropdownActionTemplate.js +5 -5
- package/src/commons/OneTapTemplate/OptionsDropdownActionTemplateStyles.js +1 -1
- package/src/commons/OneTapTemplate/StatesGridActionTemplate.js +5 -5
- package/src/commons/OneTapTemplate/StatesGridActionTemplateStyles.js +1 -1
- package/src/commons/OneTapTemplate/__test__/NumberUpDownActionTemplate.test.js +2 -2
- package/src/commons/OneTapTemplate/__test__/OptionsDropdownActionTemplate.test.js +1 -1
- package/src/commons/OneTapTemplate/__test__/StatesGridActionTemplate.test.js +2 -2
- package/src/commons/PreventAccess/index.js +1 -1
- package/src/commons/RowItem/__test__/RowItem.test.js +1 -1
- package/src/commons/RowUser/__test__/RowUser.test.js +1 -1
- package/src/commons/Section/Section.test.js +2 -2
- package/src/commons/SelectSubUnit/__test__/SelectSubUnit.test.js +1 -1
- package/src/commons/SelectUnit/__test__/SelectUnit.test.js +3 -3
- package/src/commons/Sharing/StationDevicePermissions.js +4 -4
- package/src/commons/Sharing/WrapHeaderScrollable.js +5 -5
- package/src/commons/Sharing/__test__/ButtonRemoveMember.test.js +1 -1
- package/src/commons/Sharing/__test__/DevicePermissionsCheckbox.test.js +3 -3
- package/src/commons/Sharing/__test__/MemberList.test.js +6 -4
- package/src/commons/Sharing/__test__/RowMember.test.js +2 -2
- package/src/commons/Sharing/__test__/WrapHeaderScrollable.test.js +4 -2
- package/src/commons/SubUnit/OneTap/ItemOneTap.js +7 -11
- package/src/commons/SubUnit/OneTap/__test__/SubUnitAutomate.test.js +13 -16
- package/src/commons/SubUnit/OneTap/index.js +22 -7
- package/src/commons/TextButton/__test__/TextButton.test.js +2 -2
- package/src/commons/Today/__test__/Today.test.js +1 -1
- package/src/commons/TouchableScale/__test__/TouchableScale.test.js +1 -1
- package/src/commons/UnitSummary/AirQuality/__test__/index.test.js +4 -0
- package/src/commons/UnitSummary/AirQuality/index.js +2 -2
- package/src/commons/UnitSummary/ConfigHistoryChart/__test__/ConfigHistoryChart.test.js +1 -1
- package/src/commons/UnitSummary/ConfigHistoryChart/index.js +0 -6
- package/src/commons/UnitSummary/__test__/TotalPowerBox.test.js +1 -1
- package/src/commons/UnitSummary/__test__/TotalPowerConsumption.test.js +1 -1
- package/src/commons/ViewButtonBottom/__test__/ViewButtonBottom.test.js +1 -1
- package/src/configs/API.js +14 -31
- package/src/configs/AccessibilityLabel.js +1 -0
- package/src/configs/Colors.js +1 -1
- package/src/configs/Constants.js +14 -48
- package/src/context/reducer.ts +3 -1
- package/src/hoc/__test__/withRemoteControl.test.js +1 -1
- package/src/hooks/Common/__test__/useStatusbar.test.js +5 -5
- package/src/hooks/Common/index.js +0 -2
- package/src/hooks/Common/useKeyboardShow.js +4 -4
- package/src/hooks/Common/useStatusBar.js +2 -2
- package/src/hooks/Common/useTitleHeader.js +5 -7
- package/src/hooks/IoT/__test__/useRemoteControl.test.js +11 -0
- package/src/hooks/IoT/useBluetoothConnection.js +6 -3
- package/src/hooks/index.js +1 -2
- package/src/navigations/UnitStack.js +51 -17
- package/src/screens/ActivityLog/FilterPopup.js +4 -4
- package/src/screens/ActivityLog/__test__/FilterPopup.test.js +2 -2
- package/src/screens/ActivityLog/__test__/index.test.js +2 -2
- package/src/screens/AddCommon/__test__/SelectSubUnit.test.js +3 -3
- package/src/screens/AddCommon/__test__/SelectUnit.test.js +5 -5
- package/src/screens/AddNewAutoSmart/__test__/AddNewAutoSmart.test.js +9 -33
- package/src/screens/AddNewAutoSmart/index.js +33 -89
- package/src/screens/AddNewGateway/PlugAndPlay/__test__/ConnectRouterGuide.test.js +1 -1
- package/src/screens/AddNewGateway/PlugAndPlay/__test__/FirstWarning.test.js +1 -1
- package/src/screens/AddNewGateway/PlugAndPlay/__test__/ZigbeeDeviceConnectGuide.test.js +1 -1
- package/src/screens/AddNewGateway/SelectDeviceSubUnit.js +1 -2
- package/src/screens/AddNewGateway/__test__/AddNewGateway.test.js +5 -17
- package/src/screens/AddNewGateway/__test__/ConnectingWifiGuide.test.js +1 -1
- package/src/screens/AddNewGateway/__test__/ScanGatewayQR.test.js +2 -2
- package/src/screens/AddNewGateway/__test__/ScanModbusQR.test.js +3 -3
- package/src/screens/AddNewGateway/__test__/ScanWifiDeviceQR.test.js +2 -2
- package/src/screens/AddNewGateway/__test__/SelectDeviceSubUnit.test.js +8 -16
- package/src/screens/AddNewGateway/__test__/SelectDeviceUnit.test.js +10 -12
- package/src/screens/AddNewGateway/__test__/SelectModbusGateway.test.js +6 -14
- package/src/screens/AddNewGateway/__test__/SelectZigbeeGateway.test.js +6 -14
- package/src/screens/AddNewGateway/__test__/ShareWifiPassword.test.js +1 -1
- package/src/screens/AddNewGateway/hooks/__Tests__/useWifiManage.test.js +3 -2
- package/src/screens/AddNewGateway/index.js +1 -1
- package/src/screens/AllCamera/__test__/index.test.js +18 -57
- package/src/screens/AllCamera/index.js +100 -33
- package/src/screens/AllGateway/DetailConfigActionZigbee/__test__/index.test.js +0 -18
- package/src/screens/AllGateway/DetailConfigActionZigbee/index.js +1 -1
- package/src/screens/AllGateway/DeviceModbusDetail/__test__/index.test.js +5 -2
- package/src/screens/AllGateway/hooks/__test__/index.test.js +1 -1
- package/src/screens/Automate/AddNewAction/ChooseAction.js +139 -0
- package/src/screens/Automate/AddNewAction/ChooseConfig.js +179 -0
- package/src/screens/{AddNewAction → Automate/AddNewAction}/Components/LoadingSelectAction.js +1 -1
- package/src/screens/Automate/AddNewAction/Components/SelectDevices.js +75 -0
- package/src/screens/{AddNewAction → Automate/AddNewAction}/Device/DeviceStyles.js +5 -1
- package/src/screens/{AddNewAction → Automate/AddNewAction}/Device/__test__/index.test.js +4 -4
- package/src/screens/{AddNewAction → Automate/AddNewAction}/Device/index.js +5 -4
- package/src/screens/Automate/AddNewAction/NewActionWrapper.js +56 -0
- package/src/screens/Automate/AddNewAction/SelectControlDevices.js +69 -0
- package/src/screens/Automate/AddNewAction/SelectMonitorDevices.js +110 -0
- package/src/screens/Automate/AddNewAction/SetupConfigCondition.js +196 -0
- package/src/screens/{AddNewAction → Automate/AddNewAction}/Styles/SelectActionStyles.js +1 -1
- package/src/screens/{AddNewAction → Automate/AddNewAction}/Styles/SelectSensorDevicesStyles.js +1 -1
- package/src/screens/{AddNewAction → Automate/AddNewAction}/Styles/SetupSensorStyles.js +5 -3
- package/src/screens/{AddNewAction/__test__/SelectAction.test.js → Automate/AddNewAction/__test__/ChooseAction.test.js} +101 -122
- package/src/screens/Automate/AddNewAction/__test__/ChooseConfig.test.js +210 -0
- package/src/screens/Automate/AddNewAction/__test__/SelectControlDevices.test.js +130 -0
- package/src/screens/Automate/AddNewAction/__test__/SelectMonitorDevices.test.js +92 -0
- package/src/screens/Automate/AddNewAction/__test__/SetupSensor.test.js +131 -0
- package/src/screens/Automate/Components/InputName.js +64 -0
- package/src/screens/{AddNewOneTap/AddNewOneTapStyles.js → Automate/Components/InputNameStyles.js} +2 -2
- package/src/screens/{EditActionsList → Automate/EditActionsList}/Styles/indexStyles.js +5 -1
- package/src/screens/{EditActionsList → Automate/EditActionsList}/__tests__/index.test.js +20 -12
- package/src/screens/{EditActionsList → Automate/EditActionsList}/index.js +18 -19
- package/src/screens/Automate/MultiUnits.js +70 -68
- package/src/screens/Automate/OneTap/__test__/AddNewOneTap.test.js +134 -0
- package/src/screens/Automate/OneTap/index.js +16 -0
- package/src/screens/Automate/Scenario/ScenarioName.js +15 -0
- package/src/screens/{AddNewOneTap → Automate/Scenario}/__test__/AddNewOneTap.test.js +27 -45
- package/src/screens/Automate/ScriptDetail/Components/DeleteScript.js +45 -0
- package/src/screens/Automate/ScriptDetail/Components/RenameScript.js +58 -0
- package/src/screens/{ScriptDetail → Automate/ScriptDetail}/Styles/indexStyles.js +1 -1
- package/src/screens/{ScriptDetail → Automate/ScriptDetail}/__test__/index.test.js +67 -76
- package/src/screens/{ScriptDetail → Automate/ScriptDetail}/__test__/useStarredScript.test.js +7 -6
- package/src/screens/{ScriptDetail → Automate/ScriptDetail}/hooks/useStarredScript.js +4 -4
- package/src/screens/Automate/ScriptDetail/index.js +346 -0
- package/src/screens/Automate/ScriptDetail/utils.js +113 -0
- package/src/screens/{SetSchedule → Automate/SetSchedule}/__test__/SelectWeekday.test.js +2 -2
- package/src/screens/{SetSchedule → Automate/SetSchedule}/__test__/index.test.js +21 -46
- package/src/screens/{SetSchedule → Automate/SetSchedule}/components/RepeatOptionsPopup.js +4 -4
- package/src/screens/{SetSchedule → Automate/SetSchedule}/components/RowItem.js +2 -2
- package/src/screens/{SetSchedule → Automate/SetSchedule}/components/SelectWeekday.js +3 -3
- package/src/screens/Automate/SetSchedule/index.js +140 -0
- package/src/screens/{SetSchedule → Automate/SetSchedule}/styles/RepeatOptionsPopupStyles.js +1 -1
- package/src/screens/{SetSchedule → Automate/SetSchedule}/styles/RowItemStyles.js +1 -1
- package/src/screens/{SetSchedule → Automate/SetSchedule}/styles/SelectWeekdayStyles.js +1 -1
- package/src/screens/{SetSchedule → Automate/SetSchedule}/styles/indexStyles.js +1 -1
- package/src/screens/Automate/ValueChange/ValueChangeName.js +16 -0
- package/src/screens/Automate/__test__/MultiUnits.test.js +78 -122
- package/src/screens/Automate/__test__/index.test.js +21 -47
- package/src/screens/Automate/constants.js +0 -0
- package/src/screens/Automate/index.js +18 -24
- package/src/screens/ChangePosition/__test__/index.test.js +75 -0
- package/src/screens/ChangePosition/index.js +112 -0
- package/src/screens/ChangePosition/styles.js +87 -0
- package/src/screens/Device/__test__/DetailHistoryChart.test.js +2 -2
- package/src/screens/Device/__test__/EmergencyCountdown.test.js +4 -2
- package/src/screens/Device/__test__/detail.test.js +202 -257
- package/src/screens/Device/__test__/sensorDisplayItem.test.js +14 -10
- package/src/screens/Device/components/ChartWrapper.js +3 -3
- package/src/screens/Device/components/SensorDisplayItem.js +2 -1
- package/src/screens/Device/components/VisualChart.js +56 -9
- package/src/screens/Device/components/__test__/VisualChart.test.js +1 -1
- package/src/screens/Device/detail.js +14 -0
- package/src/screens/Device/hooks/__test__/useEmergencyButton.test.js +35 -13
- package/src/screens/Device/hooks/useEvaluateValue.js +28 -2
- package/src/screens/Device/styles.js +7 -0
- package/src/screens/DeviceInfo/__test__/index.test.js +16 -18
- package/src/screens/DeviceInfo/index.js +6 -5
- package/src/screens/GuestInfo/components/__test__/AccessScheduleSheet.test.js +52 -0
- package/src/screens/MoveToAnotherSubUnit/__test__/index.test.js +18 -13
- package/src/screens/Notification/__test__/Notification.test.js +64 -73
- package/src/screens/Notification/index.js +14 -14
- package/src/screens/PlayBackCamera/index.js +2 -3
- package/src/screens/SelectUnit/__test__/index.test.js +0 -5
- package/src/screens/SelectUnit/index.js +1 -2
- package/src/screens/SharedUnit/index.js +5 -4
- package/src/screens/Sharing/Components/TitleCheckBox.js +2 -2
- package/src/screens/Sharing/SelectUser.js +2 -2
- package/src/screens/Sharing/__test__/MemberList.test.js +9 -15
- package/src/screens/Sharing/__test__/MemberList2.test.js +10 -16
- package/src/screens/Sharing/__test__/SelectUser.test.js +8 -4
- package/src/screens/SideMenuDetail/SideMenuDetailStyles.js +1 -1
- package/src/screens/SmartAccount/SuccessfullyConnected/__test__/SuccessfullyConnected.test.js +3 -3
- package/src/screens/SmartAccount/__test__/Connecting.test.js +1 -1
- package/src/screens/SmartAccount/__test__/SmartAccount.test.js +3 -3
- package/src/screens/SmartAccount/index.js +1 -0
- package/src/screens/SmartIr/__test__/ButtonsBottom.test.js +1 -1
- package/src/screens/SmartIr/__test__/GroupButtonByType.test.js +5 -5
- package/src/screens/SmartIr/__test__/SelectBrand.test.js +2 -2
- package/src/screens/SmartIr/__test__/SelectDeviceType.test.js +2 -2
- package/src/screens/SmartIr/__test__/SmartIr.test.js +2 -2
- package/src/screens/SubUnit/ManageSubUnit.js +4 -4
- package/src/screens/SubUnit/__test__/ManageSubUnit.test.js +9 -28
- package/src/screens/TDSGuide/index.js +1 -1
- package/src/screens/Template/GatewayList.js +4 -1
- package/src/screens/Template/__test__/detail.test.js +24 -22
- package/src/screens/Template/detail.js +1 -0
- package/src/screens/UVIndexGuide/index.js +2 -2
- package/src/screens/Unit/Detail.js +6 -5
- package/src/screens/Unit/SelectAddToFavorites.js +1 -1
- package/src/screens/Unit/__test__/ChooseLocation.test.js +8 -13
- package/src/screens/Unit/__test__/Detail.test.js +10 -14
- package/src/screens/Unit/__test__/SelectAddToFavorites.test.js +1 -1
- package/src/screens/Unit/__test__/SmartAccount.test.js +8 -14
- package/src/screens/Unit/components/__test__/Header.test.js +4 -4
- package/src/screens/UnitSummary/components/3PPowerConsumption/__test__/3PPowerConsumption.test.js +1 -1
- package/src/screens/UnitSummary/components/3PPowerConsumption/index.js +14 -6
- package/src/screens/UnitSummary/components/PowerConsumption/__test__/PowerConsumption.test.js +1 -1
- package/src/screens/UnitSummary/components/Temperature/index.js +2 -2
- package/src/screens/UnitSummary/components/UvIndex/__test__/index.test.js +4 -0
- package/src/screens/UnitSummary/components/UvIndex/index.js +2 -2
- package/src/screens/UnitSummary/components/WaterQuality/__test__/index.test.js +6 -11
- package/src/screens/UnitSummary/components/WaterQuality/index.js +2 -2
- package/src/screens/UnitSummary/components/__test__/TotalPowerBox.test.js +1 -1
- package/src/screens/UnitSummary/components/__test__/TotalPowerConsumption.test.js +1 -1
- package/src/screens/UnitSummary/components/__test__/index.test.js +2 -2
- package/src/screens/WaterQualityGuide/index.js +10 -5
- package/src/utils/Apis/axios.js +3 -0
- package/src/utils/I18n/translations/en.json +24 -18
- package/src/utils/I18n/translations/vi.json +22 -18
- package/src/utils/Route/index.js +9 -3
- package/src/utils/Utils.js +29 -0
- package/src/utils/__test__/Utils.test.js +6 -0
- package/src/commons/ActionGroup/CurtainButtonTemplate.js +0 -130
- package/src/commons/ActionGroup/__test__/CurtainButtonTemplate.test.js +0 -109
- package/src/commons/Auth/SocialButton.js +0 -54
- package/src/commons/Auth/__test__/SocialButton.test.js +0 -44
- package/src/commons/Sharing/__test__/StationDevicePermission.test.js +0 -85
- package/src/hooks/__test__/useInitDeepLink.test.js +0 -28
- package/src/hooks/useInitDeepLink.js +0 -25
- package/src/screens/AddNewAction/SelectAction.js +0 -570
- package/src/screens/AddNewAction/SelectSensorDevices.js +0 -236
- package/src/screens/AddNewAction/SetupSensor.js +0 -263
- package/src/screens/AddNewAction/__test__/SelectSensorDevices.test.js +0 -181
- package/src/screens/AddNewAction/__test__/SetupSensor.test.js +0 -114
- package/src/screens/AddNewOneTap/index.js +0 -147
- package/src/screens/ScriptDetail/hooks/index.js +0 -136
- package/src/screens/ScriptDetail/index.js +0 -525
- package/src/screens/SetSchedule/index.js +0 -200
- /package/src/screens/{AddNewAction → Automate/AddNewAction}/Components/index.js +0 -0
- /package/src/screens/{AddNewAction → Automate/AddNewAction}/__test__/LoadingSelectAction.test.js +0 -0
|
@@ -2,7 +2,7 @@ import React from 'react';
|
|
|
2
2
|
import { Alert, ScrollView } from 'react-native';
|
|
3
3
|
import { act, create } from 'react-test-renderer';
|
|
4
4
|
import MockAdapter from 'axios-mock-adapter';
|
|
5
|
-
import { NavigationContext } from '@react-navigation/native';
|
|
5
|
+
import { NavigationContext, useNavigation } from '@react-navigation/native';
|
|
6
6
|
|
|
7
7
|
import DeviceDetail from '../detail';
|
|
8
8
|
import { API } from '../../../configs';
|
|
@@ -19,20 +19,10 @@ import { mockSCStore } from '../../../context/mockStore';
|
|
|
19
19
|
import Routes from '../../../utils/Route';
|
|
20
20
|
import api from '../../../utils/Apis/axios';
|
|
21
21
|
|
|
22
|
-
const mockedNavigate = jest.fn();
|
|
23
22
|
const mockedDispatch = jest.fn();
|
|
24
23
|
|
|
25
24
|
const mock = new MockAdapter(api.axiosInstance);
|
|
26
25
|
|
|
27
|
-
jest.mock('@react-navigation/native', () => {
|
|
28
|
-
return {
|
|
29
|
-
...jest.requireActual('@react-navigation/native'),
|
|
30
|
-
useNavigation: () => ({
|
|
31
|
-
navigate: mockedNavigate,
|
|
32
|
-
}),
|
|
33
|
-
};
|
|
34
|
-
});
|
|
35
|
-
|
|
36
26
|
jest.mock('react-redux', () => {
|
|
37
27
|
return {
|
|
38
28
|
...jest.requireActual('react-redux'),
|
|
@@ -44,12 +34,6 @@ jest.mock('react-redux', () => {
|
|
|
44
34
|
};
|
|
45
35
|
});
|
|
46
36
|
|
|
47
|
-
jest.mock('react', () => ({
|
|
48
|
-
...jest.requireActual('react'),
|
|
49
|
-
useLayoutEffect: jest.fn(),
|
|
50
|
-
memo: (x) => x,
|
|
51
|
-
}));
|
|
52
|
-
|
|
53
37
|
jest.mock('../../../hooks/Common', () => {
|
|
54
38
|
return {
|
|
55
39
|
...jest.requireActual('../../../hooks/Common'),
|
|
@@ -62,13 +46,13 @@ const mockAxios = (
|
|
|
62
46
|
responseDisplayValueV2,
|
|
63
47
|
responseRemoteControl = {}
|
|
64
48
|
) => {
|
|
65
|
-
mock.onGet(API.DEVICE.DISPLAY(1)).reply(200, responseDisplay
|
|
49
|
+
mock.onGet(API.DEVICE.DISPLAY(1)).reply(200, responseDisplay);
|
|
66
50
|
mock
|
|
67
51
|
.onGet(API.DEVICE.REMOTE_CONTROL_OPTIONS(1))
|
|
68
|
-
.reply(200, responseRemoteControl
|
|
52
|
+
.reply(200, responseRemoteControl);
|
|
69
53
|
mock
|
|
70
54
|
.onGet(API.DEVICE.DISPLAY_VALUES_V2(1))
|
|
71
|
-
.reply(200, responseDisplayValueV2
|
|
55
|
+
.reply(200, responseDisplayValueV2);
|
|
72
56
|
};
|
|
73
57
|
|
|
74
58
|
let store = mockSCStore({});
|
|
@@ -97,6 +81,7 @@ describe('test DeviceDetail', () => {
|
|
|
97
81
|
let tree;
|
|
98
82
|
let route;
|
|
99
83
|
let account;
|
|
84
|
+
const mockedNavigate = useNavigation().navigate;
|
|
100
85
|
|
|
101
86
|
beforeEach(() => {
|
|
102
87
|
route = {
|
|
@@ -132,7 +117,7 @@ describe('test DeviceDetail', () => {
|
|
|
132
117
|
account = {
|
|
133
118
|
token: 'abc',
|
|
134
119
|
};
|
|
135
|
-
jest.
|
|
120
|
+
jest.useFakeTimers();
|
|
136
121
|
const setState = jest.fn();
|
|
137
122
|
const useLayoutEffectSpy = jest.spyOn(React, 'useLayoutEffect');
|
|
138
123
|
useLayoutEffectSpy.mockImplementation(() => setState);
|
|
@@ -160,7 +145,7 @@ describe('test DeviceDetail', () => {
|
|
|
160
145
|
'http://admin:admin123@203.205.32.86:10080/Streaming/Channels/2/picture',
|
|
161
146
|
uri: 'rtsp://admin:admin123@203.205.32.86:10554/Streaming/Channels/1/',
|
|
162
147
|
},
|
|
163
|
-
id:
|
|
148
|
+
id: 18,
|
|
164
149
|
order: 1,
|
|
165
150
|
template: 'camera',
|
|
166
151
|
type: 'camera',
|
|
@@ -212,7 +197,7 @@ describe('test DeviceDetail', () => {
|
|
|
212
197
|
text3: 'DOWN',
|
|
213
198
|
},
|
|
214
199
|
},
|
|
215
|
-
id:
|
|
200
|
+
id: 19,
|
|
216
201
|
order: 2,
|
|
217
202
|
template: 'action',
|
|
218
203
|
type: 'action',
|
|
@@ -221,29 +206,20 @@ describe('test DeviceDetail', () => {
|
|
|
221
206
|
side_menu_items: [{ id: 1, order: 1, name: 'Setup generate passcode' }],
|
|
222
207
|
};
|
|
223
208
|
it('render DeviceDetail render SensorDisplayItem', async () => {
|
|
224
|
-
const responseDisplay =
|
|
225
|
-
status: 200,
|
|
226
|
-
data: data_sensor_display,
|
|
227
|
-
};
|
|
209
|
+
const responseDisplay = data_sensor_display;
|
|
228
210
|
|
|
229
211
|
const responseRemoteControl = {
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
address: 'JUvfa06PMDU8Cqlo',
|
|
234
|
-
password: 'MYcNoskxspWTPsnh',
|
|
235
|
-
},
|
|
236
|
-
internet: {},
|
|
212
|
+
bluetooth: {
|
|
213
|
+
address: 'JUvfa06PMDU8Cqlo',
|
|
214
|
+
password: 'MYcNoskxspWTPsnh',
|
|
237
215
|
},
|
|
216
|
+
internet: {},
|
|
238
217
|
};
|
|
239
218
|
|
|
240
219
|
const responseDisplayValueV2 = {
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
is_connected: true,
|
|
245
|
-
last_updated: '2021-01-24T12:00:00.000Z',
|
|
246
|
-
},
|
|
220
|
+
configs: [],
|
|
221
|
+
is_connected: true,
|
|
222
|
+
last_updated: '2021-01-24T12:00:00.000Z',
|
|
247
223
|
};
|
|
248
224
|
|
|
249
225
|
mockAxios(responseDisplay, responseDisplayValueV2, responseRemoteControl);
|
|
@@ -251,6 +227,7 @@ describe('test DeviceDetail', () => {
|
|
|
251
227
|
await act(async () => {
|
|
252
228
|
tree = await create(wrapComponent(store, account, route));
|
|
253
229
|
});
|
|
230
|
+
jest.useFakeTimers();
|
|
254
231
|
|
|
255
232
|
const instance = tree.root;
|
|
256
233
|
const sensorDisplayItem = instance.findAll(
|
|
@@ -385,138 +362,132 @@ describe('test DeviceDetail', () => {
|
|
|
385
362
|
|
|
386
363
|
it('Should render SensorDisplayItem', async () => {
|
|
387
364
|
const responseDisplay = {
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
uri: 'http://123121',
|
|
400
|
-
preview_uri: 'http://123121',
|
|
401
|
-
},
|
|
365
|
+
items: [
|
|
366
|
+
{
|
|
367
|
+
id: 0,
|
|
368
|
+
order: 1,
|
|
369
|
+
template: 'camera',
|
|
370
|
+
type: 'camera',
|
|
371
|
+
configuration: {
|
|
372
|
+
id: 2,
|
|
373
|
+
name: 'E',
|
|
374
|
+
uri: 'http://123121',
|
|
375
|
+
preview_uri: 'http://123121',
|
|
402
376
|
},
|
|
403
|
-
|
|
377
|
+
},
|
|
378
|
+
{
|
|
379
|
+
id: 1,
|
|
380
|
+
order: 2,
|
|
381
|
+
template: 'action',
|
|
382
|
+
type: 'action',
|
|
383
|
+
configuration: {
|
|
404
384
|
id: 1,
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
type: 'action',
|
|
385
|
+
template: 'three_button_action_template',
|
|
386
|
+
title: '',
|
|
408
387
|
configuration: {
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
googlehome_actions: [],
|
|
448
|
-
command_prefer_over_internet: false,
|
|
449
|
-
command_prefer_over_bluetooth: true,
|
|
450
|
-
command_prefer_over_googlehome: false,
|
|
451
|
-
},
|
|
388
|
+
action1: 'a',
|
|
389
|
+
action2: 'b',
|
|
390
|
+
action3: 'b',
|
|
391
|
+
icon1: 'caret-up',
|
|
392
|
+
icon2: 'stop',
|
|
393
|
+
icon3: 'caret-down',
|
|
394
|
+
text1: 'A',
|
|
395
|
+
text2: 'B',
|
|
396
|
+
text3: 'C',
|
|
397
|
+
action1_data: {
|
|
398
|
+
id: 9,
|
|
399
|
+
key: 'a',
|
|
400
|
+
icon: 'caret-up',
|
|
401
|
+
color: '#00979D',
|
|
402
|
+
googlehome_actions: [],
|
|
403
|
+
command_prefer_over_internet: false,
|
|
404
|
+
command_prefer_over_bluetooth: true,
|
|
405
|
+
command_prefer_over_googlehome: false,
|
|
406
|
+
},
|
|
407
|
+
action2_data: {
|
|
408
|
+
id: 11,
|
|
409
|
+
key: 'c',
|
|
410
|
+
icon: 'stop',
|
|
411
|
+
color: '#00979D',
|
|
412
|
+
googlehome_actions: [],
|
|
413
|
+
command_prefer_over_internet: false,
|
|
414
|
+
command_prefer_over_bluetooth: true,
|
|
415
|
+
command_prefer_over_googlehome: false,
|
|
416
|
+
},
|
|
417
|
+
action3_data: {
|
|
418
|
+
id: 10,
|
|
419
|
+
key: 'b',
|
|
420
|
+
icon: 'caret-down',
|
|
421
|
+
color: '#00979D',
|
|
422
|
+
googlehome_actions: [],
|
|
423
|
+
command_prefer_over_internet: false,
|
|
424
|
+
command_prefer_over_bluetooth: true,
|
|
425
|
+
command_prefer_over_googlehome: false,
|
|
452
426
|
},
|
|
453
427
|
},
|
|
454
428
|
},
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
429
|
+
},
|
|
430
|
+
{
|
|
431
|
+
id: 3,
|
|
432
|
+
order: 3,
|
|
433
|
+
template: 'action',
|
|
434
|
+
type: 'action',
|
|
435
|
+
configuration: {
|
|
436
|
+
id: 25,
|
|
437
|
+
template: 'one_button_action_template',
|
|
438
|
+
title: '',
|
|
460
439
|
configuration: {
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
440
|
+
action: 'd',
|
|
441
|
+
icon: 'lock',
|
|
442
|
+
text: 'd',
|
|
443
|
+
action_data: {
|
|
444
|
+
id: 77,
|
|
445
|
+
key: 'd',
|
|
466
446
|
icon: 'lock',
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
color: '#00979D',
|
|
473
|
-
googlehome_actions: [],
|
|
474
|
-
command_prefer_over_internet: false,
|
|
475
|
-
command_prefer_over_bluetooth: true,
|
|
476
|
-
command_prefer_over_googlehome: false,
|
|
477
|
-
},
|
|
447
|
+
color: '#00979D',
|
|
448
|
+
googlehome_actions: [],
|
|
449
|
+
command_prefer_over_internet: false,
|
|
450
|
+
command_prefer_over_bluetooth: true,
|
|
451
|
+
command_prefer_over_googlehome: false,
|
|
478
452
|
},
|
|
479
453
|
},
|
|
480
454
|
},
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
455
|
+
},
|
|
456
|
+
{
|
|
457
|
+
id: 170,
|
|
458
|
+
order: 1,
|
|
459
|
+
template: 'value',
|
|
460
|
+
type: 'value',
|
|
461
|
+
configuration: {
|
|
462
|
+
type: 'simple_list',
|
|
463
|
+
configs: [
|
|
464
|
+
{
|
|
465
|
+
id: 428,
|
|
466
|
+
standard: 'Temperature',
|
|
467
|
+
measure: '°C',
|
|
468
|
+
color: 'red',
|
|
469
|
+
unit: '°C',
|
|
470
|
+
},
|
|
471
|
+
],
|
|
498
472
|
},
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
id: 17,
|
|
505
|
-
order: 1,
|
|
506
|
-
template: 'emergency',
|
|
507
|
-
type: 'emergency',
|
|
473
|
+
},
|
|
474
|
+
{
|
|
475
|
+
configuration: {
|
|
476
|
+
id: 3,
|
|
477
|
+
name: 'Emergency',
|
|
508
478
|
},
|
|
509
|
-
|
|
510
|
-
|
|
479
|
+
id: 17,
|
|
480
|
+
order: 1,
|
|
481
|
+
template: 'emergency',
|
|
482
|
+
type: 'emergency',
|
|
483
|
+
},
|
|
484
|
+
],
|
|
511
485
|
};
|
|
512
486
|
|
|
513
487
|
const responseDisplayValueV2 = {
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
is_connected: true,
|
|
518
|
-
last_updated: '2021-01-24T12:00:00.000Z',
|
|
519
|
-
},
|
|
488
|
+
configs: [],
|
|
489
|
+
is_connected: true,
|
|
490
|
+
last_updated: '2021-01-24T12:00:00.000Z',
|
|
520
491
|
};
|
|
521
492
|
|
|
522
493
|
mockAxios(responseDisplay, responseDisplayValueV2);
|
|
@@ -535,53 +506,47 @@ describe('test DeviceDetail', () => {
|
|
|
535
506
|
|
|
536
507
|
it('render SensorDisplayItem emercency', async () => {
|
|
537
508
|
const responseDisplay = {
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
509
|
+
items: [
|
|
510
|
+
{
|
|
511
|
+
id: 1,
|
|
512
|
+
order: 1,
|
|
513
|
+
template: 'emergency',
|
|
514
|
+
type: 'emergency',
|
|
515
|
+
configuration: {
|
|
516
|
+
camera: null,
|
|
517
|
+
device: {
|
|
518
|
+
configs: { id: 521, value: null, time: null },
|
|
519
|
+
last_event: { id: 374, reportedAt: '' },
|
|
520
|
+
id: 1,
|
|
521
|
+
group: {
|
|
551
522
|
id: 1,
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
{ id: 3, group: 1, name: 'user1', phone_number: '' },
|
|
568
|
-
],
|
|
569
|
-
},
|
|
523
|
+
contacts: [
|
|
524
|
+
{
|
|
525
|
+
id: 1,
|
|
526
|
+
group: 1,
|
|
527
|
+
name: 'user1',
|
|
528
|
+
phone_number: '038111111',
|
|
529
|
+
},
|
|
530
|
+
{
|
|
531
|
+
id: 2,
|
|
532
|
+
group: 1,
|
|
533
|
+
name: 'user1',
|
|
534
|
+
phone_number: '038111112',
|
|
535
|
+
},
|
|
536
|
+
{ id: 3, group: 1, name: 'user1', phone_number: '' },
|
|
537
|
+
],
|
|
570
538
|
},
|
|
571
|
-
title: '',
|
|
572
539
|
},
|
|
540
|
+
title: '',
|
|
573
541
|
},
|
|
574
|
-
|
|
575
|
-
|
|
542
|
+
},
|
|
543
|
+
],
|
|
576
544
|
};
|
|
577
545
|
|
|
578
546
|
const responseDisplayValueV2 = {
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
is_connected: true,
|
|
583
|
-
last_updated: '2021-01-24T12:00:00.000Z',
|
|
584
|
-
},
|
|
547
|
+
configs: [],
|
|
548
|
+
is_connected: true,
|
|
549
|
+
last_updated: '2021-01-24T12:00:00.000Z',
|
|
585
550
|
};
|
|
586
551
|
|
|
587
552
|
mockAxios(responseDisplay, responseDisplayValueV2);
|
|
@@ -600,36 +565,30 @@ describe('test DeviceDetail', () => {
|
|
|
600
565
|
|
|
601
566
|
it('render CurrentRainSensor', async () => {
|
|
602
567
|
const responseDisplay = {
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
},
|
|
619
|
-
],
|
|
620
|
-
},
|
|
568
|
+
items: [
|
|
569
|
+
{
|
|
570
|
+
id: 170,
|
|
571
|
+
order: 1,
|
|
572
|
+
template: 'value',
|
|
573
|
+
configuration: {
|
|
574
|
+
type: 'circle',
|
|
575
|
+
configs: [
|
|
576
|
+
{
|
|
577
|
+
id: 428,
|
|
578
|
+
color: 'red',
|
|
579
|
+
standard: 'Temperature',
|
|
580
|
+
measure: '°C',
|
|
581
|
+
},
|
|
582
|
+
],
|
|
621
583
|
},
|
|
622
|
-
|
|
623
|
-
|
|
584
|
+
},
|
|
585
|
+
],
|
|
624
586
|
};
|
|
625
587
|
|
|
626
588
|
const responseDisplayValueV2 = {
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
is_connected: true,
|
|
631
|
-
last_updated: '2021-01-24T12:00:00.000Z',
|
|
632
|
-
},
|
|
589
|
+
configs: [{ id: 428 }],
|
|
590
|
+
is_connected: true,
|
|
591
|
+
last_updated: '2021-01-24T12:00:00.000Z',
|
|
633
592
|
};
|
|
634
593
|
|
|
635
594
|
mockAxios(responseDisplay, responseDisplayValueV2);
|
|
@@ -722,35 +681,29 @@ describe('test DeviceDetail', () => {
|
|
|
722
681
|
|
|
723
682
|
it('Go to ActivityLog', async () => {
|
|
724
683
|
const responseDisplay = {
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
684
|
+
items: [
|
|
685
|
+
{
|
|
686
|
+
configuration: {
|
|
687
|
+
template: 'OnOffSimpleActionTemplate',
|
|
729
688
|
configuration: {
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
icon: 'up',
|
|
734
|
-
is_on_value: [],
|
|
735
|
-
},
|
|
736
|
-
title: 'Turn on / off',
|
|
689
|
+
config: 5,
|
|
690
|
+
icon: 'up',
|
|
691
|
+
is_on_value: [],
|
|
737
692
|
},
|
|
738
|
-
|
|
739
|
-
order: 2,
|
|
740
|
-
template: 'action',
|
|
741
|
-
type: 'action',
|
|
693
|
+
title: 'Turn on / off',
|
|
742
694
|
},
|
|
743
|
-
|
|
744
|
-
|
|
695
|
+
id: 18,
|
|
696
|
+
order: 2,
|
|
697
|
+
template: 'action',
|
|
698
|
+
type: 'action',
|
|
699
|
+
},
|
|
700
|
+
],
|
|
745
701
|
};
|
|
746
702
|
|
|
747
703
|
const responseDisplayValueV2 = {
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
is_connected: true,
|
|
752
|
-
last_updated: '2021-01-24T12:00:00.000Z',
|
|
753
|
-
},
|
|
704
|
+
configs: [],
|
|
705
|
+
is_connected: true,
|
|
706
|
+
last_updated: '2021-01-24T12:00:00.000Z',
|
|
754
707
|
};
|
|
755
708
|
|
|
756
709
|
mockAxios(responseDisplay, responseDisplayValueV2);
|
|
@@ -779,20 +732,12 @@ describe('test DeviceDetail', () => {
|
|
|
779
732
|
it('Open popup ble when server down', async () => {
|
|
780
733
|
store.bluetooth.isEnabled = false;
|
|
781
734
|
data_sensor_display.items[2].configuration.configuration.action1_data.command_prefer_over_bluetooth = true;
|
|
782
|
-
const responseDisplay =
|
|
783
|
-
status: 200,
|
|
784
|
-
data: data_sensor_display,
|
|
785
|
-
resp_status: 503,
|
|
786
|
-
};
|
|
735
|
+
const responseDisplay = data_sensor_display;
|
|
787
736
|
|
|
788
737
|
const responseDisplayValueV2 = {
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
configs: [],
|
|
793
|
-
is_connected: true,
|
|
794
|
-
last_updated: '2021-01-24T12:00:00.000Z',
|
|
795
|
-
},
|
|
738
|
+
configs: [],
|
|
739
|
+
is_connected: true,
|
|
740
|
+
last_updated: '2021-01-24T12:00:00.000Z',
|
|
796
741
|
};
|
|
797
742
|
|
|
798
743
|
mockAxios(responseDisplay, responseDisplayValueV2);
|