Skip to content
Snippets Groups Projects

Fix: Click on an entry triggers regular download (coscine/issues#2936)

Merged Benedikt Heinrichs requested to merge Issue/2936-clickDownload into dev
2 files
+ 41
6
Compare changes
  • Side-by-side
  • Inline
Files
2
@@ -76,6 +76,10 @@ describe("FilesView.vue", async () => {
router,
i18n,
localVue,
propsData: {
dirTrail: "/",
dirCrumbs: [],
},
}) as Wrapper<ResourcePageComponent>;
});
@@ -112,4 +116,28 @@ describe("FilesView.vue", async () => {
timeout: 10000,
},
);
test(
"Trigger download uses download store method",
async () => {
await wrapper.vm.$nextTick();
// Wait for 1 second until everything is set up
await sleep(1000); // Don't remove!
/** This should work, however wait till Vue 3
const entry = wrapper.find("#fileViewEntry2");
await entry.trigger("click");
// Wait for 1 second until everything is set up
await sleep(1000); // Don't remove!
expect(resourceStore.download).toBeCalledTimes(1);
*/
},
{
// Override the maximum run time for this test (10 sec), due to the sleep() calls
timeout: 10000,
},
);
});
Loading