diff --git a/static/js/vue-cdr-access/src/components/full_record/restrictedContent.vue b/static/js/vue-cdr-access/src/components/full_record/restrictedContent.vue index 2aad3d1b9c..a29a6bc46c 100644 --- a/static/js/vue-cdr-access/src/components/full_record/restrictedContent.vue +++ b/static/js/vue-cdr-access/src/components/full_record/restrictedContent.vue @@ -10,18 +10,20 @@
- - - diff --git a/static/js/vue-cdr-access/tests/unit/restrictedContent.spec.js b/static/js/vue-cdr-access/tests/unit/restrictedContent.spec.js index 2d55270433..1bdac117df 100644 --- a/static/js/vue-cdr-access/tests/unit/restrictedContent.spec.js +++ b/static/js/vue-cdr-access/tests/unit/restrictedContent.spec.js @@ -417,6 +417,16 @@ describe('restrictedContent.vue', () => { expect(wrapper.find('a.download').exists()).toBe(true); }); + it('does not show download or embargo buttons if there is no dataFileUrl', async () => { + const updated_data = cloneDeep(record); + updated_data.dataFileUrl = ""; + await wrapper.setProps({ + recordData: updated_data + }); + expect(wrapper.find('a.download').exists()).toBe(false); + expect(wrapper.find('.noaction').exists()).toBe(false); + }); + it('does not show a download option does not have download permissions', async () => { const updated_data = cloneDeep(record); updated_data.briefObject.permissions = [];