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
26a68c2e
Commit
26a68c2e
authored
Mar 22, 2021
by
Florie Guibert
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Epic Boards - Update board scope
Review feedback
parent
614610c5
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
48 additions
and
48 deletions
+48
-48
app/assets/javascripts/boards/components/config_toggle.vue
app/assets/javascripts/boards/components/config_toggle.vue
+4
-7
app/assets/javascripts/boards/config_toggle.js
app/assets/javascripts/boards/config_toggle.js
+2
-1
ee/spec/features/epic_boards/epic_boards_spec.rb
ee/spec/features/epic_boards/epic_boards_spec.rb
+14
-10
ee/spec/frontend/boards/stores/getters_spec.js
ee/spec/frontend/boards/stores/getters_spec.js
+14
-15
spec/frontend/boards/stores/getters_spec.js
spec/frontend/boards/stores/getters_spec.js
+14
-15
No files found.
app/assets/javascripts/boards/components/config_toggle.vue
View file @
26a68c2e
...
@@ -16,7 +16,7 @@ export default {
...
@@ -16,7 +16,7 @@ export default {
boardsStore
:
{
boardsStore
:
{
type
:
Object
,
type
:
Object
,
required
:
false
,
required
:
false
,
default
:
undefined
,
default
:
null
,
},
},
canAdminList
:
{
canAdminList
:
{
type
:
Boolean
,
type
:
Boolean
,
...
@@ -27,11 +27,6 @@ export default {
...
@@ -27,11 +27,6 @@ export default {
required
:
true
,
required
:
true
,
},
},
},
},
data
()
{
return
{
state
:
this
.
boardsStore
?
this
.
boardsStore
.
state
:
{},
};
},
computed
:
{
computed
:
{
buttonText
()
{
buttonText
()
{
return
this
.
canAdminList
?
s__
(
'
Boards|Edit board
'
)
:
s__
(
'
Boards|View scope
'
);
return
this
.
canAdminList
?
s__
(
'
Boards|Edit board
'
)
:
s__
(
'
Boards|View scope
'
);
...
@@ -43,7 +38,9 @@ export default {
...
@@ -43,7 +38,9 @@ export default {
methods
:
{
methods
:
{
showPage
()
{
showPage
()
{
eventHub
.
$emit
(
'
showBoardModal
'
,
formType
.
edit
);
eventHub
.
$emit
(
'
showBoardModal
'
,
formType
.
edit
);
return
this
.
boardsStore
?
this
.
boardsStore
.
showPage
(
formType
.
edit
)
:
null
;
if
(
this
.
boardsStore
)
{
this
.
boardsStore
.
showPage
(
formType
.
edit
);
}
},
},
},
},
};
};
...
...
app/assets/javascripts/boards/config_toggle.js
View file @
26a68c2e
...
@@ -9,7 +9,8 @@ export default (boardsStore = undefined) => {
...
@@ -9,7 +9,8 @@ export default (boardsStore = undefined) => {
return
;
return
;
}
}
gl
.
boardConfigToggle
=
new
Vue
({
// eslint-disable-next-line no-new
new
Vue
({
el
,
el
,
render
(
h
)
{
render
(
h
)
{
return
h
(
ConfigToggle
,
{
return
h
(
ConfigToggle
,
{
...
...
ee/spec/features/epic_boards/epic_boards_spec.rb
View file @
26a68c2e
...
@@ -118,10 +118,12 @@ RSpec.describe 'epic boards', :js do
...
@@ -118,10 +118,12 @@ RSpec.describe 'epic boards', :js do
update_board_label
(
label_title
)
update_board_label
(
label_title
)
expect
(
page
).
to
have_selector
(
'.board-card'
,
count:
1
)
aggregate_failures
do
expect
(
page
).
to
have_content
(
'Epic1'
)
expect
(
page
).
to
have_selector
(
'.board-card'
,
count:
1
)
expect
(
page
).
not_to
have_content
(
'Epic2'
)
expect
(
page
).
to
have_content
(
'Epic1'
)
expect
(
page
).
not_to
have_content
(
'Epic3'
)
expect
(
page
).
not_to
have_content
(
'Epic2'
)
expect
(
page
).
not_to
have_content
(
'Epic3'
)
end
end
end
end
end
...
@@ -141,12 +143,14 @@ RSpec.describe 'epic boards', :js do
...
@@ -141,12 +143,14 @@ RSpec.describe 'epic boards', :js do
view_scope
.
click
view_scope
.
click
page
.
within
(
'.modal'
)
do
page
.
within
(
'.modal'
)
do
expect
(
find
(
'.modal-header'
)).
to
have_content
(
'Board scope'
)
aggregate_failures
do
expect
(
page
).
not_to
have_content
(
'Board name'
)
expect
(
find
(
'.modal-header'
)).
to
have_content
(
'Board scope'
)
expect
(
page
).
not_to
have_link
(
'Edit'
)
expect
(
page
).
not_to
have_content
(
'Board name'
)
expect
(
page
).
not_to
have_button
(
'Edit'
)
expect
(
page
).
not_to
have_link
(
'Edit'
)
expect
(
page
).
not_to
have_button
(
'Save'
)
expect
(
page
).
not_to
have_button
(
'Edit'
)
expect
(
page
).
not_to
have_button
(
'Cancel'
)
expect
(
page
).
not_to
have_button
(
'Save'
)
expect
(
page
).
not_to
have_button
(
'Cancel'
)
end
end
end
end
end
end
end
...
...
ee/spec/frontend/boards/stores/getters_spec.js
View file @
26a68c2e
...
@@ -124,20 +124,19 @@ describe('EE Boards Store Getters', () => {
...
@@ -124,20 +124,19 @@ describe('EE Boards Store Getters', () => {
});
});
describe
(
'
isEpicBoard
'
,
()
=>
{
describe
(
'
isEpicBoard
'
,
()
=>
{
it
(
'
returns true when issuableType on state is epic
'
,
()
=>
{
it
.
each
`
const
state
=
{
issuableType | expected
issuableType
:
'
epic
'
,
${
'
epic
'
}
|
${
true
}
};
${
'
issue
'
}
|
${
false
}
`
(
expect
(
getters
.
isEpicBoard
(
state
)).
toBe
(
true
);
'
returns $expected when issuableType on state is $issuableType
'
,
});
({
issuableType
,
expected
})
=>
{
const
state
=
{
it
(
'
returns false when issuableType on state is not epic
'
,
()
=>
{
issuableType
,
const
state
=
{
};
issuableType
:
'
issue
'
,
};
expect
(
getters
.
isEpicBoard
(
state
)).
toBe
(
expected
);
},
expect
(
getters
.
isEpicBoard
(
state
)).
toBe
(
false
);
);
});
});
});
});
});
spec/frontend/boards/stores/getters_spec.js
View file @
26a68c2e
...
@@ -179,21 +179,20 @@ describe('Boards - Getters', () => {
...
@@ -179,21 +179,20 @@ describe('Boards - Getters', () => {
});
});
describe('isIssueBoard', () => {
describe('isIssueBoard', () => {
it('returns true when issuableType on state is issue', () => {
it.each`
const state = {
issuableType
|
expected
issuableType: 'issue',
$
{
'
issue
'
}
|
${
true
}
};
${
'
epic
'
}
|
${
false
}
`
(
expect(getters.isIssueBoard(state)).toBe(true);
'
returns $expected when issuableType on state is $issuableType
'
,
});
({
issuableType
,
expected
})
=>
{
const
state
=
{
it('returns false when issuableType on state is not issue', () => {
issuableType
,
const state = {
};
issuableType: 'epic',
};
expect
(
getters
.
isIssueBoard
(
state
)).
toBe
(
expected
);
},
expect(getters.isIssueBoard(state)).toBe(false);
);
});
});
});
describe
(
'
isEpicBoard
'
,
()
=>
{
describe
(
'
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