@eohjsc/react-native-smart-city 0.2.99 → 0.3.2
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/README.md +1 -1
- package/package.json +6 -4
- package/react-native-smart-city.podspec +1 -0
- package/src/commons/Action/ItemQuickAction.js +11 -2
- package/src/commons/Action/__test__/ItemQuickAction.test.js +11 -6
- package/src/commons/ActionGroup/CurtainButtonTemplate.js +10 -5
- package/src/commons/ActionGroup/NumberUpDownActionTemplate.js +31 -20
- package/src/commons/ActionGroup/OnOffSmartLock/AutoLock/__test__/index.test.js +4 -0
- package/src/commons/ActionGroup/OnOffSmartLock/PasscodeList/ItemPasscode.js +1 -1
- package/src/commons/ActionGroup/OnOffSmartLock/PasscodeList/__test__/ItemPasscode.test.js +24 -0
- package/src/commons/ActionGroup/OnOffSmartLock/SetupGeneratePasscode/__test__/index.test.js +14 -0
- package/src/commons/ActionGroup/OptionsDropdownActionTemplate.js +1 -1
- package/src/commons/ActionGroup/SmartTiviActionTemplate/SmartTiviActionTemplate.js +3 -2
- package/src/commons/ActionGroup/StatesGridActionTemplate.js +8 -4
- package/src/commons/ActionGroup/TimerActionTemplate.js +2 -2
- package/src/commons/ActionGroup/TwoButtonTemplate/index.js +0 -1
- package/src/commons/ActionGroup/__test__/CurtainButtonTemplate.test.js +53 -4
- package/src/commons/ActionGroup/__test__/NumberUpDownTemplate.test.js +45 -48
- package/src/commons/ActionGroup/__test__/StatesGridActionTemplate.test.js +77 -0
- package/src/commons/ActionGroup/__test__/TimerActionTemplate.test.js +58 -6
- package/src/commons/ActionGroup/__test__/TwoButtonTemplate.test.js +49 -1
- package/src/commons/ActionGroup/__test__/index.test.js +137 -2
- package/src/commons/Automate/ItemAutomate.js +1 -3
- package/src/commons/Calendar/__test__/Calendar.test.js +33 -0
- package/src/commons/Connecting/__test__/Connecting.test.js +19 -2
- package/src/commons/ConnectingProcess/DeviceItem/DeviceItem.js +7 -3
- package/src/commons/ConnectingProcess/DeviceItem/DeviceItemStyles.js +8 -11
- package/src/commons/ConnectingProcess/__test__/Connecting.test.js +136 -3
- package/src/commons/ConnectingProcess/__test__/DeviceItem.test.js +3 -2
- package/src/commons/ConnectingProcess/index.js +72 -25
- package/src/commons/Dashboard/MyPinnedSharedUnit/__test__/MyPinnedSharedUnit.test.js +16 -13
- package/src/commons/Dashboard/MyPinnedSharedUnit/index.js +1 -1
- package/src/commons/Dashboard/MyUnit/__test__/MyUnit.test.js +0 -5
- package/src/commons/Device/ConnectedViewHeader.js +1 -1
- package/src/commons/Device/Hanet/ItemHanetDevice.test.js +58 -0
- package/src/commons/Device/HistoryChart.js +3 -3
- package/src/commons/Device/ItemDevice.js +15 -11
- package/src/commons/Device/LinearChart.js +15 -0
- package/src/commons/Device/SonosSpeaker/index.js +1 -1
- package/src/commons/Explore/__test__/CityItem.test.js +33 -54
- package/src/commons/FieldTemplate/ChooseUserField/__test__/index.test.js +19 -14
- package/src/commons/FieldTemplate/PasscodeField/__test__/index.test.js +0 -3
- package/src/commons/FieldTemplate/ScheduleField/__test__/index.test.js +0 -3
- package/src/commons/FieldTemplate/ScheduleField/index.js +2 -2
- package/src/commons/Header/HeaderCustom.js +2 -1
- package/src/commons/HorizontalPicker/index.js +2 -2
- package/src/commons/MediaPlayerDetail/Styles/MediaPlayerDetailStyles.js +0 -6
- package/src/commons/MediaPlayerDetail/index.js +24 -55
- package/src/commons/Sharing/__test__/DevicePermissionsCheckbox.test.js +0 -1
- package/src/commons/SubUnit/Favorites/index.js +2 -3
- package/src/commons/SubUnit/OneTap/__test__/SubUnitAutomate.test.js +8 -35
- package/src/commons/SubUnit/OneTap/index.js +1 -2
- package/src/commons/SubUnit/ShortDetail.js +25 -9
- package/src/commons/SubUnit/__test__/Item.test.js +0 -1
- package/src/commons/SubUnit/__test__/ShortDetail.test.js +8 -1
- package/src/commons/Unit/SharedUnit.js +1 -0
- package/src/commons/Unit/__test__/SharedUnit.test.js +38 -183
- package/src/commons/UnitSummary/ConfigHistoryChart/index.js +2 -13
- package/src/commons/UnitSummary/ConfigHistoryChart.js +22 -13
- package/src/commons/WheelDateTimePicker/index.js +2 -2
- package/src/configs/API.js +85 -144
- package/src/configs/Constants.js +24 -0
- package/src/configs/SCConfig.js +2 -0
- package/src/context/actionType.ts +8 -0
- package/src/context/mockStore.ts +10 -0
- package/src/context/reducer.ts +38 -2
- package/src/hooks/Common/index.js +2 -0
- package/src/hooks/Common/useGGHomeDeviceConnected.js +16 -0
- package/src/hooks/Common/useGetIdUser.js +1 -5
- package/src/hooks/Common/useSensorsStatus.js +4 -4
- package/src/hooks/IoT/__test__/useGGHomeConnection.test.js +198 -0
- package/src/hooks/IoT/__test__/useRemoteControl.test.js +198 -0
- package/src/hooks/IoT/index.js +4 -0
- package/src/hooks/IoT/useGGHomeConnection.js +91 -0
- package/src/hooks/IoT/useRemoteControl.js +79 -0
- package/src/hooks/index.js +4 -0
- package/src/hooks/useReceiveNotifications.js +9 -5
- package/src/iot/Monitor.js +3 -2
- package/src/iot/RemoteControl/Bluetooth.js +1 -1
- package/src/iot/RemoteControl/GoogleHome.js +75 -49
- package/src/iot/RemoteControl/Internet.js +1 -1
- package/src/iot/RemoteControl/__test__/GoogleHome.test.js +95 -48
- package/src/iot/RemoteControl/__test__/Internet.test.js +18 -7
- package/src/iot/RemoteControl/__test__/LgThinq.test.js +36 -177
- package/src/iot/RemoteControl/index.js +52 -52
- package/src/screens/ActivityLog/__test__/index.test.js +38 -23
- package/src/screens/ActivityLog/hooks/__test__/index.test.js +51 -90
- package/src/screens/ActivityLog/hooks/index.js +1 -1
- package/src/screens/ActivityLog/index.js +2 -2
- package/src/screens/AddCommon/__test__/SelectSubUnit.test.js +13 -24
- package/src/screens/AddCommon/__test__/SelectUnit.test.js +9 -33
- package/src/screens/AddLocationMaps/index.js +5 -4
- package/src/screens/AddNewAction/SelectAction.js +8 -8
- package/src/screens/AddNewAction/SetupSensor.js +7 -7
- package/src/screens/AddNewAction/__test__/SelectAction.test.js +10 -91
- package/src/screens/AddNewAction/__test__/SelectSensorDevices.test.js +40 -26
- package/src/screens/AddNewDevice/ConnectingDevices.js +3 -3
- package/src/screens/AddNewDevice/__test__/AddNewDevice.test.js +34 -33
- package/src/screens/AddNewDevice/__test__/ConnectDevices.test.js +0 -4
- package/src/screens/AddNewDevice/__test__/ConnectingDevices.test.js +21 -21
- package/src/screens/AddNewDevice/hooks/ConnectDevices.js +1 -1
- package/src/screens/AddNewGateway/PlugAndPlay/ConnectWifiWarning.js +23 -17
- package/src/screens/AddNewGateway/PlugAndPlay/GatewayWifiList.js +3 -3
- package/src/screens/AddNewGateway/SetupGatewayWifi.js +1 -0
- package/src/screens/AddNewGateway/__test__/AddNewGateway.test.js +4 -6
- package/src/screens/AddNewGateway/__test__/ConnectedGateway.test.js +0 -4
- package/src/screens/AddNewGateway/__test__/ConnectingGateway.test.js +5 -29
- package/src/screens/AddNewGateway/__test__/SelectGateway.test.js +0 -4
- package/src/screens/AddNewGateway/__test__/SetupGateway.test.js +0 -4
- package/src/screens/AddNewOneTap/__test__/AddNewOneTap.test.js +9 -23
- package/src/screens/AllCamera/index.js +4 -4
- package/src/screens/Automate/MultiUnits.js +8 -8
- package/src/screens/Automate/__test__/MultiUnits.test.js +6 -9
- package/src/screens/Automate/__test__/index.test.js +7 -12
- package/src/screens/Automate/index.js +3 -3
- package/src/screens/ConfirmUnitDeletion/__test__/ConfirmUnitDeletion.test.js +36 -8
- package/src/screens/ConfirmUnitDeletion/index.js +7 -1
- package/src/screens/Device/EditDevice/__test__/EditDevice.test.js +71 -22
- package/src/screens/Device/EditDevice/index.js +2 -2
- package/src/screens/Device/__test__/detail.test.js +32 -85
- package/src/screens/Device/components/DetailHistoryChart.js +1 -1
- package/src/screens/Device/components/SensorConnectStatusViewHeader.js +1 -0
- package/src/screens/Device/components/SensorDisplayItem.js +5 -2
- package/src/screens/Device/detail.js +53 -22
- package/src/screens/Device/hooks/useDisconnectedDevice.js +4 -4
- package/src/screens/Device/hooks/useFavoriteDevice.js +5 -9
- package/src/screens/DeviceInfo/__test__/index.test.js +0 -2
- package/src/screens/EditActionsList/index.js +1 -1
- package/src/screens/EmergencyContacts/EmergencyContactsSelectContacts.js +1 -1
- package/src/screens/EmergencyContacts/__test__/EmergencyContactAddNew.test.js +7 -19
- package/src/screens/EmergencyContacts/__test__/EmergencyContactList.test.js +18 -14
- package/src/screens/EmergencyContacts/__test__/EmergencyContactsSelectContacts.test.js +30 -31
- package/src/screens/EmergencySetting/components/DropDownItem.js +2 -2
- package/src/screens/EnterPassword/__test__/EnterPassword.test.js +41 -25
- package/src/screens/GuestInfo/__test__/index.test.js +13 -40
- package/src/screens/HanetCamera/Detail.js +1 -1
- package/src/screens/HanetCamera/__test__/CaptureFaceID.test.js +8 -12
- package/src/screens/HanetCamera/__test__/Detail.test.js +27 -42
- package/src/screens/HanetCamera/__test__/ManageAccess.test.js +8 -5
- package/src/screens/HanetCamera/__test__/MemberInfo.test.js +10 -32
- package/src/screens/HanetCamera/components/RequestFaceIDPopup.js +3 -2
- package/src/screens/HanetCamera/hooks/__test__/useHanetCheckinData.test.js +43 -35
- package/src/screens/HanetCamera/hooks/__test__/useHanetPlaceMembers.test.js +10 -21
- package/src/screens/HanetCamera/hooks/useHanetCheckinData.js +11 -11
- package/src/screens/HanetCamera/hooks/useHanetPlaceMembers.js +11 -11
- package/src/screens/ManageAccess/__test__/ManageAccess.test.js +33 -22
- package/src/screens/ManageAccess/hooks/__test__/useManageAccess.test.js +44 -45
- package/src/screens/ManageAccess/hooks/index.js +7 -4
- package/src/screens/ManageAccess/index.js +1 -1
- package/src/screens/MoveToAnotherSubUnit/__test__/index.test.js +35 -12
- package/src/screens/MoveToAnotherSubUnit/index.js +5 -5
- package/src/screens/Notification/__test__/Notification.test.js +14 -25
- package/src/screens/Notification/__test__/NotificationItem.test.js +8 -7
- package/src/screens/Notification/components/NotificationItem.js +17 -20
- package/src/screens/Notification/index.js +9 -2
- package/src/screens/PlayBackCamera/Timer.js +2 -2
- package/src/screens/PlayBackCamera/__test__/index.test.js +87 -2
- package/src/screens/PlayBackCamera/index.js +22 -6
- package/src/screens/ScanChipQR/__test__/ScanChipQR.test.js +7 -20
- package/src/screens/ScanChipQR/hooks/index.js +15 -16
- package/src/screens/ScanSensorQR/__test__/ScanSensorQR.test.js +8 -24
- package/src/screens/ScriptDetail/__test__/index.test.js +17 -86
- package/src/screens/ScriptDetail/index.js +16 -11
- package/src/screens/SelectUnit/__test__/index.test.js +11 -54
- package/src/screens/SelectUnit/index.js +4 -2
- package/src/screens/SetSchedule/index.js +9 -9
- package/src/screens/SharedUnit/__test__/TabHeader.test.js +0 -2
- package/src/screens/Sharing/Components/SensorItem.js +10 -12
- package/src/screens/Sharing/InfoMemberUnit.js +1 -1
- package/src/screens/Sharing/SelectPermission.js +121 -76
- package/src/screens/Sharing/__test__/InfoMemberUnit.test.js +47 -29
- package/src/screens/Sharing/__test__/MemberList.test.js +13 -127
- package/src/screens/Sharing/__test__/MemberList2.test.js +80 -0
- package/src/screens/Sharing/__test__/SelectPermission.test.js +28 -38
- package/src/screens/Sharing/__test__/SelectUser.test.js +17 -38
- package/src/screens/SideMenuDetail/__test__/index.test.js +12 -23
- package/src/screens/SideMenuDetail/index.js +2 -3
- package/src/screens/SmartIr/components/GroupButtonByType/GroupButtonByType.js +3 -2
- package/src/screens/SubUnit/Detail.js +1 -2
- package/src/screens/SubUnit/ManageSubUnit.js +12 -7
- package/src/screens/SubUnit/__test__/AddSubUnit.test.js +21 -67
- package/src/screens/SubUnit/__test__/Detail.test.js +31 -8
- package/src/screens/SubUnit/__test__/EditSubUnit.test.js +21 -89
- package/src/screens/SubUnit/__test__/ManageSubUnit.test.js +27 -1
- package/src/screens/SubUnit/hooks/__test__/useManageSubUnit.test.js +48 -45
- package/src/screens/SubUnit/hooks/useManageSubUnit.js +7 -7
- package/src/screens/SyncLGDevice/__test__/AddLGDevice.test.js +14 -90
- package/src/screens/Unit/ChooseLocation.js +7 -14
- package/src/screens/Unit/Detail.js +30 -75
- package/src/screens/Unit/ManageUnit.js +1 -0
- package/src/screens/Unit/SelectAddress.js +34 -21
- package/src/screens/Unit/SmartAccount.js +4 -4
- package/src/screens/Unit/Summaries.js +17 -1
- package/src/screens/Unit/__test__/CheckSendEmail.test.js +24 -29
- package/src/screens/Unit/__test__/ChooseLocation.test.js +27 -14
- package/src/screens/Unit/__test__/Detail.test.js +99 -200
- package/src/screens/Unit/__test__/ManageUnit.test.js +18 -42
- package/src/screens/Unit/__test__/SelectAddress.test.js +84 -51
- package/src/screens/Unit/__test__/SmartAccount.test.js +17 -9
- package/src/screens/Unit/__test__/SmartAccountItem.test.js +0 -1
- package/src/screens/Unit/__test__/Summaries.test.js +100 -0
- package/src/screens/Unit/components/MyAllUnit/__test__/MyAllUnit.test.js +36 -0
- package/src/screens/Unit/components/MyAllUnit/__test__/index.test.js +54 -0
- package/src/screens/Unit/components/SharedUnit/index.js +1 -0
- package/src/screens/Unit/components/__test__/SharedUnit.test.js +31 -34
- package/src/screens/Unit/hook/useUnitConnectRemoteDevices.js +50 -0
- package/src/screens/Unit/styles.js +4 -0
- package/src/screens/UnitSummary/__test__/index.test.js +70 -41
- package/src/screens/UnitSummary/components/3PPowerConsumption/__test__/3PPowerConsumption.test.js +31 -2
- package/src/screens/UnitSummary/components/PowerConsumeHistoryChart/__test__/index.test.js +7 -4
- package/src/screens/UnitSummary/components/PowerConsumeHistoryChart/index.js +2 -13
- package/src/screens/UnitSummary/components/PowerConsumption/__test__/ItemPower.test.js +0 -1
- package/src/screens/UnitSummary/components/PowerConsumption/__test__/PowerConsumption.test.js +14 -16
- package/src/screens/UnitSummary/components/RunningDevices/__test__/index.test.js +11 -2
- package/src/screens/UnitSummary/components/RunningDevices/index.js +7 -10
- package/src/screens/UnitSummary/components/Temperature/index.js +4 -4
- package/src/screens/UnitSummary/components/WaterQuality/Item/index.js +10 -2
- package/src/screens/UnitSummary/index.js +15 -1
- package/src/utils/Apis/axios.js +46 -31
- package/src/utils/Converter/time.js +0 -18
- package/src/utils/I18n/translations/en.json +4 -1
- package/src/utils/I18n/translations/vi.json +5 -1
- package/src/utils/Permission/common.js +67 -0
- package/src/utils/Utils.js +11 -7
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React, { useCallback, useEffect, useMemo, useState } from 'react';
|
|
1
|
+
import React, { memo, useCallback, useEffect, useMemo, useState } from 'react';
|
|
2
2
|
import {
|
|
3
3
|
SafeAreaView,
|
|
4
4
|
View,
|
|
@@ -32,8 +32,12 @@ const SelectPermission = ({ route }) => {
|
|
|
32
32
|
const [isTickAllDevices, setIsTickAllDevices] = useState(false);
|
|
33
33
|
const [activeItemId, setActiveItemId] = useState(-1);
|
|
34
34
|
const [loading, setLoading] = useState(true);
|
|
35
|
-
const [dataDeviceShared, setDataDeviceShared] = useState([]);
|
|
36
35
|
const [hasDataChecked, setHasDataChecked] = useState(false);
|
|
36
|
+
const [dataDeviceShared, setDataDeviceShared] = useState([]);
|
|
37
|
+
|
|
38
|
+
const isUpdateSharedDevice = useMemo(() => {
|
|
39
|
+
return type === 'update_shared';
|
|
40
|
+
}, [type]);
|
|
37
41
|
|
|
38
42
|
const onTickTitle = (idGroup, isChecked, id) => {
|
|
39
43
|
if (!idGroup) {
|
|
@@ -66,7 +70,7 @@ const SelectPermission = ({ route }) => {
|
|
|
66
70
|
data[index] = {
|
|
67
71
|
...data[index],
|
|
68
72
|
isChecked,
|
|
69
|
-
|
|
73
|
+
devices: data[index]?.sensors.map((i) => ({
|
|
70
74
|
...i,
|
|
71
75
|
isChecked,
|
|
72
76
|
actions: i.actions.map((j) => ({ ...j, isChecked })),
|
|
@@ -98,6 +102,10 @@ const SelectPermission = ({ route }) => {
|
|
|
98
102
|
sensor.actions.some((i) => !i.isChecked)
|
|
99
103
|
);
|
|
100
104
|
|
|
105
|
+
stationCheck(data);
|
|
106
|
+
};
|
|
107
|
+
|
|
108
|
+
const stationCheck = (data) => {
|
|
101
109
|
for (let station of data) {
|
|
102
110
|
if (station.sensors.length) {
|
|
103
111
|
station.isChecked = !station.sensors.some((i) => !i.isChecked);
|
|
@@ -115,53 +123,82 @@ const SelectPermission = ({ route }) => {
|
|
|
115
123
|
|
|
116
124
|
sensor.isChecked = isChecked;
|
|
117
125
|
|
|
118
|
-
|
|
119
|
-
if (station.sensors.length) {
|
|
120
|
-
station.isChecked = !station.sensors.some((i) => !i.isChecked);
|
|
121
|
-
}
|
|
122
|
-
}
|
|
123
|
-
setIsTickAllDevices(!dataStationTemp.some((i) => !i.isChecked));
|
|
124
|
-
dataStationTemp = data;
|
|
125
|
-
setDataStations(data);
|
|
126
|
+
stationCheck(data);
|
|
126
127
|
};
|
|
127
128
|
|
|
128
129
|
const autoCheckedGroup = useCallback(async () => {
|
|
129
|
-
if (
|
|
130
|
+
if (isUpdateSharedDevice) {
|
|
130
131
|
if (hasDataChecked) {
|
|
131
132
|
const stationIds = object_Ids(dataDeviceShared)?.stationIds;
|
|
132
133
|
const sensorIds = object_Ids(dataDeviceShared)?.sensorIds;
|
|
133
134
|
const actionIds = object_Ids(dataDeviceShared)?.actionIds;
|
|
134
135
|
const configIds = object_Ids(dataDeviceShared)?.configIds;
|
|
135
|
-
const
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
136
|
+
const sensor_checked = [];
|
|
137
|
+
const action_checked = [];
|
|
138
|
+
const config_checked = [];
|
|
139
|
+
const action_temp = [];
|
|
140
|
+
const config_temp = [];
|
|
141
|
+
for (let station in dataStations) {
|
|
142
|
+
for (let item in dataStations[station].sensors) {
|
|
143
|
+
const itemTemp = dataStations[station].sensors[item];
|
|
144
|
+
dataStations[station].sensors[item] = {
|
|
143
145
|
...itemTemp,
|
|
144
146
|
isChecked: sensorIds.includes(itemTemp?.id),
|
|
145
|
-
actions: itemTemp.actions.map((i) =>
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
147
|
+
actions: itemTemp.actions.map((i) => {
|
|
148
|
+
if (actionIds?.includes(i.id)) {
|
|
149
|
+
action_checked.push(i);
|
|
150
|
+
}
|
|
151
|
+
action_temp.push(i);
|
|
152
|
+
return {
|
|
153
|
+
...i,
|
|
154
|
+
isChecked: actionIds?.includes(i.id),
|
|
155
|
+
};
|
|
156
|
+
}),
|
|
157
|
+
read_configs: itemTemp.read_configs.map((i) => {
|
|
158
|
+
if (configIds?.includes(i.id)) {
|
|
159
|
+
config_checked.push(i);
|
|
160
|
+
}
|
|
161
|
+
config_temp.push(i);
|
|
162
|
+
return {
|
|
163
|
+
...i,
|
|
164
|
+
isChecked: configIds?.includes(i.id),
|
|
165
|
+
};
|
|
166
|
+
}),
|
|
153
167
|
};
|
|
168
|
+
if (dataStations[station].sensors[item]?.isChecked) {
|
|
169
|
+
sensor_checked.push(dataStations[station].sensors[item]);
|
|
170
|
+
}
|
|
154
171
|
}
|
|
155
172
|
}
|
|
173
|
+
const check_action_config = () => {
|
|
174
|
+
return (
|
|
175
|
+
action_checked?.length === action_temp?.length &&
|
|
176
|
+
config_checked?.length === config_temp?.length
|
|
177
|
+
);
|
|
178
|
+
};
|
|
179
|
+
const data = dataStations?.map((i) => {
|
|
180
|
+
return {
|
|
181
|
+
...i,
|
|
182
|
+
isChecked:
|
|
183
|
+
check_action_config() &&
|
|
184
|
+
i?.sensors?.length === sensor_checked?.length &&
|
|
185
|
+
stationIds.includes(i.id),
|
|
186
|
+
};
|
|
187
|
+
});
|
|
156
188
|
const sensorIdsDefault = object_Ids(data)?.sensorIds;
|
|
189
|
+
const stationIdsDefault = object_Ids(data)?.stationIds;
|
|
157
190
|
setDataStations(data);
|
|
158
|
-
setIsTickAllDevices(
|
|
191
|
+
setIsTickAllDevices(
|
|
192
|
+
check_action_config() &&
|
|
193
|
+
sensorIdsDefault?.length === sensorIds?.length &&
|
|
194
|
+
stationIdsDefault?.length === stationIds?.length
|
|
195
|
+
);
|
|
159
196
|
setHasDataChecked(false);
|
|
160
197
|
}
|
|
161
198
|
}
|
|
162
|
-
}, [dataDeviceShared, dataStations, hasDataChecked,
|
|
199
|
+
}, [dataDeviceShared, dataStations, hasDataChecked, isUpdateSharedDevice]);
|
|
163
200
|
|
|
164
|
-
const GroupSenSorItem = ({ item = {}
|
|
201
|
+
const GroupSenSorItem = ({ item = {} }) => {
|
|
165
202
|
const { name = '', sensors = [], isChecked, id = '' } = item;
|
|
166
203
|
return (
|
|
167
204
|
<View style={styles.viewGroup}>
|
|
@@ -174,11 +211,11 @@ const SelectPermission = ({ route }) => {
|
|
|
174
211
|
idGroup={id}
|
|
175
212
|
/>
|
|
176
213
|
<View style={styles.wrapSensor}>
|
|
177
|
-
{sensors
|
|
214
|
+
{sensors?.map((i, index) => (
|
|
178
215
|
<SensorItem
|
|
179
216
|
item={i}
|
|
180
217
|
key={i.id}
|
|
181
|
-
isRenderSeparated={index !== sensors
|
|
218
|
+
isRenderSeparated={index !== sensors?.length - 1}
|
|
182
219
|
onTickedChild={onTickedChild}
|
|
183
220
|
onTickedSensor={onTickedSensor}
|
|
184
221
|
titleGroup={name}
|
|
@@ -199,27 +236,36 @@ const SelectPermission = ({ route }) => {
|
|
|
199
236
|
for (let item of station.sensors) {
|
|
200
237
|
let arrIdControlTemp = [],
|
|
201
238
|
arrIdReadTemp = [];
|
|
239
|
+
|
|
202
240
|
for (let i of item.actions) {
|
|
203
241
|
i.isChecked && arrIdControlTemp.push(i.id);
|
|
204
242
|
}
|
|
205
243
|
for (let i of item.read_configs) {
|
|
206
244
|
i.isChecked && arrIdReadTemp.push(i.id);
|
|
207
245
|
}
|
|
208
|
-
|
|
246
|
+
|
|
247
|
+
if (arrIdControlTemp.length) {
|
|
209
248
|
control_permissions.push({ id: item.id, values: arrIdControlTemp });
|
|
210
|
-
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
if (arrIdReadTemp.length) {
|
|
211
252
|
read_permissions.push({ id: item.id, values: arrIdReadTemp });
|
|
212
|
-
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
if (
|
|
256
|
+
!arrIdControlTemp.length &&
|
|
213
257
|
!arrIdReadTemp.length &&
|
|
214
|
-
item.isChecked
|
|
258
|
+
item.isChecked
|
|
259
|
+
) {
|
|
215
260
|
read_permissions.push({ id: item.id, values: [] });
|
|
261
|
+
}
|
|
216
262
|
}
|
|
217
263
|
}
|
|
218
264
|
if (!read_permissions.length && !control_permissions.length) {
|
|
219
265
|
Alert.alert('', t('choose_at_least_one'));
|
|
220
266
|
return;
|
|
221
267
|
}
|
|
222
|
-
if (
|
|
268
|
+
if (isUpdateSharedDevice) {
|
|
223
269
|
const phone =
|
|
224
270
|
member?.phone_number && member?.email
|
|
225
271
|
? member?.phone_number
|
|
@@ -230,6 +276,7 @@ const SelectPermission = ({ route }) => {
|
|
|
230
276
|
email,
|
|
231
277
|
unit: unit?.id,
|
|
232
278
|
permissions: { read_permissions, control_permissions },
|
|
279
|
+
is_remove_old_permission: true,
|
|
233
280
|
});
|
|
234
281
|
if (success) {
|
|
235
282
|
navigation.goBack();
|
|
@@ -248,49 +295,47 @@ const SelectPermission = ({ route }) => {
|
|
|
248
295
|
|
|
249
296
|
const renderFlatList = useMemo(() => {
|
|
250
297
|
return (
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
298
|
+
<FlatList
|
|
299
|
+
keyExtractor={(item) => item.id}
|
|
300
|
+
extraData={dataStations}
|
|
301
|
+
data={dataStations}
|
|
302
|
+
renderItem={renderGroupItem}
|
|
303
|
+
ListHeaderComponent={
|
|
304
|
+
dataStations?.length > 0 ? (
|
|
305
|
+
<TitleCheckBox
|
|
306
|
+
title={t('text_all_devices')}
|
|
307
|
+
wrapStyle={styles.wrapAllDevices}
|
|
308
|
+
onPress={onTickTitle}
|
|
309
|
+
titleStyle={styles.textAllDevice}
|
|
310
|
+
isChecked={isTickAllDevices}
|
|
311
|
+
/>
|
|
312
|
+
) : (
|
|
313
|
+
<></>
|
|
314
|
+
)
|
|
315
|
+
}
|
|
316
|
+
scrollIndicatorInsets={{ right: 1 }}
|
|
317
|
+
/>
|
|
271
318
|
);
|
|
319
|
+
|
|
272
320
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
273
321
|
}, [dataStations, isTickAllDevices, activeItemId]);
|
|
274
322
|
|
|
275
|
-
const getShareUnitPermission = useCallback(async () => {
|
|
276
|
-
if (type === 'share_device') {
|
|
277
|
-
if (dataStations?.length > 0) {
|
|
278
|
-
const response = await axiosGet(
|
|
279
|
-
API.SHARE.UNIT_MEMBER_SHARE_DEVICE(unit?.id, member?.id)
|
|
280
|
-
);
|
|
281
|
-
if (response.success) {
|
|
282
|
-
setDataDeviceShared(response.data);
|
|
283
|
-
setHasDataChecked(true);
|
|
284
|
-
}
|
|
285
|
-
}
|
|
286
|
-
setLoading(false);
|
|
287
|
-
}
|
|
288
|
-
}, [dataStations?.length, member?.id, type, unit?.id]);
|
|
289
|
-
|
|
290
323
|
useEffect(() => {
|
|
291
324
|
autoCheckedGroup();
|
|
292
325
|
}, [autoCheckedGroup]);
|
|
293
326
|
|
|
327
|
+
const getShareUnitPermission = useCallback(async () => {
|
|
328
|
+
if (isUpdateSharedDevice && dataStations?.length > 0) {
|
|
329
|
+
const response = await axiosGet(
|
|
330
|
+
API.SHARE.UNIT_MEMBER_SHARE_DEVICE(unit?.id, member?.id)
|
|
331
|
+
);
|
|
332
|
+
if (response?.success) {
|
|
333
|
+
setDataDeviceShared(response?.data);
|
|
334
|
+
setHasDataChecked(true);
|
|
335
|
+
}
|
|
336
|
+
}
|
|
337
|
+
}, [dataStations?.length, isUpdateSharedDevice, member?.id, unit?.id]);
|
|
338
|
+
|
|
294
339
|
useEffect(() => {
|
|
295
340
|
getShareUnitPermission();
|
|
296
341
|
}, [getShareUnitPermission]);
|
|
@@ -309,7 +354,7 @@ const SelectPermission = ({ route }) => {
|
|
|
309
354
|
}
|
|
310
355
|
setLoading(false);
|
|
311
356
|
})();
|
|
312
|
-
}, [unit]);
|
|
357
|
+
}, [dataStations?.length, isUpdateSharedDevice, member?.id, unit]);
|
|
313
358
|
|
|
314
359
|
useEffect(() => {
|
|
315
360
|
dataStationTemp = dataStations;
|
|
@@ -341,7 +386,7 @@ const SelectPermission = ({ route }) => {
|
|
|
341
386
|
testIDPrefix={TESTID.PREFIX.SHARING_SELECT_PERMISSION}
|
|
342
387
|
leftTitle={t('cancel')}
|
|
343
388
|
onLeftClick={() => navigation.goBack()}
|
|
344
|
-
rightTitle={
|
|
389
|
+
rightTitle={isUpdateSharedDevice ? t('done') : t('next')}
|
|
345
390
|
rightDisabled={false}
|
|
346
391
|
onRightClick={onPressBottom}
|
|
347
392
|
/>
|
|
@@ -350,4 +395,4 @@ const SelectPermission = ({ route }) => {
|
|
|
350
395
|
);
|
|
351
396
|
};
|
|
352
397
|
|
|
353
|
-
export default SelectPermission;
|
|
398
|
+
export default memo(SelectPermission);
|
|
@@ -1,14 +1,18 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { create, act } from 'react-test-renderer';
|
|
3
3
|
import { TouchableOpacity } from 'react-native';
|
|
4
|
+
import MockAdapter from 'axios-mock-adapter';
|
|
5
|
+
|
|
4
6
|
import InfoMemberUnit from '../InfoMemberUnit';
|
|
5
7
|
import { HeaderCustom } from '../../../commons/Header';
|
|
6
|
-
import axios from 'axios';
|
|
7
8
|
import { SCProvider } from '../../../context';
|
|
8
9
|
import { mockSCStore } from '../../../context/mockStore';
|
|
9
10
|
import { AlertAction } from '../../../commons';
|
|
10
11
|
import API from '../../../configs/API';
|
|
11
12
|
import { TESTID } from '../../../configs/Constants';
|
|
13
|
+
import api from '../../../utils/Apis/axios';
|
|
14
|
+
|
|
15
|
+
const mock = new MockAdapter(api.axiosInstance);
|
|
12
16
|
|
|
13
17
|
jest.mock('../../../hooks/Common', () => {
|
|
14
18
|
return {
|
|
@@ -24,20 +28,20 @@ jest.mock('react', () => {
|
|
|
24
28
|
};
|
|
25
29
|
});
|
|
26
30
|
|
|
31
|
+
const mockGoBack = jest.fn();
|
|
32
|
+
|
|
27
33
|
jest.mock('@react-navigation/native', () => {
|
|
28
34
|
return {
|
|
29
35
|
...jest.requireActual('@react-navigation/native'),
|
|
30
36
|
useRoute: jest.fn(),
|
|
31
37
|
useNavigation: () => ({
|
|
32
|
-
goBack:
|
|
38
|
+
goBack: mockGoBack,
|
|
33
39
|
navigate: mockedNavigate,
|
|
34
40
|
}),
|
|
35
41
|
useIsFocused: () => mockUseIsFocused,
|
|
36
42
|
};
|
|
37
43
|
});
|
|
38
44
|
|
|
39
|
-
jest.mock('axios');
|
|
40
|
-
|
|
41
45
|
const wrapComponent = (route) => (
|
|
42
46
|
<SCProvider initState={mockSCStore({})}>
|
|
43
47
|
<InfoMemberUnit route={route} />
|
|
@@ -49,7 +53,6 @@ describe('Test InfoMemberUnit', () => {
|
|
|
49
53
|
let route;
|
|
50
54
|
|
|
51
55
|
beforeEach(() => {
|
|
52
|
-
axios.get.mockClear();
|
|
53
56
|
mockedNavigate.mockClear();
|
|
54
57
|
route = {
|
|
55
58
|
params: {
|
|
@@ -65,23 +68,17 @@ describe('Test InfoMemberUnit', () => {
|
|
|
65
68
|
},
|
|
66
69
|
};
|
|
67
70
|
});
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
name: 'user',
|
|
77
|
-
email: 'abc@gmail.com',
|
|
78
|
-
},
|
|
79
|
-
};
|
|
80
|
-
axios.get.mockImplementation(async () => {
|
|
81
|
-
return response;
|
|
71
|
+
|
|
72
|
+
it('render InfoMemberUnit without params', async () => {
|
|
73
|
+
mock.onGet(API.SHARE.UNIT_MEMBER_INFO(1, 1)).reply(200, {
|
|
74
|
+
id: 1,
|
|
75
|
+
identity: 'owner',
|
|
76
|
+
phone_number: '88888',
|
|
77
|
+
name: 'user',
|
|
78
|
+
email: 'abc@gmail.com',
|
|
82
79
|
});
|
|
83
80
|
await act(async () => {
|
|
84
|
-
tree = await create(wrapComponent(
|
|
81
|
+
tree = await create(wrapComponent({}));
|
|
85
82
|
});
|
|
86
83
|
const instance = tree.root;
|
|
87
84
|
const header = instance.findAllByType(HeaderCustom);
|
|
@@ -92,13 +89,35 @@ describe('Test InfoMemberUnit', () => {
|
|
|
92
89
|
alertAction[0].props.rightButtonClick();
|
|
93
90
|
});
|
|
94
91
|
});
|
|
92
|
+
|
|
93
|
+
it('render InfoMemberUnit', async () => {
|
|
94
|
+
mock.onGet(API.SHARE.UNIT_MEMBER_INFO(1, 1)).reply(200, {
|
|
95
|
+
id: 1,
|
|
96
|
+
identity: 'owner',
|
|
97
|
+
phone_number: '88888',
|
|
98
|
+
name: 'user',
|
|
99
|
+
email: 'abc@gmail.com',
|
|
100
|
+
});
|
|
101
|
+
await act(async () => {
|
|
102
|
+
tree = await create(wrapComponent(route));
|
|
103
|
+
});
|
|
104
|
+
const instance = tree.root;
|
|
105
|
+
const header = instance.findAllByType(HeaderCustom);
|
|
106
|
+
const alertAction = instance.findAllByType(AlertAction);
|
|
107
|
+
await act(async () => {
|
|
108
|
+
alertAction[0].props.rightButtonClick();
|
|
109
|
+
});
|
|
110
|
+
expect(header).toHaveLength(1);
|
|
111
|
+
expect(alertAction).toHaveLength(1);
|
|
112
|
+
});
|
|
113
|
+
|
|
95
114
|
it('render InfoMemberUnit delete member', async () => {
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
115
|
+
mock.onGet(API.SHARE.UNIT_MEMBER_INFO(1, 1)).reply(200, {
|
|
116
|
+
id: 1,
|
|
117
|
+
identity: 'owner',
|
|
118
|
+
phone_number: '88888',
|
|
119
|
+
name: 'user',
|
|
120
|
+
email: 'abc@gmail.com',
|
|
102
121
|
});
|
|
103
122
|
await act(async () => {
|
|
104
123
|
tree = await create(wrapComponent(route));
|
|
@@ -111,11 +130,10 @@ describe('Test InfoMemberUnit', () => {
|
|
|
111
130
|
);
|
|
112
131
|
expect(header).toHaveLength(1);
|
|
113
132
|
expect(buttonRemove).toHaveLength(1);
|
|
133
|
+
mock.onDelete(API.SHARE.UNITS_MEMBER_DETAIL(1)).reply(200);
|
|
114
134
|
await act(async () => {
|
|
115
135
|
buttonRemove[0].props.onPress();
|
|
116
136
|
});
|
|
117
|
-
expect(
|
|
118
|
-
API.SHARE.UNITS_MEMBER_DETAIL(1, undefined)
|
|
119
|
-
);
|
|
137
|
+
expect(mockGoBack).toBeCalled();
|
|
120
138
|
});
|
|
121
139
|
});
|
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
/* eslint-disable promise/prefer-await-to-callbacks */
|
|
2
1
|
import React from 'react';
|
|
3
2
|
import { create, act } from 'react-test-renderer';
|
|
4
|
-
|
|
3
|
+
|
|
5
4
|
import MemberList from '../MemberList';
|
|
6
5
|
import { AlertAction } from '../../../commons';
|
|
7
|
-
import API from '../../../configs/API';
|
|
8
|
-
import { TESTID } from '../../../configs/Constants';
|
|
9
|
-
import { TouchableOpacity } from 'react-native';
|
|
10
6
|
import { SCProvider } from '../../../context';
|
|
11
7
|
import { mockSCStore } from '../../../context/mockStore';
|
|
8
|
+
import { TouchableOpacity } from 'react-native';
|
|
12
9
|
import Routes from '../../../utils/Route';
|
|
13
10
|
|
|
11
|
+
jest.mock('../../../hooks/Common', () => {
|
|
12
|
+
return {
|
|
13
|
+
useIsOwnerOfUnit: () => ({ isOwner: true }),
|
|
14
|
+
};
|
|
15
|
+
});
|
|
16
|
+
|
|
14
17
|
const mockedNavigate = jest.fn();
|
|
15
|
-
const mockedDispatch = jest.fn();
|
|
16
|
-
const mockedAddListener = jest.fn();
|
|
17
18
|
const mockUseIsFocused = jest.fn();
|
|
18
19
|
|
|
19
20
|
jest.mock('@react-navigation/native', () => {
|
|
20
21
|
return {
|
|
21
22
|
...jest.requireActual('@react-navigation/native'),
|
|
22
23
|
useNavigation: () => ({
|
|
23
|
-
addListener: mockedAddListener,
|
|
24
24
|
navigate: mockedNavigate,
|
|
25
25
|
}),
|
|
26
26
|
useIsFocused: () => ({
|
|
@@ -29,22 +29,8 @@ jest.mock('@react-navigation/native', () => {
|
|
|
29
29
|
};
|
|
30
30
|
});
|
|
31
31
|
|
|
32
|
-
jest.mock('axios');
|
|
33
|
-
jest.mock('react-native-toast-message');
|
|
34
|
-
|
|
35
|
-
jest.mock('react-redux', () => {
|
|
36
|
-
return {
|
|
37
|
-
...jest.requireActual('react-redux'),
|
|
38
|
-
useDispatch: () => mockedDispatch,
|
|
39
|
-
useSelector: jest.fn(),
|
|
40
|
-
connect: () => {
|
|
41
|
-
return (component) => component;
|
|
42
|
-
},
|
|
43
|
-
};
|
|
44
|
-
});
|
|
45
|
-
|
|
46
32
|
const wrapComponent = (route, state) => (
|
|
47
|
-
<SCProvider initState={mockSCStore(
|
|
33
|
+
<SCProvider initState={mockSCStore({})}>
|
|
48
34
|
<MemberList route={route} />
|
|
49
35
|
</SCProvider>
|
|
50
36
|
);
|
|
@@ -74,17 +60,6 @@ describe('test MemberList', () => {
|
|
|
74
60
|
};
|
|
75
61
|
});
|
|
76
62
|
|
|
77
|
-
afterEach(() => {
|
|
78
|
-
axios.get.mockClear();
|
|
79
|
-
});
|
|
80
|
-
|
|
81
|
-
test('render MemberList', async () => {
|
|
82
|
-
await act(async () => {
|
|
83
|
-
await create(wrapComponent(route, localState));
|
|
84
|
-
});
|
|
85
|
-
expect(axios.get).toHaveBeenCalledWith(API.SHARE.UNITS_MEMBERS(1), {});
|
|
86
|
-
});
|
|
87
|
-
|
|
88
63
|
test('AlertAction rightButtonClick', async () => {
|
|
89
64
|
let tree;
|
|
90
65
|
await act(async () => {
|
|
@@ -95,100 +70,11 @@ describe('test MemberList', () => {
|
|
|
95
70
|
await act(async () => {
|
|
96
71
|
alertAction.props.rightButtonClick();
|
|
97
72
|
});
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
const response = {
|
|
102
|
-
status: 200,
|
|
103
|
-
data: [
|
|
104
|
-
{
|
|
105
|
-
id: 1,
|
|
106
|
-
name: 'a',
|
|
107
|
-
share_id: 1,
|
|
108
|
-
},
|
|
109
|
-
],
|
|
110
|
-
};
|
|
111
|
-
axios.get.mockImplementation(async () => {
|
|
112
|
-
return response;
|
|
113
|
-
});
|
|
114
|
-
|
|
115
|
-
let tree;
|
|
116
|
-
await act(async () => {
|
|
117
|
-
tree = await create(wrapComponent(route, localState));
|
|
118
|
-
});
|
|
119
|
-
const instance = tree.root;
|
|
120
|
-
const sharingMember = instance.findAll(
|
|
121
|
-
(el) => el.props.testID === TESTID.SHARING_MEMBER
|
|
122
|
-
);
|
|
123
|
-
expect(sharingMember).toHaveLength(1);
|
|
124
|
-
expect(axios.get).toHaveBeenCalledWith(API.SHARE.UNITS_MEMBERS(1), {});
|
|
125
|
-
});
|
|
126
|
-
|
|
127
|
-
test('WrapHeaderScrollable rightHeader', async () => {
|
|
128
|
-
const response = {
|
|
129
|
-
status: 200,
|
|
130
|
-
data: [
|
|
131
|
-
{
|
|
132
|
-
id: 1,
|
|
133
|
-
name: 'a',
|
|
134
|
-
},
|
|
135
|
-
],
|
|
136
|
-
};
|
|
137
|
-
axios.get.mockImplementation(async () => {
|
|
138
|
-
return response;
|
|
139
|
-
});
|
|
140
|
-
|
|
141
|
-
let tree;
|
|
142
|
-
await act(async () => {
|
|
143
|
-
tree = await create(wrapComponent(route, localState));
|
|
144
|
-
});
|
|
145
|
-
const instance = tree.root;
|
|
146
|
-
const button = instance.find(
|
|
147
|
-
(el) =>
|
|
148
|
-
el.props.testID === TESTID.MEMBER_LIST_RIGHT_HEADER_TOUCH &&
|
|
149
|
-
el.type === TouchableOpacity
|
|
150
|
-
);
|
|
151
|
-
await act(async () => {
|
|
152
|
-
await button.props.onPress();
|
|
153
|
-
});
|
|
154
|
-
expect(axios.get).toHaveBeenCalledWith(API.SHARE.UNITS_MEMBERS(1), {});
|
|
155
|
-
expect(mockedNavigate).toHaveBeenCalledWith(Routes.AddMemberStack, {
|
|
73
|
+
const MemberListButtons = instance.findAllByType(TouchableOpacity);
|
|
74
|
+
await MemberListButtons[1].props.onPress();
|
|
75
|
+
expect(mockedNavigate).toBeCalledWith(Routes.AddMemberStack, {
|
|
156
76
|
screen: Routes.SharingSelectPermission,
|
|
157
|
-
params: { unit: { id:
|
|
158
|
-
});
|
|
159
|
-
});
|
|
160
|
-
|
|
161
|
-
test('WrapHeaderScrollable rightHeader but not owner', async () => {
|
|
162
|
-
route.params.unit.user_id = 1;
|
|
163
|
-
const response = {
|
|
164
|
-
status: 200,
|
|
165
|
-
data: [
|
|
166
|
-
{
|
|
167
|
-
id: 1,
|
|
168
|
-
name: 'a',
|
|
169
|
-
},
|
|
170
|
-
],
|
|
171
|
-
};
|
|
172
|
-
axios.get.mockImplementation(async () => {
|
|
173
|
-
return response;
|
|
174
|
-
});
|
|
175
|
-
|
|
176
|
-
let tree;
|
|
177
|
-
await act(async () => {
|
|
178
|
-
tree = await create(wrapComponent(route, localState));
|
|
179
|
-
});
|
|
180
|
-
const instance = tree.root;
|
|
181
|
-
const button = instance.find(
|
|
182
|
-
(el) =>
|
|
183
|
-
el.props.testID === TESTID.MEMBER_LIST_RIGHT_HEADER_TOUCH &&
|
|
184
|
-
el.type === TouchableOpacity
|
|
185
|
-
);
|
|
186
|
-
const alertAction = instance.findByType(AlertAction);
|
|
187
|
-
expect(alertAction.props.visible).toEqual(false);
|
|
188
|
-
await act(async () => {
|
|
189
|
-
await button.props.onPress();
|
|
77
|
+
params: { unit: { id: 1 } },
|
|
190
78
|
});
|
|
191
|
-
expect(alertAction.props.visible).toEqual(true);
|
|
192
|
-
expect(axios.get).toHaveBeenCalledWith(API.SHARE.UNITS_MEMBERS(1), {});
|
|
193
79
|
});
|
|
194
80
|
});
|