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
5e1b7e4f
Commit
5e1b7e4f
authored
Aug 31, 2017
by
Michael Kozono
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Refactor and rename specs
parent
19e0d36e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
12 deletions
+12
-12
spec/features/projects/members/groups_with_access_list_spec.rb
...features/projects/members/groups_with_access_list_spec.rb
+7
-7
spec/features/projects/members/share_with_group_spec.rb
spec/features/projects/members/share_with_group_spec.rb
+5
-5
No files found.
spec/features/projects/members/group
_links
_spec.rb
→
spec/features/projects/members/group
s_with_access_list
_spec.rb
View file @
5e1b7e4f
require
'spec_helper'
require
'spec_helper'
feature
'Projects > Members >
Anonymous user sees members
'
,
js:
true
do
feature
'Projects > Members >
Groups with access list
'
,
js:
true
do
let
(
:user
)
{
create
(
:user
)
}
let
(
:user
)
{
create
(
:user
)
}
let
(
:group
)
{
create
(
:group
,
:public
)
}
let
(
:group
)
{
create
(
:group
,
:public
)
}
let
(
:project
)
{
create
(
:project
,
:public
)
}
let
(
:project
)
{
create
(
:project
,
:public
)
}
...
@@ -13,7 +13,7 @@ feature 'Projects > Members > Anonymous user sees members', js: true do
...
@@ -13,7 +13,7 @@ feature 'Projects > Members > Anonymous user sees members', js: true do
visit
project_settings_members_path
(
project
)
visit
project_settings_members_path
(
project
)
end
end
it
'updates group access level'
do
scenario
'updates group access level'
do
click_button
@group_link
.
human_access
click_button
@group_link
.
human_access
page
.
within
'.dropdown-menu'
do
page
.
within
'.dropdown-menu'
do
...
@@ -27,7 +27,7 @@ feature 'Projects > Members > Anonymous user sees members', js: true do
...
@@ -27,7 +27,7 @@ feature 'Projects > Members > Anonymous user sees members', js: true do
expect
(
first
(
'.group_member'
)).
to
have_content
(
'Guest'
)
expect
(
first
(
'.group_member'
)).
to
have_content
(
'Guest'
)
end
end
it
'updates expiry date'
do
scenario
'updates expiry date'
do
tomorrow
=
Date
.
today
+
3
tomorrow
=
Date
.
today
+
3
fill_in
"member_expires_at_
#{
group
.
id
}
"
,
with:
tomorrow
.
strftime
(
"%F"
)
fill_in
"member_expires_at_
#{
group
.
id
}
"
,
with:
tomorrow
.
strftime
(
"%F"
)
...
@@ -38,7 +38,7 @@ feature 'Projects > Members > Anonymous user sees members', js: true do
...
@@ -38,7 +38,7 @@ feature 'Projects > Members > Anonymous user sees members', js: true do
end
end
end
end
it
'deletes group link'
do
scenario
'deletes group link'
do
page
.
within
(
first
(
'.group_member'
))
do
page
.
within
(
first
(
'.group_member'
))
do
find
(
'.btn-remove'
).
click
find
(
'.btn-remove'
).
click
end
end
...
@@ -47,8 +47,8 @@ feature 'Projects > Members > Anonymous user sees members', js: true do
...
@@ -47,8 +47,8 @@ feature 'Projects > Members > Anonymous user sees members', js: true do
expect
(
page
).
not_to
have_selector
(
'.group_member'
)
expect
(
page
).
not_to
have_selector
(
'.group_member'
)
end
end
context
'search'
do
context
'search
in existing members (yes, this filters the groups list as well)
'
do
it
'finds no results'
do
scenario
'finds no results'
do
page
.
within
'.member-search-form'
do
page
.
within
'.member-search-form'
do
fill_in
'search'
,
with:
'testing 123'
fill_in
'search'
,
with:
'testing 123'
find
(
'.member-search-btn'
).
click
find
(
'.member-search-btn'
).
click
...
@@ -57,7 +57,7 @@ feature 'Projects > Members > Anonymous user sees members', js: true do
...
@@ -57,7 +57,7 @@ feature 'Projects > Members > Anonymous user sees members', js: true do
expect
(
page
).
not_to
have_selector
(
'.group_member'
)
expect
(
page
).
not_to
have_selector
(
'.group_member'
)
end
end
it
'finds results'
do
scenario
'finds results'
do
page
.
within
'.member-search-form'
do
page
.
within
'.member-search-form'
do
fill_in
'search'
,
with:
group
.
name
fill_in
'search'
,
with:
group
.
name
find
(
'.member-search-btn'
).
click
find
(
'.member-search-btn'
).
click
...
...
spec/features/projects/
group_links
_spec.rb
→
spec/features/projects/
members/share_with_group
_spec.rb
View file @
5e1b7e4f
require
'spec_helper'
require
'spec_helper'
feature
'Project
group links
'
,
:js
do
feature
'Project
> Members > Share with Group
'
,
:js
do
include
Select2Helper
include
Select2Helper
let
(
:master
)
{
create
(
:user
)
}
let
(
:master
)
{
create
(
:user
)
}
...
@@ -12,7 +12,7 @@ feature 'Project group links', :js do
...
@@ -12,7 +12,7 @@ feature 'Project group links', :js do
sign_in
(
master
)
sign_in
(
master
)
end
end
context
'setting an expiration date for a group link'
do
context
'
after
setting an expiration date for a group link'
do
before
do
before
do
visit
project_settings_members_path
(
project
)
visit
project_settings_members_path
(
project
)
...
@@ -24,7 +24,7 @@ feature 'Project group links', :js do
...
@@ -24,7 +24,7 @@ feature 'Project group links', :js do
find
(
'.btn-create'
).
trigger
(
'click'
)
find
(
'.btn-create'
).
trigger
(
'click'
)
end
end
it
'
shows the expiration time with a warning class'
do
scenario
'the group link
shows the expiration time with a warning class'
do
page
.
within
(
'.project-members-groups'
)
do
page
.
within
(
'.project-members-groups'
)
do
expect
(
page
).
to
have_content
(
'Expires in 4 days'
)
expect
(
page
).
to
have_content
(
'Expires in 4 days'
)
expect
(
page
).
to
have_selector
(
'.text-warning'
)
expect
(
page
).
to
have_selector
(
'.text-warning'
)
...
@@ -32,7 +32,7 @@ feature 'Project group links', :js do
...
@@ -32,7 +32,7 @@ feature 'Project group links', :js do
end
end
end
end
context
'
nested group project
'
do
context
'
for a project in a nested group
'
do
let!
(
:nested_group
)
{
create
(
:group
,
parent:
group
)
}
let!
(
:nested_group
)
{
create
(
:group
,
parent:
group
)
}
let!
(
:another_group
)
{
create
(
:group
)
}
let!
(
:another_group
)
{
create
(
:group
)
}
let!
(
:project
)
{
create
(
:project
,
namespace:
nested_group
)
}
let!
(
:project
)
{
create
(
:project
,
namespace:
nested_group
)
}
...
@@ -42,7 +42,7 @@ feature 'Project group links', :js do
...
@@ -42,7 +42,7 @@ feature 'Project group links', :js do
another_group
.
add_master
(
master
)
another_group
.
add_master
(
master
)
end
end
it
'
does not show ancestors'
,
:nested_groups
do
scenario
'the groups dropdown
does not show ancestors'
,
:nested_groups
do
visit
project_settings_members_path
(
project
)
visit
project_settings_members_path
(
project
)
click_on
'share-with-group-tab'
click_on
'share-with-group-tab'
...
...
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