diff --git a/web_src/js/components/RepoActionView.test.js b/web_src/js/components/RepoActionView.test.js index 574be2992b..e6b661a4ac 100644 --- a/web_src/js/components/RepoActionView.test.js +++ b/web_src/js/components/RepoActionView.test.js @@ -452,8 +452,12 @@ test('artifacts download links', async () => { await flushPromises(); expect(wrapper.get('.job-artifacts .job-artifacts-title').text()).toEqual('artifactTitleHere'); + + expect(wrapper.find('.job-artifacts .job-artifacts-item:nth-of-type(1) a').exists()).toBe(true); + // Expired artifacts should be listed, but not be linked, because they no longer exist. + expect(wrapper.find('.job-artifacts .job-artifacts-item:nth-of-type(2) a').exists()).toBe(false); + expect(wrapper.get('.job-artifacts .job-artifacts-item:nth-of-type(1) .job-artifacts-link').attributes('href')).toEqual('https://example.com/example-org/example-repo/actions/runs/1001/artifacts/artifactname1'); - expect(wrapper.get('.job-artifacts .job-artifacts-item:nth-of-type(2) .job-artifacts-link').attributes('href')).toEqual('https://example.com/example-org/example-repo/actions/runs/1001/artifacts/artifactname2'); }); test('initial load schedules refresh when job is not done', async () => { diff --git a/web_src/js/components/RepoActionView.vue b/web_src/js/components/RepoActionView.vue index 5550d84c85..0d474c2753 100644 --- a/web_src/js/components/RepoActionView.vue +++ b/web_src/js/components/RepoActionView.vue @@ -543,12 +543,17 @@ export default {