diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-02-26 03:14:54 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-02-26 03:14:54 +0300 |
commit | a40d39ddd2dce862f95d35c42a07c0fce4df8f0a (patch) | |
tree | 4c7f8b0898c57f1e0973b22729e01f8508388562 /spec/frontend/snippets | |
parent | ffe8b982e9d93ed23817a4bd9696ef1ef59de9f9 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/frontend/snippets')
-rw-r--r-- | spec/frontend/snippets/components/show_spec.js | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/spec/frontend/snippets/components/show_spec.js b/spec/frontend/snippets/components/show_spec.js index af61f4ea54f..c73bf8f80a2 100644 --- a/spec/frontend/snippets/components/show_spec.js +++ b/spec/frontend/snippets/components/show_spec.js @@ -1,4 +1,4 @@ -import { GlLoadingIcon } from '@gitlab/ui'; +import { GlLoadingIcon, GlAlert } from '@gitlab/ui'; import { shallowMount } from '@vue/test-utils'; import { Blob, BinaryBlob } from 'jest/blob/components/mock_data'; import EmbedDropdown from '~/snippets/components/embed_dropdown.vue'; @@ -106,6 +106,23 @@ describe('Snippet view app', () => { }); }); + describe('hasUnretrievableBlobs alert rendering', () => { + it.each` + hasUnretrievableBlobs | condition | isRendered + ${false} | ${'not render'} | ${false} + ${true} | ${'render'} | ${true} + `('does $condition gl-alert by default', ({ hasUnretrievableBlobs, isRendered }) => { + createComponent({ + data: { + snippet: { + hasUnretrievableBlobs, + }, + }, + }); + expect(wrapper.findComponent(GlAlert).exists()).toBe(isRendered); + }); + }); + describe('Clone button rendering', () => { it.each` httpUrlToRepo | sshUrlToRepo | shouldRender | isRendered |