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
0
Merge Requests
0
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
Boxiang Sun
gitlab-ce
Commits
094add46
Commit
094add46
authored
Sep 10, 2017
by
Vitaliy @blackst0ne Klachkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Replace project/group_links.feature spinach test with an rspec analog
parent
5d952f75
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
46 additions
and
67 deletions
+46
-67
changelogs/unreleased/replace_group_links-feature.yml
changelogs/unreleased/replace_group_links-feature.yml
+5
-0
features/project/group_links.feature
features/project/group_links.feature
+0
-16
features/steps/project/project_group_links.rb
features/steps/project/project_group_links.rb
+0
-51
spec/features/projects/settings/user_manages_group_links_spec.rb
...atures/projects/settings/user_manages_group_links_spec.rb
+41
-0
No files found.
changelogs/unreleased/replace_group_links-feature.yml
0 → 100644
View file @
094add46
---
title
:
Replace project/group_links.feature spinach test with an rspec analog
merge_request
:
14169
author
:
Vitaliy @blackst0ne Klachkov
type
:
other
features/project/group_links.feature
deleted
100644 → 0
View file @
5d952f75
Feature
:
Project Group Links
Background
:
Given
I sign in as a user
And
I own project
"Shop"
And
project
"Shop"
is shared with group
"Ops"
And
project
"Shop"
is not shared with group
"Market"
And
I visit project group links page
Scenario
:
I
should see list of groups
Then
I should see project already shared with group
"Ops"
Then
I should see project is not shared with group
"Market"
@javascript
Scenario
:
I
share project with group
When
I select group
"Market"
for share
Then
I should see project is shared with group
"Market"
features/steps/project/project_group_links.rb
deleted
100644 → 0
View file @
5d952f75
class
Spinach::Features::ProjectGroupLinks
<
Spinach
::
FeatureSteps
include
SharedAuthentication
include
SharedProject
include
SharedPaths
include
Select2Helper
step
'I should see project already shared with group "Ops"'
do
page
.
within
'.project-members-groups'
do
expect
(
page
).
to
have_content
"Ops"
end
end
step
'I should see project is not shared with group "Market"'
do
page
.
within
'.project-members-groups'
do
expect
(
page
).
not_to
have_content
"Market"
end
end
step
'I select group "Market" for share'
do
click_link
'Share with group'
group
=
Group
.
find_by
(
path:
'market'
)
select2
(
group
.
id
,
from:
"#link_group_id"
)
select
"Master"
,
from:
'link_group_access'
click_button
"Share"
end
step
'I should see project is shared with group "Market"'
do
page
.
within
'.project-members-groups'
do
expect
(
page
).
to
have_content
"Market"
end
end
step
'project "Shop" is shared with group "Ops"'
do
group
=
create
(
:group
,
name:
'Ops'
)
share_link
=
project
.
project_group_links
.
new
(
group_access:
Gitlab
::
Access
::
MASTER
)
share_link
.
group_id
=
group
.
id
share_link
.
save!
end
step
'project "Shop" is not shared with group "Market"'
do
create
(
:group
,
name:
'Market'
,
path:
'market'
)
end
step
'I visit project group links page'
do
visit
project_group_links_path
(
project
)
end
def
project
@project
||=
Project
.
find_by_name
"Shop"
end
end
spec/features/projects/settings/user_manages_group_links_spec.rb
0 → 100644
View file @
094add46
require
'spec_helper'
describe
'User manages group links'
do
include
Select2Helper
let
(
:user
)
{
create
(
:user
)
}
let
(
:project
)
{
create
(
:project
,
namespace:
user
.
namespace
)
}
let
(
:group_ops
)
{
create
(
:group
,
name:
'Ops'
)
}
let
(
:group_market
)
{
create
(
:group
,
name:
'Market'
,
path:
'market'
)
}
before
do
project
.
add_master
(
user
)
sign_in
(
user
)
share_link
=
project
.
project_group_links
.
new
(
group_access:
Gitlab
::
Access
::
MASTER
)
share_link
.
group_id
=
group_ops
.
id
share_link
.
save!
visit
(
project_group_links_path
(
project
))
end
it
'shows a list of groups'
do
page
.
within
(
'.project-members-groups'
)
do
expect
(
page
).
to
have_content
(
'Ops'
)
expect
(
page
).
not_to
have_content
(
'Market'
)
end
end
it
'shares a project with a group'
,
:js
do
click_link
(
'Share with group'
)
select2
(
group_market
.
id
,
from:
'#link_group_id'
)
select
(
'Master'
,
from:
'link_group_access'
)
click_button
(
'Share'
)
page
.
within
(
'.project-members-groups'
)
do
expect
(
page
).
to
have_content
(
'Market'
)
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