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
1fbe1455
Commit
1fbe1455
authored
Sep 09, 2019
by
Michael Kozono
Committed by
Douglas Barbosa Alexandre
Sep 09, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[CE backport] Fix usages of boards dropdown
parent
c51c57d0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
30 deletions
+24
-30
spec/support/shared_examples/boards/multiple_issue_boards_shared_examples.rb
..._examples/boards/multiple_issue_boards_shared_examples.rb
+24
-30
No files found.
spec/support/shared_examples/boards/multiple_issue_boards_shared_examples.rb
View file @
1fbe1455
# frozen_string_literal: true
# frozen_string_literal: true
shared_examples_for
'multiple issue boards'
do
shared_examples_for
'multiple issue boards'
do
dropdown_selector
=
'.js-boards-selector .dropdown-menu'
context
'authorized user'
do
context
'authorized user'
do
before
do
before
do
parent
.
add_maintainer
(
user
)
parent
.
add_maintainer
(
user
)
...
@@ -20,18 +18,14 @@ shared_examples_for 'multiple issue boards' do
...
@@ -20,18 +18,14 @@ shared_examples_for 'multiple issue boards' do
end
end
it
'shows a list of boards'
do
it
'shows a list of boards'
do
click_button
board
.
name
in_boards_switcher_dropdown
do
page
.
within
(
dropdown_selector
)
do
expect
(
page
).
to
have_content
(
board
.
name
)
expect
(
page
).
to
have_content
(
board
.
name
)
expect
(
page
).
to
have_content
(
board2
.
name
)
expect
(
page
).
to
have_content
(
board2
.
name
)
end
end
end
end
it
'switches current board'
do
it
'switches current board'
do
click_button
board
.
name
in_boards_switcher_dropdown
do
page
.
within
(
dropdown_selector
)
do
click_link
board2
.
name
click_link
board2
.
name
end
end
...
@@ -43,9 +37,7 @@ shared_examples_for 'multiple issue boards' do
...
@@ -43,9 +37,7 @@ shared_examples_for 'multiple issue boards' do
end
end
it
'creates new board without detailed configuration'
do
it
'creates new board without detailed configuration'
do
click_button
board
.
name
in_boards_switcher_dropdown
do
page
.
within
(
dropdown_selector
)
do
click_button
'Create new board'
click_button
'Create new board'
end
end
...
@@ -57,28 +49,23 @@ shared_examples_for 'multiple issue boards' do
...
@@ -57,28 +49,23 @@ shared_examples_for 'multiple issue boards' do
end
end
it
'deletes board'
do
it
'deletes board'
do
click_button
board
.
name
in_boards_switcher_dropdown
do
wait_for_requests
page
.
within
(
dropdown_selector
)
do
click_button
'Delete board'
click_button
'Delete board'
end
end
expect
(
page
).
to
have_content
(
'Are you sure you want to delete this board?'
)
expect
(
page
).
to
have_content
(
'Are you sure you want to delete this board?'
)
click_button
'Delete'
click_button
'Delete'
click_button
board2
.
name
wait_for_requests
page
.
within
(
dropdown_selector
)
do
in_boards_switcher_dropdown
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
it
'adds a list to the none default board'
do
click_button
board
.
name
in_boards_switcher_dropdown
do
page
.
within
(
dropdown_selector
)
do
click_link
board2
.
name
click_link
board2
.
name
end
end
...
@@ -100,9 +87,7 @@ shared_examples_for 'multiple issue boards' do
...
@@ -100,9 +87,7 @@ shared_examples_for 'multiple issue boards' do
expect
(
page
).
to
have_selector
(
'.board'
,
count:
3
)
expect
(
page
).
to
have_selector
(
'.board'
,
count:
3
)
click_button
board2
.
name
in_boards_switcher_dropdown
do
page
.
within
(
dropdown_selector
)
do
click_link
board
.
name
click_link
board
.
name
end
end
...
@@ -114,9 +99,9 @@ shared_examples_for 'multiple issue boards' do
...
@@ -114,9 +99,9 @@ shared_examples_for 'multiple issue boards' do
it
'maintains sidebar state over board switch'
do
it
'maintains sidebar state over board switch'
do
assert_boards_nav_active
assert_boards_nav_active
find
(
'.boards-switcher'
).
click
in_boards_switcher_dropdown
do
wait_for_requests
click_link
board2
.
name
click_link
board2
.
name
end
assert_boards_nav_active
assert_boards_nav_active
end
end
...
@@ -129,15 +114,24 @@ shared_examples_for 'multiple issue boards' do
...
@@ -129,15 +114,24 @@ shared_examples_for 'multiple issue boards' do
end
end
it
'does not show action links'
do
it
'does not show action links'
do
click_button
board
.
name
in_boards_switcher_dropdown
do
page
.
within
(
dropdown_selector
)
do
expect
(
page
).
not_to
have_content
(
'Create new board'
)
expect
(
page
).
not_to
have_content
(
'Create new board'
)
expect
(
page
).
not_to
have_content
(
'Delete board'
)
expect
(
page
).
not_to
have_content
(
'Delete board'
)
end
end
end
end
end
end
def
in_boards_switcher_dropdown
find
(
'.boards-switcher'
).
click
wait_for_requests
dropdown_selector
=
'.js-boards-selector .dropdown-menu'
page
.
within
(
dropdown_selector
)
do
yield
end
end
def
assert_boards_nav_active
def
assert_boards_nav_active
expect
(
find
(
'.nav-sidebar .active .active'
)).
to
have_selector
(
'a'
,
text:
'Boards'
)
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