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
ac49ac1d
Commit
ac49ac1d
authored
Feb 22, 2021
by
Florie Guibert
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Create Epic Board
Review feedback
parent
cf27abe5
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
29 deletions
+17
-29
app/assets/javascripts/boards/components/board_form.vue
app/assets/javascripts/boards/components/board_form.vue
+5
-11
ee/app/assets/javascripts/boards/components/board_form.vue
ee/app/assets/javascripts/boards/components/board_form.vue
+6
-10
ee/spec/frontend/boards/components/board_form_spec.js
ee/spec/frontend/boards/components/board_form_spec.js
+6
-8
No files found.
app/assets/javascripts/boards/components/board_form.vue
View file @
ac49ac1d
...
...
@@ -199,16 +199,10 @@ export default {
/* eslint-enable @gitlab/require-i18n-strings */
},
mutationVariables
()
{
let
variables
=
this
.
baseMutationVariables
;
if
(
this
.
scopedIssueBoardFeatureEnabled
)
{
variables
=
{
...
variables
,
...
this
.
boardScopeMutationVariables
,
};
}
return
variables
;
return
{
...
this
.
baseMutationVariables
,
...(
this
.
scopedIssueBoardFeatureEnabled
?
this
.
boardScopeMutationVariables
:
{}),
};
},
},
mounted
()
{
...
...
@@ -264,7 +258,7 @@ export default {
try
{
const
url
=
await
this
.
createOrUpdateBoard
();
visitUrl
(
url
);
}
catch
(
e
)
{
}
catch
{
Flash
(
this
.
$options
.
i18n
.
saveErrorMessage
);
}
finally
{
this
.
isLoading
=
false
;
...
...
ee/app/assets/javascripts/boards/components/board_form.vue
View file @
ac49ac1d
...
...
@@ -14,17 +14,13 @@ export default {
return
createEpicBoardMutation
;
},
mutationVariables
()
{
let
variables
=
this
.
baseMutationVariables
;
// TODO: Epic board scope will be added in a future iteration: https://gitlab.com/gitlab-org/gitlab/-/issues/231389
if
(
this
.
scopedIssueBoardFeatureEnabled
&&
!
this
.
isEpicBoard
)
{
variables
=
{
...
variables
,
...
this
.
boardScopeMutationVariables
,
};
}
return
variables
;
return
{
...
this
.
baseMutationVariables
,
...(
this
.
scopedIssueBoardFeatureEnabled
&&
!
this
.
isEpicBoard
?
this
.
boardScopeMutationVariables
:
{}),
};
},
},
methods
:
{
...
...
ee/spec/frontend/boards/components/board_form_spec.js
View file @
ac49ac1d
...
...
@@ -44,8 +44,9 @@ const defaultProps = {
describe
(
'
BoardForm
'
,
()
=>
{
let
wrapper
;
let
mutate
;
let
location
;
const
findModal
=
()
=>
wrapper
.
find
(
GlModal
);
const
findModal
=
()
=>
wrapper
.
find
Component
(
GlModal
);
const
findModalActionPrimary
=
()
=>
findModal
().
props
(
'
actionPrimary
'
);
const
findFormWrapper
=
()
=>
wrapper
.
find
(
'
[data-testid="board-form-wrapper"]
'
);
const
findDeleteConfirmation
=
()
=>
wrapper
.
find
(
'
[data-testid="delete-confirmation-message"]
'
);
...
...
@@ -61,15 +62,10 @@ describe('BoardForm', () => {
const
store
=
createStore
();
const
createComponent
=
(
props
,
data
)
=>
{
const
createComponent
=
(
props
)
=>
{
wrapper
=
shallowMount
(
BoardForm
,
{
localVue
,
propsData
:
{
...
defaultProps
,
...
props
},
data
()
{
return
{
...
data
,
};
},
provide
:
{
rootPath
:
'
root
'
,
},
...
...
@@ -83,7 +79,8 @@ describe('BoardForm', () => {
});
};
beforeEach
(()
=>
{
beforeAll
(()
=>
{
location
=
window
.
location
;
delete
window
.
location
;
});
...
...
@@ -91,6 +88,7 @@ describe('BoardForm', () => {
wrapper
.
destroy
();
wrapper
=
null
;
mutate
=
null
;
window
.
location
=
location
;
});
describe
(
'
when creating a new epic board
'
,
()
=>
{
...
...
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