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
3b02f8dc
Commit
3b02f8dc
authored
Jun 30, 2017
by
Bob Van Landuyt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Hide editing/creating milestones from the board UI
parent
2ec00d8c
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
160 additions
and
121 deletions
+160
-121
app/views/projects/boards/_switcher.html.haml
app/views/projects/boards/_switcher.html.haml
+4
-3
app/views/projects/boards/components/_form.html.haml
app/views/projects/boards/components/_form.html.haml
+27
-26
spec/features/boards/board_with_milestone_spec.rb
spec/features/boards/board_with_milestone_spec.rb
+129
-92
No files found.
app/views/projects/boards/_switcher.html.haml
View file @
3b02f8dc
...
...
@@ -49,6 +49,7 @@
%li
%a
{
"href"
=>
"#"
,
"@click.stop.prevent"
=>
"showPage('edit')"
}
Edit board name
-
if
@project
.
feature_available?
(
:issue_board_milestone
,
current_user
)
%li
%a
{
"href"
=>
"#"
,
"@click.stop.prevent"
=>
"showPage('milestone')"
}
Edit board milestone
...
...
app/views/projects/boards/components/_form.html.haml
View file @
3b02f8dc
...
...
@@ -10,6 +10,7 @@
%input
.form-control
{
type:
"text"
,
id:
"board-new-name"
,
"v-model"
=>
"board.name"
}
-
if
@project
.
feature_available?
(
:issue_board_milestone
,
current_user
)
.dropdown.board-inner-milestone-dropdown
{
":class"
=>
"{ open: milestoneDropdownOpen }"
,
"v-if"
=>
"currentPage === 'new'"
}
%label
.label-light
{
for:
"board-milestone"
}
...
...
spec/features/boards/board_with_milestone_spec.rb
View file @
3b02f8dc
...
...
@@ -10,7 +10,12 @@ describe 'Board with milestone', :feature, :js do
before
do
project
.
team
<<
[
user
,
:master
]
gitlab_sign_in
(
user
)
login_as
(
user
)
end
context
'with the feature enabled'
do
before
do
stub_licensed_features
(
issue_board_milestone:
true
)
end
context
'new board'
do
...
...
@@ -162,6 +167,38 @@ describe 'Board with milestone', :feature, :js do
expect
(
page
).
to
have_content
(
milestone
.
title
)
end
end
end
context
'with the feature disabled'
do
before
do
stub_licensed_features
(
issue_board_milestone:
false
)
visit
namespace_project_boards_path
(
project
.
namespace
,
project
)
end
it
"doesn't show the input when creating a board"
do
page
.
within
'#js-multiple-boards-switcher'
do
find
(
'.dropdown-menu-toggle'
).
click
click_link
'Create new board'
# To make sure the form is shown
expect
(
page
).
to
have_selector
(
'#board-new-name'
)
expect
(
page
).
not_to
have_button
(
'Milestone'
)
end
end
it
"doesn't show the option to edit the milestone"
do
page
.
within
'#js-multiple-boards-switcher'
do
find
(
'.dropdown-menu-toggle'
).
click
# To make sure the dropdown is open
expect
(
page
).
to
have_link
(
'Edit board name'
)
expect
(
page
).
not_to
have_link
(
'Edit board milestone'
)
end
end
end
def
create_board_with_milestone
page
.
within
'#js-multiple-boards-switcher'
do
...
...
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