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
098d461c
Commit
098d461c
authored
Oct 11, 2016
by
Phil Hughes
Committed by
Douglas Barbosa Alexandre
Oct 18, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
More tests
Redirects back to issue boards index after deleting
parent
4fb94a83
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
57 additions
and
2 deletions
+57
-2
app/controllers/projects/boards_controller.rb
app/controllers/projects/boards_controller.rb
+1
-1
spec/features/boards/multiple_boards_spec.rb
spec/features/boards/multiple_boards_spec.rb
+56
-1
No files found.
app/controllers/projects/boards_controller.rb
View file @
098d461c
...
@@ -59,7 +59,7 @@ class Projects::BoardsController < Projects::ApplicationController
...
@@ -59,7 +59,7 @@ class Projects::BoardsController < Projects::ApplicationController
service
=
::
Boards
::
DestroyService
.
new
(
project
,
current_user
)
service
=
::
Boards
::
DestroyService
.
new
(
project
,
current_user
)
if
service
.
execute
(
@board
)
if
service
.
execute
(
@board
)
head
:ok
redirect_to
namespace_project_boards_path
(
@project
.
namespace
,
@project
)
else
else
head
:unprocessable_entity
head
:unprocessable_entity
end
end
...
...
spec/features/boards/multiple_boards_spec.rb
View file @
098d461c
...
@@ -6,6 +6,7 @@ describe 'Multiple Issue Boards', feature: true, js: true do
...
@@ -6,6 +6,7 @@ describe 'Multiple Issue Boards', feature: true, js: true do
let
(
:user
)
{
create
(
:user
)
}
let
(
:user
)
{
create
(
:user
)
}
let
(
:project
)
{
create
(
:empty_project
,
:public
)
}
let
(
:project
)
{
create
(
:empty_project
,
:public
)
}
let!
(
:planning
)
{
create
(
:label
,
project:
project
,
name:
'Planning'
)
}
let!
(
:board
)
{
create
(
:board
,
project:
project
)
}
let!
(
:board
)
{
create
(
:board
,
project:
project
)
}
let!
(
:board2
)
{
create
(
:board
,
project:
project
)
}
let!
(
:board2
)
{
create
(
:board
,
project:
project
)
}
...
@@ -47,6 +48,24 @@ describe 'Multiple Issue Boards', feature: true, js: true do
...
@@ -47,6 +48,24 @@ describe 'Multiple Issue Boards', feature: true, js: true do
end
end
end
end
it
'creates new board'
do
click_button
board
.
name
page
.
within
(
'.boards-title-holder .dropdown-menu'
)
do
click_link
'Edit board name'
fill_in
'board-new-name'
,
with:
'Testing'
click_button
'Save'
end
wait_for_vue_resource
page
.
within
(
'.boards-title-holder .dropdown-menu'
)
do
expect
(
page
).
to
have_content
(
'Testing'
)
end
end
it
'edits board name'
do
it
'edits board name'
do
click_button
board
.
name
click_button
board
.
name
...
@@ -80,11 +99,47 @@ describe 'Multiple Issue Boards', feature: true, js: true do
...
@@ -80,11 +99,47 @@ describe 'Multiple Issue Boards', feature: true, js: true do
click_link
'Delete'
click_link
'Delete'
end
end
click_button
board
.
name
click_button
board
2
.
name
page
.
within
(
'.boards-title-holder .dropdown-menu'
)
do
page
.
within
(
'.boards-title-holder .dropdown-menu'
)
do
expect
(
page
).
not_to
have_content
(
board
.
name
)
expect
(
page
).
not_to
have_content
(
board
.
name
)
expect
(
page
).
to
have_content
(
board2
.
name
)
expect
(
page
).
to
have_content
(
board2
.
name
)
end
end
end
end
it
'adds a list to the none default board'
do
click_button
board
.
name
page
.
within
(
'.boards-title-holder .dropdown-menu'
)
do
click_link
board2
.
name
end
wait_for_vue_resource
page
.
within
(
'.boards-switcher'
)
do
expect
(
page
).
to
have_content
(
board2
.
name
)
end
click_button
'Create new list'
wait_for_ajax
page
.
within
'.dropdown-menu-issues-board-new'
do
click_link
planning
.
title
end
wait_for_vue_resource
expect
(
page
).
to
have_selector
(
'.board'
,
count:
3
)
click_button
board2
.
name
page
.
within
(
'.boards-title-holder .dropdown-menu'
)
do
click_link
board
.
name
end
wait_for_vue_resource
expect
(
page
).
to
have_selector
(
'.board'
,
count:
2
)
end
end
end
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