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-15 18:09:53 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2022-08-15 18:09:53 +0300
commit51d5328e82229d69456d3a43dd2cf10518bf64c7 (patch)
treecca8c7aaea10c92398e03ae182b76c5cc514185c /spec/frontend/issuable
parent14771dc276c9cfdeed1a3915ee29301cd848b475 (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.js15
1 files changed, 15 insertions, 0 deletions
diff --git a/spec/frontend/issuable/popover/components/issue_popover_spec.js b/spec/frontend/issuable/popover/components/issue_popover_spec.js
index 20a5505edf6..444165f61c7 100644
--- a/spec/frontend/issuable/popover/components/issue_popover_spec.js
+++ b/spec/frontend/issuable/popover/components/issue_popover_spec.js
@@ -10,12 +10,15 @@ 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 WorkItemTypeIcon from '~/work_items/components/work_item_type_icon.vue';
describe('Issue Popover', () => {
let wrapper;
Vue.use(VueApollo);
+ const findWorkItemIcon = () => wrapper.findComponent(WorkItemTypeIcon);
+
const mountComponent = ({
queryResponse = jest.fn().mockResolvedValue(issueQueryResponse),
} = {}) => {
@@ -40,6 +43,12 @@ describe('Issue Popover', () => {
expect(wrapper.findComponent(GlSkeletonLoader).exists()).toBe(true);
});
+ it('should not show any work item icon while apollo is loading', () => {
+ mountComponent();
+
+ expect(findWorkItemIcon().exists()).toBe(false);
+ });
+
describe('when loaded', () => {
beforeEach(() => {
mountComponent();
@@ -61,6 +70,12 @@ describe('Issue Popover', () => {
expect(wrapper.find('h5').text()).toBe(issueQueryResponse.data.project.issue.title);
});
+ it('shows the work type icon', () => {
+ expect(findWorkItemIcon().props('workItemType')).toBe(
+ issueQueryResponse.data.project.issue.type,
+ );
+ });
+
it('shows reference', () => {
expect(wrapper.text()).toContain('foo/bar#1');
});