Commit 151725fe authored by Alexander Turinske's avatar Alexander Turinske

Clean up threat monitoring alerts code

- remove unnecessary testing waits
- rename variable to be more readable
parent 7ebd83cc
......@@ -62,11 +62,11 @@ export default {
dropdown.show();
}
},
handleUpdating(updating) {
if (!updating) {
handleUpdating(isMutationInProgress) {
if (!isMutationInProgress) {
this.$emit('alert-update');
}
this.isUpdating = updating;
this.isUpdating = isMutationInProgress;
},
},
};
......
......@@ -167,7 +167,6 @@ describe('Alert Drawer', () => {
createWrapper({ props: { selectedAlert: mockAlerts[0] } });
expect(wrapper.emitted('alert-update')).toBeUndefined();
findStatus().vm.$emit('alert-update');
await wrapper.vm.$nextTick();
expect(wrapper.emitted('alert-update')).toEqual([[]]);
});
});
......@@ -125,7 +125,6 @@ describe('Alert Details Sidebar Status', () => {
mountComponent({ sidebarCollapsed: false });
expect(wrapper.emitted('alert-update')).toBeUndefined();
findAlertStatus().vm.$emit('handle-updating');
await wrapper.vm.$nextTick();
expect(wrapper.emitted('alert-update')).toEqual([[]]);
});
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment