@eohjsc/react-native-smart-city 0.7.17 → 0.7.19
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
CHANGED
|
@@ -158,17 +158,24 @@ describe('Test ScriptDetail', () => {
|
|
|
158
158
|
tree = await create(wrapComponent(route));
|
|
159
159
|
});
|
|
160
160
|
const instance = tree.root;
|
|
161
|
+
const icon = instance.find(
|
|
162
|
+
(el) => el.props.accessibilityLabel === AccessibilityLabel.ICON_MORE
|
|
163
|
+
);
|
|
164
|
+
|
|
165
|
+
await act(async () => {
|
|
166
|
+
await icon.props.onPress();
|
|
167
|
+
});
|
|
161
168
|
const menu = instance.find(
|
|
162
169
|
(el) =>
|
|
163
170
|
el.props.accessibilityLabel === AccessibilityLabel.MENU_POPPER_MORE
|
|
164
171
|
);
|
|
172
|
+
expect(menu.props.isVisible).toBeTruthy();
|
|
165
173
|
const alertAction = instance.findAllByType(AlertAction)[0];
|
|
166
174
|
const rename = menu.props.listMenuItem[0];
|
|
167
175
|
|
|
168
176
|
await act(async () => {
|
|
169
177
|
await menu.props.onItemClick(rename);
|
|
170
178
|
});
|
|
171
|
-
expect(menu.props.isVisible).toBeFalsy();
|
|
172
179
|
expect(alertAction.props.visible).toBeTruthy();
|
|
173
180
|
|
|
174
181
|
const textInput = instance.findByType(_TextInput);
|
|
@@ -343,7 +343,9 @@ const ScriptDetail = ({ route }) => {
|
|
|
343
343
|
const { success, data: listChip } = await axiosGet(
|
|
344
344
|
API.DEV_MODE.GATEWAY.SHARED(),
|
|
345
345
|
{
|
|
346
|
-
|
|
346
|
+
params: {
|
|
347
|
+
unit: unit_id,
|
|
348
|
+
},
|
|
347
349
|
},
|
|
348
350
|
true
|
|
349
351
|
);
|
|
@@ -362,7 +364,7 @@ const ScriptDetail = ({ route }) => {
|
|
|
362
364
|
|
|
363
365
|
const onPressSelectChip = useCallback(
|
|
364
366
|
async (enable_local_control, item) => {
|
|
365
|
-
if (!
|
|
367
|
+
if (!enable_local_control && !local_control.chip_id_local_control) {
|
|
366
368
|
setIsShowLocalControl(false);
|
|
367
369
|
return;
|
|
368
370
|
}
|
|
@@ -382,7 +384,7 @@ const ScriptDetail = ({ route }) => {
|
|
|
382
384
|
});
|
|
383
385
|
}
|
|
384
386
|
},
|
|
385
|
-
[automateId]
|
|
387
|
+
[automateId, local_control.chip_id_local_control]
|
|
386
388
|
);
|
|
387
389
|
|
|
388
390
|
const renderLocalControl = useMemo(() => {
|