diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-05-31 18:07:20 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-05-31 18:07:20 +0300 |
commit | fab00cd7efb84b369dfb45cabb797f7feace4b66 (patch) | |
tree | fd3eb7509bf3947ddd818214350a06d16822c78a /spec/frontend/ci | |
parent | 07f6ded1cb698550284e5f348de8f1b884e715ae (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/frontend/ci')
-rw-r--r-- | spec/frontend/ci/artifacts/components/job_artifacts_table_spec.js | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/spec/frontend/ci/artifacts/components/job_artifacts_table_spec.js b/spec/frontend/ci/artifacts/components/job_artifacts_table_spec.js index 046302d07c1..9a16fac7406 100644 --- a/spec/frontend/ci/artifacts/components/job_artifacts_table_spec.js +++ b/spec/frontend/ci/artifacts/components/job_artifacts_table_spec.js @@ -370,6 +370,38 @@ describe('JobArtifactsTable component', () => { expect(findBrowseButton().attributes('disabled')).toBeDefined(); }); + + it('is disabled when job has no metadata.gz', async () => { + const jobWithoutMetadata = { + ...job, + artifacts: { nodes: [archiveArtifact] }, + }; + + createComponent({ + handlers: { getJobArtifactsQuery: jest.fn() }, + data: { jobArtifacts: [jobWithoutMetadata] }, + }); + + await waitForPromises(); + + expect(findBrowseButton().attributes('disabled')).toBe('disabled'); + }); + + it('is disabled when job has no artifacts', async () => { + const jobWithoutArtifacts = { + ...job, + artifacts: { nodes: [] }, + }; + + createComponent({ + handlers: { getJobArtifactsQuery: jest.fn() }, + data: { jobArtifacts: [jobWithoutArtifacts] }, + }); + + await waitForPromises(); + + expect(findBrowseButton().attributes('disabled')).toBe('disabled'); + }); }); describe('delete button', () => { |