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
014a7522
Commit
014a7522
authored
Sep 19, 2017
by
Simon Knox
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tests for sidebar labels
parent
809b6e8b
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
61 additions
and
30 deletions
+61
-30
spec/ee/spec/features/boards/group_boards/user_edits_issues_spec.rb
...ec/features/boards/group_boards/user_edits_issues_spec.rb
+41
-0
spec/ee/spec/features/boards/sidebar_spec.rb
spec/ee/spec/features/boards/sidebar_spec.rb
+2
-15
spec/features/boards/sidebar_spec.rb
spec/features/boards/sidebar_spec.rb
+2
-15
spec/support/board_helpers.rb
spec/support/board_helpers.rb
+16
-0
No files found.
spec/ee/spec/features/boards/group_boards/user_edits_issues_spec.rb
0 → 100644
View file @
014a7522
require
'spec_helper'
describe
'label issues'
,
:js
do
include
BoardHelpers
let
(
:user
)
{
create
(
:user
)
}
let
(
:group
)
{
create
(
:group
,
:public
)
}
let
(
:project
)
{
create
(
:project
,
:public
,
namespace:
group
)
}
let
(
:board
)
{
create
(
:board
,
group:
group
)
}
let!
(
:development
)
{
create
(
:label
,
project:
project
,
name:
'Development'
)
}
let!
(
:issue
)
{
create
(
:labeled_issue
,
project:
project
,
labels:
[
development
])
}
let!
(
:list
)
{
create
(
:list
,
board:
board
,
label:
development
,
position:
0
)
}
before
do
stub_licensed_features
(
group_issue_boards:
true
)
group
.
add_master
(
user
)
sign_in
(
user
)
visit
group_boards_path
(
group
)
wait_for_requests
end
it
'adds a new label from sidebar'
do
card
=
find
(
'.board:nth-child(2)'
).
first
(
'.card'
)
click_card
(
card
)
page
.
within
'.right-sidebar .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
end
page
.
within
'.labels'
do
expect
(
page
).
to
have_link
'test label'
end
end
end
spec/ee/spec/features/boards/sidebar_spec.rb
View file @
014a7522
require
'rails_helper'
describe
'Issue Boards'
,
:js
do
include
BoardHelpers
let
(
:user
)
{
create
(
:user
)
}
let
(
:user2
)
{
create
(
:user
)
}
let
(
:project
)
{
create
(
:project
,
:public
)
}
...
...
@@ -137,19 +139,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/features/boards/sidebar_spec.rb
View file @
014a7522
require
'rails_helper'
describe
'Issue Boards'
,
js:
true
do
include
BoardHelpers
let
(
:user
)
{
create
(
:user
)
}
let
(
:user2
)
{
create
(
:user
)
}
let
(
:project
)
{
create
(
:project
,
:public
)
}
...
...
@@ -323,19 +325,4 @@ describe 'Issue Boards', js: true 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 @
014a7522
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