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
5a19b0b5
Commit
5a19b0b5
authored
Feb 16, 2021
by
Florie Guibert
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fetch lists for epic boards
Review feedback
parent
7b4f9e53
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
22 additions
and
30 deletions
+22
-30
app/assets/javascripts/boards/components/board_content.vue
app/assets/javascripts/boards/components/board_content.vue
+1
-6
ee/app/assets/javascripts/boards/boards_util.js
ee/app/assets/javascripts/boards/boards_util.js
+1
-1
ee/app/assets/javascripts/boards/stores/actions.js
ee/app/assets/javascripts/boards/stores/actions.js
+3
-2
ee/app/assets/javascripts/epic_boards/index.js
ee/app/assets/javascripts/epic_boards/index.js
+0
-1
ee/spec/frontend/boards/stores/actions_spec.js
ee/spec/frontend/boards/stores/actions_spec.js
+14
-20
spec/frontend/boards/stores/mutations_spec.js
spec/frontend/boards/stores/mutations_spec.js
+3
-0
No files found.
app/assets/javascripts/boards/components/board_content.vue
View file @
5a19b0b5
...
...
@@ -20,11 +20,6 @@ export default {
GlAlert
,
},
mixins
:
[
glFeatureFlagMixin
()],
inject
:
{
isEpicBoard
:
{
default
:
false
,
},
},
props
:
{
lists
:
{
type
:
Array
,
...
...
@@ -41,7 +36,7 @@ export default {
},
},
computed
:
{
...
mapState
([
'
boardLists
'
,
'
error
'
]),
...
mapState
([
'
boardLists
'
,
'
error
'
,
'
isEpicBoard
'
]),
...
mapGetters
([
'
isSwimlanesOn
'
]),
boardListsToUse
()
{
return
this
.
glFeatures
.
graphqlBoardLists
||
this
.
isSwimlanesOn
||
this
.
isEpicBoard
...
...
ee/app/assets/javascripts/boards/boards_util.js
View file @
5a19b0b5
import
{
sortBy
}
from
'
lodash
'
;
import
{
getIdFromGraphQLId
}
from
'
~/graphql_shared/utils
'
;
import
{
urlParamsToObject
}
from
'
~/lib/utils/common_utils
'
;
import
{
objectToQuery
}
from
'
~/lib/utils/url_utility
'
;
import
{
getIdFromGraphQLId
}
from
'
~/graphql_shared/utils
'
;
import
{
IterationFilterType
,
IterationIDs
,
...
...
ee/app/assets/javascripts/boards/stores/actions.js
View file @
5a19b0b5
...
...
@@ -30,14 +30,14 @@ import {
import
{
EpicFilterType
,
IterationFilterType
,
GroupByParamType
}
from
'
../constants
'
;
import
epicQuery
from
'
../graphql/epic.query.graphql
'
;
import
epicBoardListsQuery
from
'
../graphql/epic_board_lists.query.graphql
'
;
import
epicsSwimlanesQuery
from
'
../graphql/epics_swimlanes.query.graphql
'
;
import
issueMoveListMutation
from
'
../graphql/issue_move_list.mutation.graphql
'
;
import
issueSetEpicMutation
from
'
../graphql/issue_set_epic.mutation.graphql
'
;
import
issueSetWeightMutation
from
'
../graphql/issue_set_weight.mutation.graphql
'
;
import
listUpdateLimitMetricsMutation
from
'
../graphql/list_update_limit_metrics.mutation.graphql
'
;
import
updateBoardEpicUserPreferencesMutation
from
'
../graphql/updateBoardEpicUserPreferences.mutation.graphql
'
;
import
epicBoardListsQuery
from
'
../graphql/epic_board_lists.query.graphql
'
;
import
listsEpicsQuery
from
'
../graphql/lists_epics.query.graphql
'
;
import
updateBoardEpicUserPreferencesMutation
from
'
../graphql/updateBoardEpicUserPreferences.mutation.graphql
'
;
import
boardsStoreEE
from
'
./boards_store_ee
'
;
import
*
as
types
from
'
./mutation_types
'
;
...
...
@@ -318,6 +318,7 @@ export default {
if
(
state
.
isEpicBoard
)
{
// This currently always fails. Epics will be loaded and displayed in the next iteration
// Issue: https://gitlab.com/gitlab-org/gitlab/-/issues/233438
return
fetchAndFormatListEpics
(
state
,
variables
)
.
then
(({
listEpics
,
listPageInfo
})
=>
{
commit
(
types
.
RECEIVE_ITEMS_FOR_LIST_SUCCESS
,
{
...
...
ee/app/assets/javascripts/epic_boards/index.js
View file @
5a19b0b5
...
...
@@ -61,7 +61,6 @@ export default () => {
?
parseInt
(
$boardApp
.
dataset
.
boardWeight
,
10
)
:
null
,
scopedLabelsAvailable
:
parseBoolean
(
$boardApp
.
dataset
.
scopedLabels
),
isEpicBoard
:
true
,
},
store
,
apolloProvider
,
...
...
ee/spec/frontend/boards/stores/actions_spec.js
View file @
5a19b0b5
...
...
@@ -136,16 +136,16 @@ describe('performSearch', () => {
});
describe
(
'
fetchLists
'
,
()
=>
{
it
(
'
should dispatch fetchIssueLists action when isEpicBoard is false on state
'
,
()
=>
{
testAction
({
it
(
'
should dispatch fetchIssueLists action when isEpicBoard is false on state
'
,
async
()
=>
{
await
testAction
({
action
:
actions
.
fetchLists
,
state
:
{
isEpicBoard
:
false
},
expectedActions
:
[{
type
:
'
fetchIssueLists
'
}],
});
});
it
(
'
should dispatch fetchEpicLists action when isEpicBoard is true on state
'
,
()
=>
{
testAction
({
it
(
'
should dispatch fetchEpicLists action when isEpicBoard is true on state
'
,
async
()
=>
{
await
testAction
({
action
:
actions
.
fetchLists
,
state
:
{
isEpicBoard
:
true
},
expectedActions
:
[{
type
:
'
fetchEpicLists
'
}],
...
...
@@ -174,39 +174,33 @@ describe('fetchEpicLists', () => {
const
formattedLists
=
formatBoardLists
(
queryResponse
.
data
.
group
.
epicBoard
.
lists
);
it
(
'
should commit mutations RECEIVE_BOARD_LISTS_SUCCESS on success
'
,
(
done
)
=>
{
it
(
'
should commit mutations RECEIVE_BOARD_LISTS_SUCCESS on success
'
,
async
(
)
=>
{
jest
.
spyOn
(
gqlClient
,
'
query
'
).
mockResolvedValue
(
queryResponse
);
testAction
(
actions
.
fetchEpicLists
,
{},
await
testAction
({
action
:
actions
.
fetchEpicLists
,
state
,
[
expectedMutations
:
[
{
type
:
types
.
RECEIVE_BOARD_LISTS_SUCCESS
,
payload
:
formattedLists
,
},
],
[],
done
,
);
});
});
it
(
'
should commit mutations RECEIVE_BOARD_LISTS_FAILURE on failure
'
,
(
done
)
=>
{
it
(
'
should commit mutations RECEIVE_BOARD_LISTS_FAILURE on failure
'
,
async
(
)
=>
{
jest
.
spyOn
(
gqlClient
,
'
query
'
).
mockResolvedValue
(
Promise
.
reject
());
testAction
(
actions
.
fetchEpicLists
,
{},
await
testAction
({
action
:
actions
.
fetchEpicLists
,
state
,
[
expectedMutations
:
[
{
type
:
types
.
RECEIVE_BOARD_LISTS_FAILURE
,
},
],
[],
done
,
);
});
});
});
...
...
spec/frontend/boards/stores/mutations_spec.js
View file @
5a19b0b5
...
...
@@ -37,6 +37,7 @@ describe('Board Store Mutations', () => {
const
boardConfig
=
{
milestoneTitle
:
'
Milestone 1
'
,
};
const
isEpicBoard
=
true
;
mutations
[
types
.
SET_INITIAL_BOARD_DATA
](
state
,
{
boardId
,
...
...
@@ -44,6 +45,7 @@ describe('Board Store Mutations', () => {
boardType
,
disabled
,
boardConfig
,
isEpicBoard
,
});
expect
(
state
.
boardId
).
toEqual
(
boardId
);
...
...
@@ -51,6 +53,7 @@ describe('Board Store Mutations', () => {
expect
(
state
.
boardType
).
toEqual
(
boardType
);
expect
(
state
.
disabled
).
toEqual
(
disabled
);
expect
(
state
.
boardConfig
).
toEqual
(
boardConfig
);
expect
(
state
.
isEpicBoard
).
toEqual
(
isEpicBoard
);
});
});
...
...
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