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
5ceca81d
Commit
5ceca81d
authored
Aug 11, 2021
by
Simon Knox
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Separate context for logged in user in boards_spec
parent
7874f42c
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
342 additions
and
429 deletions
+342
-429
spec/features/boards/boards_spec.rb
spec/features/boards/boards_spec.rb
+342
-429
No files found.
spec/features/boards/boards_spec.rb
View file @
5ceca81d
...
...
@@ -12,6 +12,7 @@ RSpec.describe 'Project issue boards', :js do
let_it_be
(
:user
)
{
create
(
:user
)
}
let_it_be
(
:user2
)
{
create
(
:user
)
}
context
'signed in user'
do
before
do
project
.
add_maintainer
(
user
)
project
.
add_maintainer
(
user2
)
...
...
@@ -67,8 +68,6 @@ RSpec.describe 'Project issue boards', :js do
let_it_be
(
:issue10
)
{
create
(
:labeled_issue
,
project:
project
,
title:
'issue +'
,
description:
'A+ great issue'
,
labels:
[
a_plus
])
}
before
do
stub_feature_flags
(
board_new_list:
false
)
visit_project_board_path_without_query_limit
(
project
,
board
)
end
...
...
@@ -304,91 +303,6 @@ RSpec.describe 'Project issue boards', :js do
end
end
end
context
'new list'
do
it
'shows all labels in new list dropdown'
do
click_button
'Add list'
wait_for_requests
page
.
within
(
'.dropdown-menu-issues-board-new'
)
do
expect
(
page
).
to
have_content
(
planning
.
title
)
expect
(
page
).
to
have_content
(
development
.
title
)
expect
(
page
).
to
have_content
(
testing
.
title
)
end
end
it
'creates new list for label'
do
click_button
'Add list'
wait_for_requests
page
.
within
(
'.dropdown-menu-issues-board-new'
)
do
click_link
testing
.
title
end
wait_for_requests
expect
(
page
).
to
have_selector
(
'.board'
,
count:
5
)
end
it
'creates new list for Backlog label'
do
click_button
'Add list'
wait_for_requests
page
.
within
(
'.dropdown-menu-issues-board-new'
)
do
click_link
backlog
.
title
end
wait_for_requests
expect
(
page
).
to
have_selector
(
'.board'
,
count:
5
)
end
it
'creates new list for Closed label'
do
click_button
'Add list'
wait_for_requests
page
.
within
(
'.dropdown-menu-issues-board-new'
)
do
click_link
closed
.
title
end
wait_for_requests
expect
(
page
).
to
have_selector
(
'.board'
,
count:
5
)
end
it
'keeps dropdown open after adding new list'
do
click_button
'Add list'
wait_for_requests
page
.
within
(
'.dropdown-menu-issues-board-new'
)
do
click_link
closed
.
title
end
wait_for_requests
expect
(
page
).
to
have_css
(
'#js-add-list.show'
)
end
it
'creates new list from a new label'
do
click_button
'Add list'
wait_for_requests
click_link
'Create project label'
fill_in
(
'new_label_name'
,
with:
'Testing New Label - with list'
)
first
(
'.suggest-colors a'
).
click
click_button
'Create'
wait_for_requests
wait_for_requests
expect
(
page
).
to
have_selector
(
'.board'
,
count:
5
)
end
end
end
context
'filtering'
do
...
...
@@ -596,10 +510,10 @@ RSpec.describe 'Project issue boards', :js do
expect
(
page
).
to
have_content
(
'New Issue'
)
end
end
end
context
'signed out user'
do
before
do
sign_out
(
:user
)
visit
project_board_path
(
project
,
board
)
wait_for_requests
end
...
...
@@ -609,7 +523,7 @@ RSpec.describe 'Project issue boards', :js do
end
it
'does not show create new list'
do
expect
(
page
).
not_to
have_button
(
'
.js-new-board-
list'
)
expect
(
page
).
not_to
have_button
(
'
Create
list'
)
end
it
'does not allow dragging'
do
...
...
@@ -622,14 +536,13 @@ RSpec.describe 'Project issue boards', :js do
before
do
project
.
add_guest
(
user_guest
)
sign_out
(
:user
)
sign_in
(
user_guest
)
visit
project_board_path
(
project
,
board
)
wait_for_requests
end
it
'does not show create new list'
do
expect
(
page
).
not_to
have_
selector
(
'.js-new-board-
list'
)
expect
(
page
).
not_to
have_
button
(
'Create
list'
)
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