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
c9a7f51b
Commit
c9a7f51b
authored
Sep 19, 2017
by
Simon Knox
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
backport for gitlab-ee!2869
parent
e49e443b
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
34 additions
and
16 deletions
+34
-16
app/views/shared/boards/components/sidebar/_labels.html.haml
app/views/shared/boards/components/sidebar/_labels.html.haml
+1
-1
spec/features/boards/sidebar_spec.rb
spec/features/boards/sidebar_spec.rb
+17
-15
spec/support/board_helpers.rb
spec/support/board_helpers.rb
+16
-0
No files found.
app/views/shared/boards/components/sidebar/_labels.html.haml
View file @
c9a7f51b
...
...
@@ -25,7 +25,7 @@
show_any:
"true"
,
project_id:
@project
&
.
try
(
:id
),
labels:
labels_filter_path
(
false
),
namespace_path:
@
project
.
try
(
:namespace
).
try
(
:full_path
)
,
namespace_path:
@
namespace_path
,
project_path:
@project
.
try
(
:path
)
},
":data-issue-update"
=>
"'#{build_issue_link_base}/' + issue.iid + '.json'"
}
%span
.dropdown-toggle-text
...
...
spec/features/boards/sidebar_spec.rb
View file @
c9a7f51b
require
'rails_helper'
describe
'Issue Boards'
,
:js
do
include
BoardHelpers
let
(
:user
)
{
create
(
:user
)
}
let
(
:user2
)
{
create
(
:user
)
}
let
(
:project
)
{
create
(
:project
,
:public
)
}
...
...
@@ -309,6 +311,21 @@ describe 'Issue Boards', :js do
expect
(
card
).
to
have_selector
(
'.label'
,
count:
1
)
expect
(
card
).
not_to
have_content
(
stretch
.
title
)
end
it
'creates new label'
do
click_card
(
card
)
page
.
within
(
'.labels'
)
do
click_link
'Edit'
click_link
'Create new label'
fill_in
'new_label_name'
,
with:
'test label'
first
(
'.suggest-colors-dropdown a'
).
click
click_button
'Create'
wait_for_requests
expect
(
page
).
to
have_link
'test label'
end
end
end
context
'subscription'
do
...
...
@@ -322,19 +339,4 @@ describe 'Issue Boards', :js do
end
end
end
def
click_card
(
card
)
page
.
within
(
card
)
do
first
(
'.card-number'
).
click
end
wait_for_sidebar
end
def
wait_for_sidebar
# loop until the CSS transition is complete
Timeout
.
timeout
(
0.5
)
do
loop
until
evaluate_script
(
'$(".right-sidebar").outerWidth()'
)
==
290
end
end
end
spec/support/board_helpers.rb
0 → 100644
View file @
c9a7f51b
module
BoardHelpers
def
click_card
(
card
)
within
card
do
first
(
'.card-number'
).
click
end
wait_for_sidebar
end
def
wait_for_sidebar
# loop until the CSS transition is complete
Timeout
.
timeout
(
0.5
)
do
loop
until
evaluate_script
(
'$(".right-sidebar").outerWidth()'
)
==
290
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