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
274fa333
Commit
274fa333
authored
Aug 16, 2019
by
Felipe Artur
Committed by
Jan Provaznik
Aug 16, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add feature specs for multiple group issue boards
Add feature specs for multiple issue boards for groups
parent
5c8807f7
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
223 additions
and
186 deletions
+223
-186
ee/spec/features/boards/group_boards/multiple_boards_spec.rb
ee/spec/features/boards/group_boards/multiple_boards_spec.rb
+64
-0
ee/spec/features/boards/multiple_boards_spec.rb
ee/spec/features/boards/multiple_boards_spec.rb
+0
-186
spec/features/boards/multiple_boards_spec.rb
spec/features/boards/multiple_boards_spec.rb
+15
-0
spec/support/shared_examples/boards/multiple_issue_boards_shared_examples.rb
..._examples/boards/multiple_issue_boards_shared_examples.rb
+144
-0
No files found.
ee/spec/features/boards/group_boards/multiple_boards_spec.rb
0 → 100644
View file @
274fa333
# frozen_string_literal: true
require
'rails_helper'
describe
'Multiple Issue Boards'
,
:js
do
set
(
:user
)
{
create
(
:user
)
}
set
(
:group
)
{
create
(
:group
,
:public
)
}
set
(
:planning
)
{
create
(
:group_label
,
group:
group
,
name:
'Planning'
)
}
set
(
:board
)
{
create
(
:board
,
group:
group
)
}
let
(
:parent
)
{
group
}
let
(
:boards_path
)
{
group_boards_path
(
group
)
}
context
'with multiple group issue boards disabled'
do
before
do
stub_licensed_features
(
multiple_group_issue_boards:
false
)
parent
.
add_maintainer
(
user
)
login_as
(
user
)
end
it
'hides the link to create a new board'
do
visit
boards_path
wait_for_requests
click_button
board
.
name
page
.
within
(
'.js-boards-selector .dropdown-menu'
)
do
expect
(
page
).
not_to
have_content
(
'Create new board'
)
expect
(
page
).
not_to
have_content
(
'Delete board'
)
end
end
it
'does not show license warning when there is one board created'
do
visit
boards_path
wait_for_requests
click_button
board
.
name
expect
(
page
).
not_to
have_content
(
'Some of your boards are hidden, activate a license to see them again.'
)
end
it
'shows a license warning when group has more than one board'
do
create
(
:board
,
parent:
parent
)
visit
boards_path
wait_for_requests
click_button
board
.
name
expect
(
page
).
to
have_content
(
'Some of your boards are hidden, activate a license to see them again.'
)
end
end
context
'with multiple group issue boards enabled'
do
let!
(
:board2
)
{
create
(
:board
,
group:
group
)
}
before
do
stub_licensed_features
(
multiple_group_issue_boards:
true
)
end
it_behaves_like
'multiple issue boards'
end
end
ee/spec/features/boards/multiple_boards_spec.rb
deleted
100644 → 0
View file @
5c8807f7
require
'rails_helper'
describe
'Multiple Issue Boards'
,
:js
do
let
(
:user
)
{
create
(
:user
)
}
let
(
:project
)
{
create
(
:project
,
:public
)
}
let!
(
:planning
)
{
create
(
:label
,
project:
project
,
name:
'Planning'
)
}
let!
(
:board
)
{
create
(
:board
,
project:
project
)
}
let!
(
:board2
)
{
create
(
:board
,
project:
project
)
}
dropdown_selector
=
'.js-boards-selector .dropdown-menu'
context
'with multiple issue boards enabled'
do
context
'authorized user'
do
before
do
project
.
add_maintainer
(
user
)
login_as
(
user
)
visit
project_boards_path
(
project
)
wait_for_requests
end
it
'shows current board name'
do
page
.
within
(
'.boards-switcher'
)
do
expect
(
page
).
to
have_content
(
board
.
name
)
end
end
it
'shows a list of boards'
do
click_button
board
.
name
page
.
within
(
dropdown_selector
)
do
expect
(
page
).
to
have_content
(
board
.
name
)
expect
(
page
).
to
have_content
(
board2
.
name
)
end
end
it
'switches current board'
do
click_button
board
.
name
page
.
within
(
dropdown_selector
)
do
click_link
board2
.
name
end
wait_for_requests
page
.
within
(
'.boards-switcher'
)
do
expect
(
page
).
to
have_content
(
board2
.
name
)
end
end
it
'creates new board without detailed configuration'
do
click_button
board
.
name
page
.
within
(
dropdown_selector
)
do
click_button
'Create new board'
end
fill_in
'board-new-name'
,
with:
'This is a new board'
click_button
'Create board'
wait_for_requests
expect
(
page
).
to
have_button
(
'This is a new board'
)
end
it
'deletes board'
do
click_button
board
.
name
wait_for_requests
page
.
within
(
dropdown_selector
)
do
click_button
'Delete board'
end
expect
(
page
).
to
have_content
(
'Are you sure you want to delete this board?'
)
click_button
'Delete'
click_button
board2
.
name
page
.
within
(
dropdown_selector
)
do
expect
(
page
).
not_to
have_content
(
board
.
name
)
expect
(
page
).
to
have_content
(
board2
.
name
)
end
end
it
'adds a list to the none default board'
do
click_button
board
.
name
page
.
within
(
dropdown_selector
)
do
click_link
board2
.
name
end
wait_for_requests
page
.
within
(
'.boards-switcher'
)
do
expect
(
page
).
to
have_content
(
board2
.
name
)
end
click_button
'Add list'
wait_for_requests
page
.
within
'.dropdown-menu-issues-board-new'
do
click_link
planning
.
title
end
wait_for_requests
expect
(
page
).
to
have_selector
(
'.board'
,
count:
3
)
click_button
board2
.
name
page
.
within
(
dropdown_selector
)
do
click_link
board
.
name
end
wait_for_requests
expect
(
page
).
to
have_selector
(
'.board'
,
count:
2
)
end
it
'maintains sidebar state over board switch'
do
assert_boards_nav_active
find
(
'.boards-switcher'
).
click
wait_for_requests
click_link
board2
.
name
assert_boards_nav_active
end
end
context
'unauthorized user'
do
before
do
visit
project_boards_path
(
project
)
wait_for_requests
end
it
'does not show action links'
do
click_button
board
.
name
page
.
within
(
dropdown_selector
)
do
expect
(
page
).
not_to
have_content
(
'Create new board'
)
expect
(
page
).
not_to
have_content
(
'Delete board'
)
end
end
end
end
# todo: remove these when frontend part is done
context
'with multiple issue boards disabled'
do
before
do
project
.
add_maintainer
(
user
)
login_as
(
user
)
end
it
'hides the link to create a new board'
do
visit
project_boards_path
(
project
)
wait_for_requests
click_button
board
.
name
page
.
within
(
dropdown_selector
)
do
expect
(
page
).
to
have_content
(
'Create new board'
)
expect
(
page
).
to
have_content
(
'Delete board'
)
end
expect
(
page
).
to
have_content
(
'Edit board'
)
end
it
'shows a mention that boards are hidden when multiple boards are created'
do
create
(
:board
,
project:
project
)
visit
project_boards_path
(
project
)
wait_for_requests
click_button
board
.
name
expect
(
page
).
not_to
have_content
(
'Some of your boards are hidden, activate a license to see them again.'
)
end
end
def
assert_boards_nav_active
expect
(
find
(
'.nav-sidebar .active .active'
)).
to
have_selector
(
'a'
,
text:
'Boards'
)
end
end
spec/features/boards/multiple_boards_spec.rb
0 → 100644
View file @
274fa333
# frozen_string_literal: true
require
'rails_helper'
describe
'Multiple Issue Boards'
,
:js
do
set
(
:user
)
{
create
(
:user
)
}
set
(
:project
)
{
create
(
:project
,
:public
)
}
set
(
:planning
)
{
create
(
:label
,
project:
project
,
name:
'Planning'
)
}
set
(
:board
)
{
create
(
:board
,
name:
'board1'
,
project:
project
)
}
set
(
:board2
)
{
create
(
:board
,
name:
'board2'
,
project:
project
)
}
let
(
:parent
)
{
project
}
let
(
:boards_path
)
{
project_boards_path
(
project
)
}
it_behaves_like
'multiple issue boards'
end
spec/support/shared_examples/boards/multiple_issue_boards_shared_examples.rb
0 → 100644
View file @
274fa333
# frozen_string_literal: true
shared_examples_for
'multiple issue boards'
do
dropdown_selector
=
'.js-boards-selector .dropdown-menu'
context
'authorized user'
do
before
do
parent
.
add_maintainer
(
user
)
login_as
(
user
)
visit
boards_path
wait_for_requests
end
it
'shows current board name'
do
page
.
within
(
'.boards-switcher'
)
do
expect
(
page
).
to
have_content
(
board
.
name
)
end
end
it
'shows a list of boards'
do
click_button
board
.
name
page
.
within
(
dropdown_selector
)
do
expect
(
page
).
to
have_content
(
board
.
name
)
expect
(
page
).
to
have_content
(
board2
.
name
)
end
end
it
'switches current board'
do
click_button
board
.
name
page
.
within
(
dropdown_selector
)
do
click_link
board2
.
name
end
wait_for_requests
page
.
within
(
'.boards-switcher'
)
do
expect
(
page
).
to
have_content
(
board2
.
name
)
end
end
it
'creates new board without detailed configuration'
do
click_button
board
.
name
page
.
within
(
dropdown_selector
)
do
click_button
'Create new board'
end
fill_in
'board-new-name'
,
with:
'This is a new board'
click_button
'Create board'
wait_for_requests
expect
(
page
).
to
have_button
(
'This is a new board'
)
end
it
'deletes board'
do
click_button
board
.
name
wait_for_requests
page
.
within
(
dropdown_selector
)
do
click_button
'Delete board'
end
expect
(
page
).
to
have_content
(
'Are you sure you want to delete this board?'
)
click_button
'Delete'
click_button
board2
.
name
page
.
within
(
dropdown_selector
)
do
expect
(
page
).
not_to
have_content
(
board
.
name
)
expect
(
page
).
to
have_content
(
board2
.
name
)
end
end
it
'adds a list to the none default board'
do
click_button
board
.
name
page
.
within
(
dropdown_selector
)
do
click_link
board2
.
name
end
wait_for_requests
page
.
within
(
'.boards-switcher'
)
do
expect
(
page
).
to
have_content
(
board2
.
name
)
end
click_button
'Add list'
wait_for_requests
page
.
within
'.dropdown-menu-issues-board-new'
do
click_link
planning
.
title
end
wait_for_requests
expect
(
page
).
to
have_selector
(
'.board'
,
count:
3
)
click_button
board2
.
name
page
.
within
(
dropdown_selector
)
do
click_link
board
.
name
end
wait_for_requests
expect
(
page
).
to
have_selector
(
'.board'
,
count:
2
)
end
it
'maintains sidebar state over board switch'
do
assert_boards_nav_active
find
(
'.boards-switcher'
).
click
wait_for_requests
click_link
board2
.
name
assert_boards_nav_active
end
end
context
'unauthorized user'
do
before
do
visit
boards_path
wait_for_requests
end
it
'does not show action links'
do
click_button
board
.
name
page
.
within
(
dropdown_selector
)
do
expect
(
page
).
not_to
have_content
(
'Create new board'
)
expect
(
page
).
not_to
have_content
(
'Delete board'
)
end
end
end
def
assert_boards_nav_active
expect
(
find
(
'.nav-sidebar .active .active'
)).
to
have_selector
(
'a'
,
text:
'Boards'
)
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