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>2023-10-17 00:12:54 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2023-10-17 00:12:54 +0300
commitf5ea25c365d9b40dc0d8319a64b69179e2ecd8c0 (patch)
treeaefa700e65cb738594927f7835564c75d834e391 /spec/frontend/work_items
parent5fcd4e5fbcad7d74d1c5efa09c6785303af2ebd7 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/frontend/work_items')
-rw-r--r--spec/frontend/work_items/components/shared/work_item_link_child_contents_spec.js5
-rw-r--r--spec/frontend/work_items/components/work_item_links/work_item_link_child_spec.js20
-rw-r--r--spec/frontend/work_items/components/work_item_relationships/__snapshots__/work_item_relationship_list_spec.js.snap1
-rw-r--r--spec/frontend/work_items/components/work_item_relationships/work_item_relationship_list_spec.js2
-rw-r--r--spec/frontend/work_items/mock_data.js5
-rw-r--r--spec/frontend/work_items/utils_spec.js13
6 files changed, 8 insertions, 38 deletions
diff --git a/spec/frontend/work_items/components/shared/work_item_link_child_contents_spec.js b/spec/frontend/work_items/components/shared/work_item_link_child_contents_spec.js
index b86f9ff34ae..2e1a7983dec 100644
--- a/spec/frontend/work_items/components/shared/work_item_link_child_contents_spec.js
+++ b/spec/frontend/work_items/components/shared/work_item_link_child_contents_spec.js
@@ -1,4 +1,4 @@
-import { GlLabel, GlIcon } from '@gitlab/ui';
+import { GlLabel, GlIcon, GlLink } from '@gitlab/ui';
import Vue from 'vue';
import VueApollo from 'vue-apollo';
import { shallowMountExtended } from 'helpers/vue_test_utils_helper';
@@ -33,7 +33,7 @@ describe('WorkItemLinkChildContents', () => {
const findStatusIconComponent = () =>
wrapper.findByTestId('item-status-icon').findComponent(GlIcon);
const findConfidentialIconComponent = () => wrapper.findByTestId('confidential-icon');
- const findTitleEl = () => wrapper.findByTestId('item-title');
+ const findTitleEl = () => wrapper.findComponent(GlLink);
const findStatusTooltipComponent = () => wrapper.findComponent(RichTimestampTooltip);
const findMetadataComponent = () => wrapper.findComponent(WorkItemLinkChildMetadata);
const findAllLabels = () => wrapper.findAllComponents(GlLabel);
@@ -46,7 +46,6 @@ describe('WorkItemLinkChildContents', () => {
propsData: {
canUpdate,
childItem,
- childPath: '/gitlab-org/gitlab-test/-/work_items/4',
},
});
};
diff --git a/spec/frontend/work_items/components/work_item_links/work_item_link_child_spec.js b/spec/frontend/work_items/components/work_item_links/work_item_link_child_spec.js
index 894c5c2b9fb..9addf6c3450 100644
--- a/spec/frontend/work_items/components/work_item_links/work_item_link_child_spec.js
+++ b/spec/frontend/work_items/components/work_item_links/work_item_link_child_spec.js
@@ -62,9 +62,6 @@ describe('WorkItemLinkChild', () => {
[getWorkItemTreeQuery, getWorkItemTreeQueryHandler],
[updateWorkItemMutation, mutationChangeParentHandler],
]),
- provide: {
- fullPath: 'gitlab-org/gitlab-test',
- },
propsData: {
canUpdate,
issuableGid,
@@ -93,26 +90,9 @@ describe('WorkItemLinkChild', () => {
expect(findWorkItemLinkChildContents().props()).toEqual({
childItem: workItemObjectiveWithChild,
canUpdate: true,
- childPath: '/gitlab-org/gitlab-test/-/work_items/12',
showTaskIcon: false,
});
});
-
- describe('with relative instance', () => {
- beforeEach(() => {
- window.gon = { relative_url_root: '/test' };
- createComponent({
- childItem: workItemObjectiveWithChild,
- workItemType: WORK_ITEM_TYPE_VALUE_OBJECTIVE,
- });
- });
-
- it('adds the relative url to child path value', () => {
- expect(findWorkItemLinkChildContents().props('childPath')).toBe(
- '/test/gitlab-org/gitlab-test/-/work_items/12',
- );
- });
- });
});
describe('nested children', () => {
diff --git a/spec/frontend/work_items/components/work_item_relationships/__snapshots__/work_item_relationship_list_spec.js.snap b/spec/frontend/work_items/components/work_item_relationships/__snapshots__/work_item_relationship_list_spec.js.snap
index 20dc9d0bc43..bbc19a011a5 100644
--- a/spec/frontend/work_items/components/work_item_relationships/__snapshots__/work_item_relationship_list_spec.js.snap
+++ b/spec/frontend/work_items/components/work_item_relationships/__snapshots__/work_item_relationship_list_spec.js.snap
@@ -22,7 +22,6 @@ exports[`WorkItemRelationshipList renders linked item list 1`] = `
<work-item-link-child-contents-stub
canupdate="true"
childitem="[object Object]"
- childpath="/test-project-path/-/work_items/83"
showtaskicon="true"
/>
</li>
diff --git a/spec/frontend/work_items/components/work_item_relationships/work_item_relationship_list_spec.js b/spec/frontend/work_items/components/work_item_relationships/work_item_relationship_list_spec.js
index 500a1bb9a6f..e26bea46ab1 100644
--- a/spec/frontend/work_items/components/work_item_relationships/work_item_relationship_list_spec.js
+++ b/spec/frontend/work_items/components/work_item_relationships/work_item_relationship_list_spec.js
@@ -14,7 +14,6 @@ describe('WorkItemRelationshipList', () => {
linkedItems,
heading,
canUpdate,
- workItemFullPath: 'test-project-path',
},
});
};
@@ -35,7 +34,6 @@ describe('WorkItemRelationshipList', () => {
expect(findWorkItemLinkChildContents().props()).toMatchObject({
childItem: mockLinkedItems[0].workItem,
canUpdate: true,
- childPath: '/test-project-path/-/work_items/83',
showTaskIcon: true,
});
});
diff --git a/spec/frontend/work_items/mock_data.js b/spec/frontend/work_items/mock_data.js
index c73552cf1fe..fc405f626c6 100644
--- a/spec/frontend/work_items/mock_data.js
+++ b/spec/frontend/work_items/mock_data.js
@@ -489,6 +489,7 @@ export const mockBlockingLinkedItem = {
state: 'OPEN',
createdAt: '2023-03-28T10:50:16Z',
closedAt: null,
+ webUrl: '/gitlab-org/gitlab-test/-/work_items/83',
widgets: [],
__typename: 'WorkItem',
},
@@ -521,6 +522,7 @@ export const mockLinkedItems = {
state: 'OPEN',
createdAt: '2023-03-28T10:50:16Z',
closedAt: null,
+ webUrl: '/gitlab-org/gitlab-test/-/work_items/83',
widgets: [],
__typename: 'WorkItem',
},
@@ -543,6 +545,7 @@ export const mockLinkedItems = {
state: 'OPEN',
createdAt: '2023-03-28T10:50:16Z',
closedAt: null,
+ webUrl: '/gitlab-org/gitlab-test/-/work_items/55',
widgets: [],
__typename: 'WorkItem',
},
@@ -565,6 +568,7 @@ export const mockLinkedItems = {
state: 'OPEN',
createdAt: '2023-03-28T10:50:16Z',
closedAt: null,
+ webUrl: '/gitlab-org/gitlab-test/-/work_items/56',
widgets: [],
__typename: 'WorkItem',
},
@@ -1121,6 +1125,7 @@ export const workItemTask = {
confidential: false,
createdAt: '2022-08-03T12:41:54Z',
closedAt: null,
+ webUrl: '/gitlab-org/gitlab-test/-/work_items/4',
widgets: [],
__typename: 'WorkItem',
};
diff --git a/spec/frontend/work_items/utils_spec.js b/spec/frontend/work_items/utils_spec.js
index 8a49140119d..aa24b80cf08 100644
--- a/spec/frontend/work_items/utils_spec.js
+++ b/spec/frontend/work_items/utils_spec.js
@@ -1,4 +1,4 @@
-import { autocompleteDataSources, markdownPreviewPath, workItemPath } from '~/work_items/utils';
+import { autocompleteDataSources, markdownPreviewPath } from '~/work_items/utils';
describe('autocompleteDataSources', () => {
beforeEach(() => {
@@ -25,14 +25,3 @@ describe('markdownPreviewPath', () => {
);
});
});
-
-describe('workItemPath', () => {
- it('returns corrrect data sources', () => {
- expect(workItemPath('project/group', '2')).toEqual('/project/group/-/work_items/2');
- });
-
- it('returns corrrect data sources with relative url root', () => {
- gon.relative_url_root = '/foobar';
- expect(workItemPath('project/group', '2')).toEqual('/foobar/project/group/-/work_items/2');
- });
-});