Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2022-08-10 21:12:05 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2022-08-10 21:12:05 +0300
commit2e2c1a521c03c8cd7ab57296016fee6350e29b07 (patch)
tree26df83cd7566a6230d5218c446a213f02313314d /spec/frontend/issuable
parent0a412bceb98cd7acd46701d75dbad9683cb33baf (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/frontend/issuable')
-rw-r--r--spec/frontend/issuable/popover/components/issue_popover_spec.js49
1 files changed, 31 insertions, 18 deletions
diff --git a/spec/frontend/issuable/popover/components/issue_popover_spec.js b/spec/frontend/issuable/popover/components/issue_popover_spec.js
index 3e77e750f3a..20a5505edf6 100644
--- a/spec/frontend/issuable/popover/components/issue_popover_spec.js
+++ b/spec/frontend/issuable/popover/components/issue_popover_spec.js
@@ -1,34 +1,21 @@
-import { GlSkeletonLoader } from '@gitlab/ui';
+import { GlIcon, GlSkeletonLoader } from '@gitlab/ui';
import { shallowMount } from '@vue/test-utils';
import Vue from 'vue';
import VueApollo from 'vue-apollo';
+import issueQueryResponse from 'test_fixtures/graphql/issuable/popover/queries/issue.query.graphql.json';
+import issueQuery from 'ee_else_ce/issuable/popover/queries/issue.query.graphql';
import createMockApollo from 'helpers/mock_apollo_helper';
import waitForPromises from 'helpers/wait_for_promises';
+import IssueDueDate from '~/boards/components/issue_due_date.vue';
+import IssueMilestone from '~/issuable/components/issue_milestone.vue';
import StatusBox from '~/issuable/components/status_box.vue';
import IssuePopover from '~/issuable/popover/components/issue_popover.vue';
-import issueQuery from '~/issuable/popover/queries/issue.query.graphql';
describe('Issue Popover', () => {
let wrapper;
Vue.use(VueApollo);
- const issueQueryResponse = {
- data: {
- project: {
- __typename: 'Project',
- id: '1',
- issue: {
- __typename: 'Issue',
- id: 'gid://gitlab/Issue/1',
- createdAt: '2020-07-01T04:08:01Z',
- state: 'opened',
- title: 'Issue title',
- },
- },
- },
- };
-
const mountComponent = ({
queryResponse = jest.fn().mockResolvedValue(issueQueryResponse),
} = {}) => {
@@ -77,5 +64,31 @@ describe('Issue Popover', () => {
it('shows reference', () => {
expect(wrapper.text()).toContain('foo/bar#1');
});
+
+ it('shows confidential icon', () => {
+ const icon = wrapper.findComponent(GlIcon);
+
+ expect(icon.exists()).toBe(true);
+ expect(icon.props('name')).toBe('eye-slash');
+ });
+
+ it('shows due date', () => {
+ const component = wrapper.findComponent(IssueDueDate);
+
+ expect(component.exists()).toBe(true);
+ expect(component.props('date')).toBe('2020-07-05');
+ expect(component.props('closed')).toBe(false);
+ });
+
+ it('shows milestone', () => {
+ const component = wrapper.findComponent(IssueMilestone);
+
+ expect(component.exists()).toBe(true);
+ expect(component.props('milestone')).toMatchObject({
+ title: '15.2',
+ startDate: '2020-07-01',
+ dueDate: '2020-07-30',
+ });
+ });
});
});