Commit 0c4b7101 authored by Rajat Jain's avatar Rajat Jain

Resolve review comments and fixes

Resolve review comments and added fixes
parent 39a82107
......@@ -427,6 +427,7 @@ export default {
createFlash({
message: __('Something went wrong while exporting requirements'),
captureError: true,
error: e,
});
throw e;
});
......@@ -624,9 +625,6 @@ export default {
handleImportRequirementsClick() {
this.$refs.modal.show();
},
handleExportRequirementsClick() {
this.$refs.exportModal.show();
},
},
};
</script>
......@@ -642,7 +640,7 @@ export default {
@click-tab="handleTabClick"
@click-new-requirement="handleNewRequirementClick"
@click-import-requirements="handleImportRequirementsClick"
@click-export-requirements="handleExportRequirementsClick"
@click-export-requirements="$refs.exportModal.show()"
/>
<filtered-search-bar
:namespace="projectPath"
......
......@@ -90,7 +90,6 @@ export default {
<gl-button
v-if="showUploadCsv"
category="secondary"
variant="default"
:disabled="showCreateForm"
icon="export"
@click="$emit('click-export-requirements')"
......@@ -98,7 +97,6 @@ export default {
<gl-button
v-if="showUploadCsv"
category="secondary"
variant="default"
class="js-import-requirements qa-import-requirements-button"
:disabled="showCreateForm"
icon="import"
......
......@@ -328,7 +328,12 @@ describe('RequirementsRoot', () => {
jest.spyOn(wrapper.vm.$apollo, 'mutate').mockRejectedValue(new Error({}));
return wrapper.vm.exportCsv().catch(() => {
expect(createFlash).toHaveBeenCalled();
expect(createFlash).toHaveBeenCalledWith(
expect.objectContaining({
message: 'Something went wrong while exporting requirements',
captureError: true,
}),
);
});
});
});
......
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