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
aab9e61d
Commit
aab9e61d
authored
Aug 21, 2020
by
Coung Ngo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove isProject from iterations
isProject is not necessary as we can derive it from isGroup
parent
5cb22c05
Changes
11
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
20 additions
and
38 deletions
+20
-38
ee/app/assets/javascripts/iterations/components/iteration_report_summary.vue
...cripts/iterations/components/iteration_report_summary.vue
+0
-1
ee/app/assets/javascripts/iterations/components/iteration_report_tabs.vue
...vascripts/iterations/components/iteration_report_tabs.vue
+0
-1
ee/app/assets/javascripts/iterations/components/iterations.vue
...p/assets/javascripts/iterations/components/iterations.vue
+0
-1
ee/app/assets/javascripts/iterations/queries/iteration_issues.query.graphql
...scripts/iterations/queries/iteration_issues.query.graphql
+2
-3
ee/app/assets/javascripts/iterations/queries/iteration_issues_summary.query.graphql
...iterations/queries/iteration_issues_summary.query.graphql
+2
-7
ee/app/assets/javascripts/iterations/queries/iteration_list_item.fragment.graphql
...s/iterations/queries/iteration_list_item.fragment.graphql
+1
-1
ee/app/assets/javascripts/iterations/queries/iterations.query.graphql
...s/javascripts/iterations/queries/iterations.query.graphql
+5
-6
ee/spec/frontend/iterations/components/iteration_report_spec.js
...c/frontend/iterations/components/iteration_report_spec.js
+10
-8
ee/spec/frontend/iterations/components/iteration_report_summary_spec.js
...nd/iterations/components/iteration_report_summary_spec.js
+0
-2
ee/spec/frontend/iterations/components/iteration_report_tabs_spec.js
...ntend/iterations/components/iteration_report_tabs_spec.js
+0
-4
ee/spec/frontend/iterations/components/iterations_spec.js
ee/spec/frontend/iterations/components/iterations_spec.js
+0
-4
No files found.
ee/app/assets/javascripts/iterations/components/iteration_report_summary.vue
View file @
aab9e61d
...
...
@@ -57,7 +57,6 @@ export default {
fullPath
:
this
.
fullPath
,
id
:
getIdFromGraphQLId
(
this
.
iterationId
),
isGroup
:
this
.
namespaceType
===
Namespace
.
Group
,
isProject
:
this
.
namespaceType
===
Namespace
.
Project
,
};
},
completedPercent
()
{
...
...
ee/app/assets/javascripts/iterations/components/iteration_report_tabs.vue
View file @
aab9e61d
...
...
@@ -120,7 +120,6 @@ export default {
fullPath
:
this
.
fullPath
,
id
:
getIdFromGraphQLId
(
this
.
iterationId
),
isGroup
:
this
.
namespaceType
===
Namespace
.
Group
,
isProject
:
this
.
namespaceType
===
Namespace
.
Project
,
};
if
(
this
.
pagination
.
beforeCursor
)
{
...
...
ee/app/assets/javascripts/iterations/components/iterations.vue
View file @
aab9e61d
...
...
@@ -77,7 +77,6 @@ export default {
const
vars
=
{
fullPath
:
this
.
fullPath
,
isGroup
:
this
.
namespaceType
===
Namespace
.
Group
,
isProject
:
this
.
namespaceType
===
Namespace
.
Project
,
state
:
this
.
state
,
};
...
...
ee/app/assets/javascripts/iterations/queries/iteration_issues.query.graphql
View file @
aab9e61d
...
...
@@ -3,8 +3,7 @@
query
IterationIssues
(
$fullPath
:
ID
!
$id
:
ID
!
$isGroup
:
Boolean
=
false
$isProject
:
Boolean
=
false
$isGroup
:
Boolean
=
true
$beforeCursor
:
String
=
""
$afterCursor
:
String
=
""
$firstPageSize
:
Int
...
...
@@ -21,7 +20,7 @@ query IterationIssues(
...
IterationIssues
}
}
project
(
fullPath
:
$fullPath
)
@
include
(
if
:
$isProject
)
{
project
(
fullPath
:
$fullPath
)
@
skip
(
if
:
$isGroup
)
{
issues
(
iterationId
:
[
$id
]
before
:
$beforeCursor
...
...
ee/app/assets/javascripts/iterations/queries/iteration_issues_summary.query.graphql
View file @
aab9e61d
query
IterationIssuesSummary
(
$fullPath
:
ID
!
$id
:
ID
!
$isGroup
:
Boolean
=
false
$isProject
:
Boolean
=
false
)
{
query
IterationIssuesSummary
(
$fullPath
:
ID
!,
$id
:
ID
!,
$isGroup
:
Boolean
=
true
)
{
group
(
fullPath
:
$fullPath
)
@include
(
if
:
$isGroup
)
{
openIssues
:
issues
(
iterationId
:
[
$id
],
state
:
opened
,
assigneeId
:
"none"
)
{
count
...
...
@@ -15,7 +10,7 @@ query IterationIssuesSummary(
count
}
}
project
(
fullPath
:
$fullPath
)
@
include
(
if
:
$isProject
)
{
project
(
fullPath
:
$fullPath
)
@
skip
(
if
:
$isGroup
)
{
openIssues
:
issues
(
iterationId
:
[
$id
],
state
:
opened
,
assigneeId
:
"none"
)
{
count
}
...
...
ee/app/assets/javascripts/iterations/queries/iteration_list.fragment.graphql
→
ee/app/assets/javascripts/iterations/queries/iteration_list
_item
.fragment.graphql
View file @
aab9e61d
fragment
IterationList
on
Iteration
{
fragment
IterationList
Item
on
Iteration
{
dueDate
id
scopedPath
...
...
ee/app/assets/javascripts/iterations/queries/iterations.query.graphql
View file @
aab9e61d
#import "~/graphql_shared/fragments/pageInfo.fragment.graphql"
#import "./iteration_list.fragment.graphql"
#import "./iteration_list
_item
.fragment.graphql"
query
Iterations
(
$fullPath
:
ID
!
$isGroup
:
Boolean
=
false
$isProject
:
Boolean
=
false
$isGroup
:
Boolean
=
true
$state
:
IterationState
!
$beforeCursor
:
String
=
""
$afterCursor
:
String
=
""
...
...
@@ -21,14 +20,14 @@ query Iterations(
last
:
$lastPageSize
)
{
nodes
{
...
IterationList
...
IterationList
Item
}
pageInfo
{
...
PageInfo
}
}
}
project
(
fullPath
:
$fullPath
)
@
include
(
if
:
$isProject
)
{
project
(
fullPath
:
$fullPath
)
@
skip
(
if
:
$isGroup
)
{
iterations
(
state
:
$state
before
:
$beforeCursor
...
...
@@ -37,7 +36,7 @@ query Iterations(
last
:
$lastPageSize
)
{
nodes
{
...
IterationList
...
IterationList
Item
}
pageInfo
{
...
PageInfo
...
...
ee/spec/frontend/iterations/components/iteration_report_spec.js
View file @
aab9e61d
...
...
@@ -15,8 +15,6 @@ describe('Iterations report', () => {
const
findTopbar
=
()
=>
wrapper
.
find
({
ref
:
'
topbar
'
});
const
findTitle
=
()
=>
wrapper
.
find
({
ref
:
'
title
'
});
const
findDescription
=
()
=>
wrapper
.
find
({
ref
:
'
description
'
});
const
findIterationReportSummary
=
()
=>
wrapper
.
find
(
IterationReportSummary
);
const
findIterationReportTabs
=
()
=>
wrapper
.
find
(
IterationReportTabs
);
const
mountComponent
=
({
props
=
defaultProps
,
loading
=
false
}
=
{})
=>
{
wrapper
=
shallowMount
(
IterationReport
,
{
...
...
@@ -96,15 +94,19 @@ describe('Iterations report', () => {
});
it
(
'
passes correct props to IterationReportSummary
'
,
()
=>
{
expect
(
findIterationReportSummary
().
props
(
'
fullPath
'
)).
toBe
(
defaultProps
.
fullPath
);
expect
(
findIterationReportSummary
().
props
(
'
iterationId
'
)).
toBe
(
iteration
.
id
);
expect
(
findIterationReportSummary
().
props
(
'
namespaceType
'
)).
toBe
(
Namespace
.
Group
);
const
iterationReportSummary
=
wrapper
.
find
(
IterationReportSummary
);
expect
(
iterationReportSummary
.
props
(
'
fullPath
'
)).
toBe
(
defaultProps
.
fullPath
);
expect
(
iterationReportSummary
.
props
(
'
iterationId
'
)).
toBe
(
iteration
.
id
);
expect
(
iterationReportSummary
.
props
(
'
namespaceType
'
)).
toBe
(
Namespace
.
Group
);
});
it
(
'
passes correct props to IterationReportTabs
'
,
()
=>
{
expect
(
findIterationReportTabs
().
props
(
'
fullPath
'
)).
toBe
(
defaultProps
.
fullPath
);
expect
(
findIterationReportTabs
().
props
(
'
iterationId
'
)).
toBe
(
iteration
.
id
);
expect
(
findIterationReportTabs
().
props
(
'
namespaceType
'
)).
toBe
(
Namespace
.
Group
);
const
iterationReportTabs
=
wrapper
.
find
(
IterationReportTabs
);
expect
(
iterationReportTabs
.
props
(
'
fullPath
'
)).
toBe
(
defaultProps
.
fullPath
);
expect
(
iterationReportTabs
.
props
(
'
iterationId
'
)).
toBe
(
iteration
.
id
);
expect
(
iterationReportTabs
.
props
(
'
namespaceType
'
)).
toBe
(
Namespace
.
Group
);
});
});
});
ee/spec/frontend/iterations/components/iteration_report_summary_spec.js
View file @
aab9e61d
...
...
@@ -108,7 +108,6 @@ describe('Iterations report summary', () => {
expect
(
wrapper
.
vm
.
queryVariables
).
toEqual
({
...
expected
,
isGroup
:
true
,
isProject
:
false
,
});
});
});
...
...
@@ -125,7 +124,6 @@ describe('Iterations report summary', () => {
expect
(
wrapper
.
vm
.
queryVariables
).
toEqual
({
...
expected
,
isGroup
:
false
,
isProject
:
true
,
});
});
});
...
...
ee/spec/frontend/iterations/components/iteration_report_tabs_spec.js
View file @
aab9e61d
...
...
@@ -150,7 +150,6 @@ describe('Iterations report tabs', () => {
id
,
lastPageSize
:
20
,
isGroup
:
true
,
isProject
:
false
,
});
});
});
...
...
@@ -163,7 +162,6 @@ describe('Iterations report tabs', () => {
id
,
firstPageSize
:
20
,
isGroup
:
true
,
isProject
:
false
,
});
});
});
...
...
@@ -190,7 +188,6 @@ describe('Iterations report tabs', () => {
expect
(
wrapper
.
vm
.
queryVariables
).
toEqual
({
...
expected
,
isGroup
:
true
,
isProject
:
false
,
});
});
});
...
...
@@ -207,7 +204,6 @@ describe('Iterations report tabs', () => {
expect
(
wrapper
.
vm
.
queryVariables
).
toEqual
({
...
expected
,
isGroup
:
false
,
isProject
:
true
,
});
});
});
...
...
ee/spec/frontend/iterations/components/iterations_spec.js
View file @
aab9e61d
...
...
@@ -103,7 +103,6 @@ describe('Iterations', () => {
expect
(
wrapper
.
vm
.
queryVariables
).
toEqual
({
beforeCursor
:
'
first-item
'
,
isGroup
:
true
,
isProject
:
false
,
lastPageSize
:
20
,
fullPath
:
defaultProps
.
fullPath
,
state
:
'
opened
'
,
...
...
@@ -118,7 +117,6 @@ describe('Iterations', () => {
firstPageSize
:
20
,
fullPath
:
defaultProps
.
fullPath
,
isGroup
:
true
,
isProject
:
false
,
state
:
'
opened
'
,
});
});
...
...
@@ -161,7 +159,6 @@ describe('Iterations', () => {
expect
(
wrapper
.
vm
.
queryVariables
).
toEqual
({
...
expected
,
isGroup
:
true
,
isProject
:
false
,
});
});
});
...
...
@@ -178,7 +175,6 @@ describe('Iterations', () => {
expect
(
wrapper
.
vm
.
queryVariables
).
toEqual
({
...
expected
,
isGroup
:
false
,
isProject
:
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