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
f7bd3bdb
Commit
f7bd3bdb
authored
Feb 14, 2019
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add more feature specs for group labels
Signed-off-by:
Dmitriy Zaporozhets
<
dmitriy.zaporozhets@gmail.com
>
parent
ed7144ad
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
36 additions
and
1 deletion
+36
-1
spec/features/groups/labels/create_spec.rb
spec/features/groups/labels/create_spec.rb
+23
-0
spec/features/groups/labels/index_spec.rb
spec/features/groups/labels/index_spec.rb
+13
-1
No files found.
spec/features/groups/labels/create_spec.rb
0 → 100644
View file @
f7bd3bdb
# frozen_string_literal: true
require
'spec_helper'
describe
'Create a group label'
do
let
(
:user
)
{
create
(
:user
)
}
let
(
:group
)
{
create
(
:group
)
}
before
do
group
.
add_owner
(
user
)
sign_in
(
user
)
visit
group_labels_path
(
group
)
end
it
'creates a new label'
do
click_link
'New label'
fill_in
'Title'
,
with:
'test-label'
click_button
'Create label'
expect
(
page
).
to
have_content
'test-label'
expect
(
current_path
).
to
eq
(
group_labels_path
(
group
))
end
end
spec/features/groups/labels/index_spec.rb
View file @
f7bd3bdb
# frozen_string_literal: true
require
'spec_helper'
describe
'Group labels'
do
let
(
:user
)
{
create
(
:user
)
}
let
(
:group
)
{
create
(
:group
)
}
let!
(
:label
)
{
create
(
:group_label
,
group:
group
)
}
let!
(
:label2
)
{
create
(
:group_label
)
}
before
do
group
.
add_owner
(
user
)
...
...
@@ -11,7 +14,16 @@ describe 'Group labels' do
visit
group_labels_path
(
group
)
end
it
'label has edit button'
,
:js
do
it
'shows labels that belong to the group'
do
expect
(
page
).
to
have_content
(
label
.
name
)
expect
(
page
).
not_to
have_content
(
label2
.
name
)
end
it
'shows a new label button'
do
expect
(
page
).
to
have_link
(
'New label'
)
end
it
'shows an edit label button'
,
:js
do
expect
(
page
).
to
have_selector
(
'.label-action.edit'
)
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