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
b4c6dc1d
Commit
b4c6dc1d
authored
Jun 06, 2017
by
tauriedavis
Committed by
Annabel Dunstone Gray
Jun 08, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixes project_group_links spec by adding click tab event
parent
b4056e1b
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
12 additions
and
7 deletions
+12
-7
app/assets/stylesheets/pages/members.scss
app/assets/stylesheets/pages/members.scss
+1
-0
app/views/projects/project_members/_index.html.haml
app/views/projects/project_members/_index.html.haml
+2
-2
app/views/projects/project_members/_new_shared_group.html.haml
...iews/projects/project_members/_new_shared_group.html.haml
+1
-1
features/steps/project/project_group_links.rb
features/steps/project/project_group_links.rb
+4
-3
spec/features/projects/group_links_spec.rb
spec/features/projects/group_links_spec.rb
+4
-1
No files found.
app/assets/stylesheets/pages/members.scss
View file @
b4c6dc1d
...
...
@@ -13,6 +13,7 @@
&
.active
{
background
:
$white-light
;
}
&
:first-child
{
border-right
:
1px
solid
$border-color
;
}
...
...
app/views/projects/project_members/_index.html.haml
View file @
b4c6dc1d
...
...
@@ -18,10 +18,10 @@
-
if
can?
(
current_user
,
:admin_project_member
,
@project
)
%ul
.nav-links.project-member-tabs
{
role:
'tablist'
}
%li
.active
{
role:
'presentation'
}
%a
{
href:
'#add-member-pane'
,
data:
{
toggle:
'tab'
},
role:
'tab'
}
Add member
%a
{
href:
'#add-member-pane'
,
id:
'add-member-tab'
,
data:
{
toggle:
'tab'
},
role:
'tab'
}
Add member
-
if
@project
.
allowed_to_share_with_group?
%li
{
role:
'presentation'
}
%a
{
href:
'#share-with-group-pane'
,
data:
{
toggle:
'tab'
},
role:
'tab'
}
Share with group
%a
{
href:
'#share-with-group-pane'
,
id:
'share-with-group-tab'
,
data:
{
toggle:
'tab'
},
role:
'tab'
}
Share with group
.tab-content.project-member-tab-content
.tab-pane.active
{
id:
'add-member-pane'
,
role:
'tabpanel'
}
...
...
app/views/projects/project_members/_new_shared_group.html.haml
View file @
b4c6dc1d
features/steps/project/project_group_links.rb
View file @
b4c6dc1d
...
...
@@ -5,18 +5,19 @@ class Spinach::Features::ProjectGroupLinks < Spinach::FeatureSteps
include
Select2Helper
step
'I should see project already shared with group "Ops"'
do
page
.
within
'.
enabled
-groups'
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
'.
enabled
-groups'
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'
...
...
@@ -24,7 +25,7 @@ class Spinach::Features::ProjectGroupLinks < Spinach::FeatureSteps
end
step
'I should see project is shared with group "Market"'
do
page
.
within
'.
enabled
-groups'
do
page
.
within
'.
project-members
-groups'
do
expect
(
page
).
to
have_content
"Market"
end
end
...
...
spec/features/projects/group_links_spec.rb
View file @
b4c6dc1d
...
...
@@ -16,6 +16,8 @@ feature 'Project group links', :feature, :js do
before
do
visit
namespace_project_settings_members_path
(
project
.
namespace
,
project
)
click_on
'share-with-group-tab'
select2
group
.
id
,
from:
'#link_group_id'
fill_in
'expires_at_groups'
,
with:
(
Time
.
current
+
4.5
.
days
).
strftime
(
'%Y-%m-%d'
)
page
.
find
(
'body'
).
click
...
...
@@ -23,7 +25,7 @@ feature 'Project group links', :feature, :js do
end
it
'shows the expiration time with a warning class'
do
page
.
within
(
'.
enabled
-groups'
)
do
page
.
within
(
'.
project-members
-groups'
)
do
expect
(
page
).
to
have_content
(
'expires in 4 days'
)
expect
(
page
).
to
have_selector
(
'.text-warning'
)
end
...
...
@@ -43,6 +45,7 @@ feature 'Project group links', :feature, :js do
it
'does not show ancestors'
,
:nested_groups
do
visit
namespace_project_settings_members_path
(
project
.
namespace
,
project
)
click_on
'share-with-group-tab'
click_link
'Search for a group'
page
.
within
'.select2-drop'
do
...
...
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