Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
bb8eae40
Commit
bb8eae40
authored
Oct 30, 2019
by
Winnie Hellmann
Committed by
Fatih Acet
Oct 30, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Reuse PathIdSeparator constants
parent
01ba510d
Changes
17
Hide whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
47 additions
and
36 deletions
+47
-36
ee/app/assets/javascripts/epic/components/epic_body.vue
ee/app/assets/javascripts/epic/components/epic_body.vue
+4
-2
ee/app/assets/javascripts/related_issues/components/related_issues_root.vue
...scripts/related_issues/components/related_issues_root.vue
+2
-1
ee/app/assets/javascripts/related_issues/constants.js
ee/app/assets/javascripts/related_issues/constants.js
+5
-0
ee/app/assets/javascripts/related_items_tree/components/related_items_tree_app.vue
.../related_items_tree/components/related_items_tree_app.vue
+1
-2
ee/app/assets/javascripts/related_items_tree/constants.js
ee/app/assets/javascripts/related_items_tree/constants.js
+0
-5
ee/app/assets/javascripts/related_items_tree/store/getters.js
...pp/assets/javascripts/related_items_tree/store/getters.js
+2
-2
ee/app/assets/javascripts/related_items_tree/utils/epic_utils.js
...assets/javascripts/related_items_tree/utils/epic_utils.js
+2
-1
ee/spec/frontend/related_issues/components/related_issuable_input_spec.js
.../related_issues/components/related_issuable_input_spec.js
+2
-2
ee/spec/frontend/related_items_tree/utils/epic_utils_spec.js
ee/spec/frontend/related_items_tree/utils/epic_utils_spec.js
+2
-1
ee/spec/javascripts/issuable/related_issues/components/add_issuable_form_spec.js
...uable/related_issues/components/add_issuable_form_spec.js
+2
-1
ee/spec/javascripts/issuable/related_issues/components/issue_token_spec.js
...ts/issuable/related_issues/components/issue_token_spec.js
+2
-1
ee/spec/javascripts/issuable/related_issues/components/related_issues_block_spec.js
...le/related_issues/components/related_issues_block_spec.js
+12
-11
ee/spec/javascripts/related_items_tree/components/tree_item_body_spec.js
...ipts/related_items_tree/components/tree_item_body_spec.js
+2
-1
ee/spec/javascripts/related_items_tree/components/tree_item_remove_modal_spec.js
...ated_items_tree/components/tree_item_remove_modal_spec.js
+2
-1
ee/spec/javascripts/related_items_tree/components/tree_item_spec.js
...vascripts/related_items_tree/components/tree_item_spec.js
+2
-1
ee/spec/javascripts/related_items_tree/store/actions_spec.js
ee/spec/javascripts/related_items_tree/store/actions_spec.js
+3
-3
spec/frontend/vue_shared/components/issue/related_issuable_item_spec.js
...vue_shared/components/issue/related_issuable_item_spec.js
+2
-1
No files found.
ee/app/assets/javascripts/epic/components/epic_body.vue
View file @
bb8eae40
<
script
>
<
script
>
import
{
mapState
,
mapGetters
}
from
'
vuex
'
;
import
{
mapState
,
mapGetters
}
from
'
vuex
'
;
import
{
PathIdSeparator
}
from
'
ee/related_issues/constants
'
;
import
IssuableBody
from
'
~/issue_show/components/app.vue
'
;
import
IssuableBody
from
'
~/issue_show/components/app.vue
'
;
import
IssuableSidebar
from
'
~/issuable_sidebar/components/sidebar_app.vue
'
;
import
IssuableSidebar
from
'
~/issuable_sidebar/components/sidebar_app.vue
'
;
import
RelatedItems
from
'
ee/related_issues/components/related_issues_root.vue
'
;
import
RelatedItems
from
'
ee/related_issues/components/related_issues_root.vue
'
;
...
@@ -8,7 +10,7 @@ import RelatedItems from 'ee/related_issues/components/related_issues_root.vue';
...
@@ -8,7 +10,7 @@ import RelatedItems from 'ee/related_issues/components/related_issues_root.vue';
import
EpicSidebar
from
'
./epic_sidebar.vue
'
;
import
EpicSidebar
from
'
./epic_sidebar.vue
'
;
export
default
{
export
default
{
epicsPathIdSeparator
:
'
&
'
,
PathIdSeparator
,
components
:
{
components
:
{
IssuableBody
,
IssuableBody
,
IssuableSidebar
,
IssuableSidebar
,
...
@@ -78,7 +80,7 @@ export default {
...
@@ -78,7 +80,7 @@ export default {
:can-admin=
"canAdmin"
:can-admin=
"canAdmin"
:can-reorder=
"canAdmin"
:can-reorder=
"canAdmin"
:allow-auto-complete=
"false"
:allow-auto-complete=
"false"
:path-id-separator=
"$options.
epicsPathIdSeparator
"
:path-id-separator=
"$options.
PathIdSeparator.Epic
"
:title=
"__('Epics')"
:title=
"__('Epics')"
issuable-type=
"epic"
issuable-type=
"epic"
css-class=
"js-related-epics-block"
css-class=
"js-related-epics-block"
...
...
ee/app/assets/javascripts/related_issues/components/related_issues_root.vue
View file @
bb8eae40
...
@@ -34,6 +34,7 @@ import {
...
@@ -34,6 +34,7 @@ import {
pathIndeterminateErrorMap
,
pathIndeterminateErrorMap
,
addRelatedIssueErrorMap
,
addRelatedIssueErrorMap
,
issuableTypesMap
,
issuableTypesMap
,
PathIdSeparator
,
}
from
'
../constants
'
;
}
from
'
../constants
'
;
export
default
{
export
default
{
...
@@ -79,7 +80,7 @@ export default {
...
@@ -79,7 +80,7 @@ export default {
pathIdSeparator
:
{
pathIdSeparator
:
{
type
:
String
,
type
:
String
,
required
:
false
,
required
:
false
,
default
:
'
#
'
,
default
:
PathIdSeparator
.
Issue
,
},
},
cssClass
:
{
cssClass
:
{
type
:
String
,
type
:
String
,
...
...
ee/app/assets/javascripts/related_issues/constants.js
View file @
bb8eae40
...
@@ -59,3 +59,8 @@ export const issuableQaClassMap = {
...
@@ -59,3 +59,8 @@ export const issuableQaClassMap = {
[
issuableTypesMap
.
ISSUE
]:
'
qa-add-issues-button
'
,
[
issuableTypesMap
.
ISSUE
]:
'
qa-add-issues-button
'
,
[
issuableTypesMap
.
EPIC
]:
'
qa-add-epics-button
'
,
[
issuableTypesMap
.
EPIC
]:
'
qa-add-epics-button
'
,
};
};
export
const
PathIdSeparator
=
{
Epic
:
'
&
'
,
Issue
:
'
#
'
,
};
ee/app/assets/javascripts/related_items_tree/components/related_items_tree_app.vue
View file @
bb8eae40
...
@@ -14,10 +14,9 @@ import TreeItemRemoveModal from './tree_item_remove_modal.vue';
...
@@ -14,10 +14,9 @@ import TreeItemRemoveModal from './tree_item_remove_modal.vue';
import
RelatedItemsTreeHeader
from
'
./related_items_tree_header.vue
'
;
import
RelatedItemsTreeHeader
from
'
./related_items_tree_header.vue
'
;
import
RelatedItemsTreeBody
from
'
./related_items_tree_body.vue
'
;
import
RelatedItemsTreeBody
from
'
./related_items_tree_body.vue
'
;
import
{
PathIdSeparator
,
OVERFLOW_AFTER
}
from
'
../constants
'
;
import
{
OVERFLOW_AFTER
}
from
'
../constants
'
;
export
default
{
export
default
{
PathIdSeparator
,
OVERFLOW_AFTER
,
OVERFLOW_AFTER
,
components
:
{
components
:
{
GlLoadingIcon
,
GlLoadingIcon
,
...
...
ee/app/assets/javascripts/related_items_tree/constants.js
View file @
bb8eae40
...
@@ -12,11 +12,6 @@ export const ChildState = {
...
@@ -12,11 +12,6 @@ export const ChildState = {
Closed
:
'
closed
'
,
Closed
:
'
closed
'
,
};
};
export
const
PathIdSeparator
=
{
Epic
:
'
&
'
,
Issue
:
'
#
'
,
};
export
const
idProp
=
{
export
const
idProp
=
{
Epic
:
'
id
'
,
Epic
:
'
id
'
,
Issue
:
'
epicIssueId
'
,
Issue
:
'
epicIssueId
'
,
...
...
ee/app/assets/javascripts/related_items_tree/store/getters.js
View file @
bb8eae40
import
{
issuableTypesMap
}
from
'
ee/related_issues/constants
'
;
import
{
issuableTypesMap
,
PathIdSeparator
}
from
'
ee/related_issues/constants
'
;
import
{
ChildType
,
PathIdSeparator
}
from
'
../constants
'
;
import
{
ChildType
}
from
'
../constants
'
;
export
const
autoCompleteSources
=
()
=>
gl
.
GfmAutoComplete
&&
gl
.
GfmAutoComplete
.
dataSources
;
export
const
autoCompleteSources
=
()
=>
gl
.
GfmAutoComplete
&&
gl
.
GfmAutoComplete
.
dataSources
;
...
...
ee/app/assets/javascripts/related_items_tree/utils/epic_utils.js
View file @
bb8eae40
import
createGqClient
from
'
~/lib/graphql
'
;
import
createGqClient
from
'
~/lib/graphql
'
;
import
{
ChildType
,
PathIdSeparator
}
from
'
../constants
'
;
import
{
PathIdSeparator
}
from
'
ee/related_issues/constants
'
;
import
{
ChildType
}
from
'
../constants
'
;
export
const
gqClient
=
createGqClient
();
export
const
gqClient
=
createGqClient
();
...
...
ee/spec/frontend/related_issues/components/related_issuable_input_spec.js
View file @
bb8eae40
import
{
shallowMount
}
from
'
@vue/test-utils
'
;
import
{
shallowMount
}
from
'
@vue/test-utils
'
;
import
{
TEST_HOST
}
from
'
helpers/test_constants
'
;
import
{
TEST_HOST
}
from
'
helpers/test_constants
'
;
import
{
issuableTypesMap
}
from
'
ee/related_issues/constants
'
;
import
{
issuableTypesMap
,
PathIdSeparator
}
from
'
ee/related_issues/constants
'
;
import
RelatedIssuableInput
from
'
ee/related_issues/components/related_issuable_input.vue
'
;
import
RelatedIssuableInput
from
'
ee/related_issues/components/related_issuable_input.vue
'
;
jest
.
mock
(
'
ee_else_ce/gfm_auto_complete
'
,
()
=>
({
jest
.
mock
(
'
ee_else_ce/gfm_auto_complete
'
,
()
=>
({
...
@@ -20,7 +20,7 @@ describe('RelatedIssuableInput', () => {
...
@@ -20,7 +20,7 @@ describe('RelatedIssuableInput', () => {
propsData
=
{
propsData
=
{
inputValue
:
''
,
inputValue
:
''
,
references
:
[],
references
:
[],
pathIdSeparator
:
'
#
'
,
pathIdSeparator
:
PathIdSeparator
.
Issue
,
issuableType
:
issuableTypesMap
.
issue
,
issuableType
:
issuableTypesMap
.
issue
,
autoCompleteSources
:
{
autoCompleteSources
:
{
issues
:
`
${
TEST_HOST
}
/h5bp/html5-boilerplate/-/autocomplete_sources/issues`
,
issues
:
`
${
TEST_HOST
}
/h5bp/html5-boilerplate/-/autocomplete_sources/issues`
,
...
...
ee/spec/frontend/related_items_tree/utils/epic_utils_spec.js
View file @
bb8eae40
import
*
as
epicUtils
from
'
ee/related_items_tree/utils/epic_utils
'
;
import
*
as
epicUtils
from
'
ee/related_items_tree/utils/epic_utils
'
;
import
{
ChildType
,
PathIdSeparator
}
from
'
ee/related_items_tree/constants
'
;
import
{
PathIdSeparator
}
from
'
ee/related_issues/constants
'
;
import
{
ChildType
}
from
'
ee/related_items_tree/constants
'
;
import
{
import
{
mockQueryResponse
,
mockQueryResponse
,
...
...
ee/spec/javascripts/issuable/related_issues/components/add_issuable_form_spec.js
View file @
bb8eae40
import
Vue
from
'
vue
'
;
import
Vue
from
'
vue
'
;
import
{
PathIdSeparator
}
from
'
ee/related_issues/constants
'
;
import
addIssuableForm
from
'
ee/related_issues/components/add_issuable_form.vue
'
;
import
addIssuableForm
from
'
ee/related_issues/components/add_issuable_form.vue
'
;
const
issuable1
=
{
const
issuable1
=
{
...
@@ -19,7 +20,7 @@ const issuable2 = {
...
@@ -19,7 +20,7 @@ const issuable2 = {
state
:
'
opened
'
,
state
:
'
opened
'
,
};
};
const
pathIdSeparator
=
'
#
'
;
const
pathIdSeparator
=
PathIdSeparator
.
Issue
;
describe
(
'
AddIssuableForm
'
,
()
=>
{
describe
(
'
AddIssuableForm
'
,
()
=>
{
let
AddIssuableForm
;
let
AddIssuableForm
;
...
...
ee/spec/javascripts/issuable/related_issues/components/issue_token_spec.js
View file @
bb8eae40
import
Vue
from
'
vue
'
;
import
Vue
from
'
vue
'
;
import
{
PathIdSeparator
}
from
'
ee/related_issues/constants
'
;
import
issueToken
from
'
ee/related_issues/components/issue_token.vue
'
;
import
issueToken
from
'
ee/related_issues/components/issue_token.vue
'
;
describe
(
'
IssueToken
'
,
()
=>
{
describe
(
'
IssueToken
'
,
()
=>
{
const
idKey
=
200
;
const
idKey
=
200
;
const
displayReference
=
'
foo/bar#123
'
;
const
displayReference
=
'
foo/bar#123
'
;
const
title
=
'
some title
'
;
const
title
=
'
some title
'
;
const
pathIdSeparator
=
'
#
'
;
const
pathIdSeparator
=
PathIdSeparator
.
Issue
;
const
eventNamespace
=
'
pendingIssuable
'
;
const
eventNamespace
=
'
pendingIssuable
'
;
let
IssueToken
;
let
IssueToken
;
let
vm
;
let
vm
;
...
...
ee/spec/javascripts/issuable/related_issues/components/related_issues_block_spec.js
View file @
bb8eae40
...
@@ -7,6 +7,7 @@ import {
...
@@ -7,6 +7,7 @@ import {
issuable4
,
issuable4
,
issuable5
,
issuable5
,
}
from
'
spec/vue_shared/components/issue/related_issuable_mock_data
'
;
}
from
'
spec/vue_shared/components/issue/related_issuable_mock_data
'
;
import
{
PathIdSeparator
}
from
'
ee/related_issues/constants
'
;
describe
(
'
RelatedIssuesBlock
'
,
()
=>
{
describe
(
'
RelatedIssuesBlock
'
,
()
=>
{
let
RelatedIssuesBlock
;
let
RelatedIssuesBlock
;
...
@@ -26,7 +27,7 @@ describe('RelatedIssuesBlock', () => {
...
@@ -26,7 +27,7 @@ describe('RelatedIssuesBlock', () => {
beforeEach
(()
=>
{
beforeEach
(()
=>
{
vm
=
new
RelatedIssuesBlock
({
vm
=
new
RelatedIssuesBlock
({
propsData
:
{
propsData
:
{
pathIdSeparator
:
'
#
'
,
pathIdSeparator
:
PathIdSeparator
.
Issue
,
issuableType
:
'
issue
'
,
issuableType
:
'
issue
'
,
},
},
}).
$mount
();
}).
$mount
();
...
@@ -49,7 +50,7 @@ describe('RelatedIssuesBlock', () => {
...
@@ -49,7 +50,7 @@ describe('RelatedIssuesBlock', () => {
beforeEach
(()
=>
{
beforeEach
(()
=>
{
vm
=
new
RelatedIssuesBlock
({
vm
=
new
RelatedIssuesBlock
({
propsData
:
{
propsData
:
{
pathIdSeparator
:
'
#
'
,
pathIdSeparator
:
PathIdSeparator
.
Issue
,
isFetching
:
true
,
isFetching
:
true
,
issuableType
:
'
issue
'
,
issuableType
:
'
issue
'
,
},
},
...
@@ -69,7 +70,7 @@ describe('RelatedIssuesBlock', () => {
...
@@ -69,7 +70,7 @@ describe('RelatedIssuesBlock', () => {
beforeEach
(()
=>
{
beforeEach
(()
=>
{
vm
=
new
RelatedIssuesBlock
({
vm
=
new
RelatedIssuesBlock
({
propsData
:
{
propsData
:
{
pathIdSeparator
:
'
#
'
,
pathIdSeparator
:
PathIdSeparator
.
Issue
,
canAdmin
:
true
,
canAdmin
:
true
,
issuableType
:
'
issue
'
,
issuableType
:
'
issue
'
,
},
},
...
@@ -85,7 +86,7 @@ describe('RelatedIssuesBlock', () => {
...
@@ -85,7 +86,7 @@ describe('RelatedIssuesBlock', () => {
beforeEach
(()
=>
{
beforeEach
(()
=>
{
vm
=
new
RelatedIssuesBlock
({
vm
=
new
RelatedIssuesBlock
({
propsData
:
{
propsData
:
{
pathIdSeparator
:
'
#
'
,
pathIdSeparator
:
PathIdSeparator
.
Issue
,
isFormVisible
:
true
,
isFormVisible
:
true
,
issuableType
:
'
issue
'
,
issuableType
:
'
issue
'
,
},
},
...
@@ -101,7 +102,7 @@ describe('RelatedIssuesBlock', () => {
...
@@ -101,7 +102,7 @@ describe('RelatedIssuesBlock', () => {
beforeEach
(()
=>
{
beforeEach
(()
=>
{
vm
=
new
RelatedIssuesBlock
({
vm
=
new
RelatedIssuesBlock
({
propsData
:
{
propsData
:
{
pathIdSeparator
:
'
#
'
,
pathIdSeparator
:
PathIdSeparator
.
Issue
,
relatedIssues
:
[
issuable1
,
issuable2
],
relatedIssues
:
[
issuable1
,
issuable2
],
issuableType
:
'
issue
'
,
issuableType
:
'
issue
'
,
},
},
...
@@ -117,7 +118,7 @@ describe('RelatedIssuesBlock', () => {
...
@@ -117,7 +118,7 @@ describe('RelatedIssuesBlock', () => {
beforeEach
(()
=>
{
beforeEach
(()
=>
{
vm
=
new
RelatedIssuesBlock
({
vm
=
new
RelatedIssuesBlock
({
propsData
:
{
propsData
:
{
pathIdSeparator
:
'
#
'
,
pathIdSeparator
:
PathIdSeparator
.
Issue
,
relatedIssues
:
[
issuable1
,
issuable2
,
issuable3
,
issuable4
,
issuable5
],
relatedIssues
:
[
issuable1
,
issuable2
,
issuable3
,
issuable4
,
issuable5
],
issuableType
:
'
issue
'
,
issuableType
:
'
issue
'
,
},
},
...
@@ -167,7 +168,7 @@ describe('RelatedIssuesBlock', () => {
...
@@ -167,7 +168,7 @@ describe('RelatedIssuesBlock', () => {
it
(
`issuableType=
${
issuableType
}
is passed`
,
()
=>
{
it
(
`issuableType=
${
issuableType
}
is passed`
,
()
=>
{
vm
=
new
RelatedIssuesBlock
({
vm
=
new
RelatedIssuesBlock
({
propsData
:
{
propsData
:
{
pathIdSeparator
:
'
#
'
,
pathIdSeparator
:
PathIdSeparator
.
Issue
,
issuableType
,
issuableType
,
},
},
}).
$mount
();
}).
$mount
();
...
@@ -183,7 +184,7 @@ describe('RelatedIssuesBlock', () => {
...
@@ -183,7 +184,7 @@ describe('RelatedIssuesBlock', () => {
it
(
'
issuableType is epic
'
,
()
=>
{
it
(
'
issuableType is epic
'
,
()
=>
{
vm
=
new
RelatedIssuesBlock
({
vm
=
new
RelatedIssuesBlock
({
propsData
:
{
propsData
:
{
pathIdSeparator
:
'
#
'
,
pathIdSeparator
:
PathIdSeparator
.
Issue
,
issuableType
:
'
issue
'
,
issuableType
:
'
issue
'
,
},
},
}).
$mount
();
}).
$mount
();
...
@@ -196,7 +197,7 @@ describe('RelatedIssuesBlock', () => {
...
@@ -196,7 +197,7 @@ describe('RelatedIssuesBlock', () => {
it
(
'
issuableType is issue
'
,
()
=>
{
it
(
'
issuableType is issue
'
,
()
=>
{
vm
=
new
RelatedIssuesBlock
({
vm
=
new
RelatedIssuesBlock
({
propsData
:
{
propsData
:
{
pathIdSeparator
:
'
#
'
,
pathIdSeparator
:
PathIdSeparator
.
Issue
,
issuableType
:
'
epic
'
,
issuableType
:
'
epic
'
,
},
},
}).
$mount
();
}).
$mount
();
...
@@ -217,7 +218,7 @@ describe('RelatedIssuesBlock', () => {
...
@@ -217,7 +218,7 @@ describe('RelatedIssuesBlock', () => {
it
(
'
issuableType is epic
'
,
()
=>
{
it
(
'
issuableType is epic
'
,
()
=>
{
vm
=
new
RelatedIssuesBlock
({
vm
=
new
RelatedIssuesBlock
({
propsData
:
{
propsData
:
{
pathIdSeparator
:
'
#
'
,
pathIdSeparator
:
PathIdSeparator
.
Issue
,
issuableType
:
'
epic
'
,
issuableType
:
'
epic
'
,
relatedIssues
,
relatedIssues
,
},
},
...
@@ -233,7 +234,7 @@ describe('RelatedIssuesBlock', () => {
...
@@ -233,7 +234,7 @@ describe('RelatedIssuesBlock', () => {
it
(
'
issuableType is issue
'
,
()
=>
{
it
(
'
issuableType is issue
'
,
()
=>
{
vm
=
new
RelatedIssuesBlock
({
vm
=
new
RelatedIssuesBlock
({
propsData
:
{
propsData
:
{
pathIdSeparator
:
'
#
'
,
pathIdSeparator
:
PathIdSeparator
.
Issue
,
issuableType
:
'
issue
'
,
issuableType
:
'
issue
'
,
relatedIssues
,
relatedIssues
,
},
},
...
...
ee/spec/javascripts/related_items_tree/components/tree_item_body_spec.js
View file @
bb8eae40
...
@@ -13,12 +13,13 @@ import StateTooltip from 'ee/related_items_tree/components/state_tooltip.vue';
...
@@ -13,12 +13,13 @@ import StateTooltip from 'ee/related_items_tree/components/state_tooltip.vue';
import
createDefaultStore
from
'
ee/related_items_tree/store
'
;
import
createDefaultStore
from
'
ee/related_items_tree/store
'
;
import
*
as
epicUtils
from
'
ee/related_items_tree/utils/epic_utils
'
;
import
*
as
epicUtils
from
'
ee/related_items_tree/utils/epic_utils
'
;
import
{
ChildType
,
ChildState
}
from
'
ee/related_items_tree/constants
'
;
import
{
ChildType
,
ChildState
}
from
'
ee/related_items_tree/constants
'
;
import
{
PathIdSeparator
}
from
'
ee/related_issues/constants
'
;
import
{
mockParentItem
,
mockInitialConfig
,
mockQueryResponse
,
mockIssue1
}
from
'
../mock_data
'
;
import
{
mockParentItem
,
mockInitialConfig
,
mockQueryResponse
,
mockIssue1
}
from
'
../mock_data
'
;
const
mockItem
=
Object
.
assign
({},
mockIssue1
,
{
const
mockItem
=
Object
.
assign
({},
mockIssue1
,
{
type
:
ChildType
.
Issue
,
type
:
ChildType
.
Issue
,
pathIdSeparator
:
'
#
'
,
pathIdSeparator
:
PathIdSeparator
.
Issue
,
assignees
:
epicUtils
.
extractIssueAssignees
(
mockIssue1
.
assignees
),
assignees
:
epicUtils
.
extractIssueAssignees
(
mockIssue1
.
assignees
),
});
});
...
...
ee/spec/javascripts/related_items_tree/components/tree_item_remove_modal_spec.js
View file @
bb8eae40
...
@@ -6,12 +6,13 @@ import TreeItemRemoveModal from 'ee/related_items_tree/components/tree_item_remo
...
@@ -6,12 +6,13 @@ import TreeItemRemoveModal from 'ee/related_items_tree/components/tree_item_remo
import
createDefaultStore
from
'
ee/related_items_tree/store
'
;
import
createDefaultStore
from
'
ee/related_items_tree/store
'
;
import
*
as
epicUtils
from
'
ee/related_items_tree/utils/epic_utils
'
;
import
*
as
epicUtils
from
'
ee/related_items_tree/utils/epic_utils
'
;
import
{
ChildType
}
from
'
ee/related_items_tree/constants
'
;
import
{
ChildType
}
from
'
ee/related_items_tree/constants
'
;
import
{
PathIdSeparator
}
from
'
ee/related_issues/constants
'
;
import
{
mockParentItem
,
mockQueryResponse
,
mockIssue1
}
from
'
../mock_data
'
;
import
{
mockParentItem
,
mockQueryResponse
,
mockIssue1
}
from
'
../mock_data
'
;
const
mockItem
=
Object
.
assign
({},
mockIssue1
,
{
const
mockItem
=
Object
.
assign
({},
mockIssue1
,
{
type
:
ChildType
.
Issue
,
type
:
ChildType
.
Issue
,
pathIdSeparator
:
'
#
'
,
pathIdSeparator
:
PathIdSeparator
.
Issue
,
assignees
:
epicUtils
.
extractIssueAssignees
(
mockIssue1
.
assignees
),
assignees
:
epicUtils
.
extractIssueAssignees
(
mockIssue1
.
assignees
),
});
});
...
...
ee/spec/javascripts/related_items_tree/components/tree_item_spec.js
View file @
bb8eae40
...
@@ -10,12 +10,13 @@ import TreeRoot from 'ee/related_items_tree/components/tree_root.vue';
...
@@ -10,12 +10,13 @@ import TreeRoot from 'ee/related_items_tree/components/tree_root.vue';
import
createDefaultStore
from
'
ee/related_items_tree/store
'
;
import
createDefaultStore
from
'
ee/related_items_tree/store
'
;
import
*
as
epicUtils
from
'
ee/related_items_tree/utils/epic_utils
'
;
import
*
as
epicUtils
from
'
ee/related_items_tree/utils/epic_utils
'
;
import
{
ChildType
}
from
'
ee/related_items_tree/constants
'
;
import
{
ChildType
}
from
'
ee/related_items_tree/constants
'
;
import
{
PathIdSeparator
}
from
'
ee/related_issues/constants
'
;
import
{
mockParentItem
,
mockQueryResponse
,
mockEpic1
}
from
'
../mock_data
'
;
import
{
mockParentItem
,
mockQueryResponse
,
mockEpic1
}
from
'
../mock_data
'
;
const
mockItem
=
Object
.
assign
({},
mockEpic1
,
{
const
mockItem
=
Object
.
assign
({},
mockEpic1
,
{
type
:
ChildType
.
Epic
,
type
:
ChildType
.
Epic
,
pathIdSeparator
:
'
&
'
,
pathIdSeparator
:
PathIdSeparator
.
Epic
,
});
});
const
createComponent
=
(
parentItem
=
mockParentItem
,
item
=
mockItem
)
=>
{
const
createComponent
=
(
parentItem
=
mockParentItem
,
item
=
mockItem
)
=>
{
...
...
ee/spec/javascripts/related_items_tree/store/actions_spec.js
View file @
bb8eae40
...
@@ -5,8 +5,8 @@ import * as actions from 'ee/related_items_tree/store/actions';
...
@@ -5,8 +5,8 @@ import * as actions from 'ee/related_items_tree/store/actions';
import
*
as
types
from
'
ee/related_items_tree/store/mutation_types
'
;
import
*
as
types
from
'
ee/related_items_tree/store/mutation_types
'
;
import
*
as
epicUtils
from
'
ee/related_items_tree/utils/epic_utils
'
;
import
*
as
epicUtils
from
'
ee/related_items_tree/utils/epic_utils
'
;
import
{
ChildType
,
ChildState
,
PathIdSeparator
}
from
'
ee/related_items_tree/constants
'
;
import
{
ChildType
,
ChildState
}
from
'
ee/related_items_tree/constants
'
;
import
{
issuableTypesMap
}
from
'
ee/related_issues/constants
'
;
import
{
issuableTypesMap
,
PathIdSeparator
}
from
'
ee/related_issues/constants
'
;
import
axios
from
'
~/lib/utils/axios_utils
'
;
import
axios
from
'
~/lib/utils/axios_utils
'
;
import
testAction
from
'
spec/helpers/vuex_action_helper
'
;
import
testAction
from
'
spec/helpers/vuex_action_helper
'
;
...
@@ -970,7 +970,7 @@ describe('RelatedItemTree', () => {
...
@@ -970,7 +970,7 @@ describe('RelatedItemTree', () => {
const
createdEpic
=
Object
.
assign
({},
mockEpics
[
0
],
{
const
createdEpic
=
Object
.
assign
({},
mockEpics
[
0
],
{
id
:
`gid://gitlab/Epic/
${
mockEpics
[
0
].
id
}
`
,
id
:
`gid://gitlab/Epic/
${
mockEpics
[
0
].
id
}
`
,
reference
:
`
${
mockEpics
[
0
].
group
.
fullPath
}${
mockEpics
[
0
].
reference
}
`
,
reference
:
`
${
mockEpics
[
0
].
group
.
fullPath
}${
mockEpics
[
0
].
reference
}
`
,
pathIdSeparator
:
'
&
'
,
pathIdSeparator
:
PathIdSeparator
.
Epic
,
});
});
state
.
epicsBeginAtIndex
=
0
;
state
.
epicsBeginAtIndex
=
0
;
state
.
parentItem
=
{
state
.
parentItem
=
{
...
...
spec/frontend/vue_shared/components/issue/related_issuable_item_spec.js
View file @
bb8eae40
import
Vue
from
'
vue
'
;
import
Vue
from
'
vue
'
;
import
{
formatDate
}
from
'
~/lib/utils/datetime_utility
'
;
import
{
formatDate
}
from
'
~/lib/utils/datetime_utility
'
;
import
{
mount
,
createLocalVue
}
from
'
@vue/test-utils
'
;
import
{
mount
,
createLocalVue
}
from
'
@vue/test-utils
'
;
import
{
PathIdSeparator
}
from
'
ee/related_issues/constants
'
;
import
RelatedIssuableItem
from
'
~/vue_shared/components/issue/related_issuable_item.vue
'
;
import
RelatedIssuableItem
from
'
~/vue_shared/components/issue/related_issuable_item.vue
'
;
import
{
import
{
defaultAssignees
,
defaultAssignees
,
...
@@ -12,7 +13,7 @@ describe('RelatedIssuableItem', () => {
...
@@ -12,7 +13,7 @@ describe('RelatedIssuableItem', () => {
const
props
=
{
const
props
=
{
idKey
:
1
,
idKey
:
1
,
displayReference
:
'
gitlab-org/gitlab-test#1
'
,
displayReference
:
'
gitlab-org/gitlab-test#1
'
,
pathIdSeparator
:
'
#
'
,
pathIdSeparator
:
PathIdSeparator
.
Issue
,
path
:
`
${
gl
.
TEST_HOST
}
/path`
,
path
:
`
${
gl
.
TEST_HOST
}
/path`
,
title
:
'
title
'
,
title
:
'
title
'
,
confidential
:
true
,
confidential
:
true
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment