summaryrefslogtreecommitdiff
path: root/spec/frontend/issue_show
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-07-24 09:09:41 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2020-07-24 09:09:41 +0000
commitff83f24eacc7c78884458d7261086b4f3a9547bb (patch)
treec7a79dae360f7cb127dd908a6f46a061535947e6 /spec/frontend/issue_show
parentfe9cb6b25add197beb8a427371c49e7b43baeea5 (diff)
downloadgitlab-ce-ff83f24eacc7c78884458d7261086b4f3a9547bb.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/frontend/issue_show')
-rw-r--r--spec/frontend/issue_show/components/issuable_header_warnings_spec.js79
1 files changed, 0 insertions, 79 deletions
diff --git a/spec/frontend/issue_show/components/issuable_header_warnings_spec.js b/spec/frontend/issue_show/components/issuable_header_warnings_spec.js
deleted file mode 100644
index 5a166812d84..00000000000
--- a/spec/frontend/issue_show/components/issuable_header_warnings_spec.js
+++ /dev/null
@@ -1,79 +0,0 @@
-import { shallowMount, createLocalVue } from '@vue/test-utils';
-import Vuex from 'vuex';
-import IssuableHeaderWarnings from '~/issue_show/components/issuable_header_warnings.vue';
-import createStore from '~/notes/stores';
-
-const localVue = createLocalVue();
-localVue.use(Vuex);
-
-describe('IssuableHeaderWarnings', () => {
- let wrapper;
- let store;
-
- const findConfidential = () => wrapper.find('[data-testid="confidential"]');
- const findLocked = () => wrapper.find('[data-testid="locked"]');
- const confidentialIconName = () => findConfidential().attributes('name');
- const lockedIconName = () => findLocked().attributes('name');
-
- const createComponent = () => {
- wrapper = shallowMount(IssuableHeaderWarnings, { store, localVue });
- };
-
- beforeEach(() => {
- store = createStore();
- });
-
- afterEach(() => {
- wrapper.destroy();
- wrapper = null;
- store = null;
- });
-
- describe('when confidential is on', () => {
- beforeEach(() => {
- store.state.noteableData.confidential = true;
-
- createComponent();
- });
-
- it('renders the confidential icon', () => {
- expect(confidentialIconName()).toBe('eye-slash');
- });
- });
-
- describe('when confidential is off', () => {
- beforeEach(() => {
- store.state.noteableData.confidential = false;
-
- createComponent();
- });
-
- it('does not find the component', () => {
- expect(findConfidential().exists()).toBe(false);
- });
- });
-
- describe('when discussion locked is on', () => {
- beforeEach(() => {
- store.state.noteableData.discussion_locked = true;
-
- createComponent();
- });
-
- it('renders the locked icon', () => {
- expect(lockedIconName()).toBe('lock');
- });
- });
-
- describe('when discussion locked is off', () => {
- beforeEach(() => {
- store.state.noteableData.discussion_locked = false;
-
- createComponent();
- });
-
- it('does not find the component', () => {
- expect(findLocked().exists()).toBe(false);
- });
- });
-});