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
Jérome Perrin
gitlab-ce
Commits
07190227
Commit
07190227
authored
Aug 18, 2015
by
Artem Sidorenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Spinach tests
parent
15cdf551
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
81 additions
and
4 deletions
+81
-4
features/admin/projects.feature
features/admin/projects.feature
+10
-1
features/explore/projects.feature
features/explore/projects.feature
+12
-3
features/groups.feature
features/groups.feature
+7
-0
features/steps/admin/projects.rb
features/steps/admin/projects.rb
+16
-0
features/steps/groups.rb
features/steps/groups.rb
+9
-0
features/steps/shared/paths.rb
features/steps/shared/paths.rb
+4
-0
features/steps/shared/project.rb
features/steps/shared/project.rb
+23
-0
No files found.
features/admin/projects.feature
View file @
07190227
...
...
@@ -4,9 +4,18 @@ Feature: Admin Projects
Given
I sign in as an admin
And
there are projects in system
Scenario
:
Projects list
Scenario
:
I
should see non-archived projects in the list
Given
archived project
"Archive"
When
I visit admin projects page
Then
I should see all non-archived projects
And
I should not see project
"Archive"
Scenario
:
I
should see all projects in the list
Given
archived project
"Archive"
When
I visit admin projects page
And
I check
"Show archived projects"
Then
I should see all projects
And
I should see
"archived"
label
Scenario
:
Projects show
When
I visit admin projects page
...
...
features/explore/projects.feature
View file @
07190227
...
...
@@ -6,10 +6,12 @@ Feature: Explore Projects
And
private project
"Enterprise"
Scenario
:
I
visit public area
Given
archived project
"Archive"
When
I visit the public projects area
Then
I should see project
"Community"
And
I should not see project
"Internal"
And
I should not see project
"Enterprise"
And
I should not see project
"Archive"
Scenario
:
I
visit public project page
When
I visit project
"Community"
page
...
...
@@ -37,11 +39,13 @@ Feature: Explore Projects
And
I should see empty public project details with ssh clone info
Scenario
:
I
visit public area as user
Given
I sign in as a user
Given
archived project
"Archive"
And
I sign in as a user
When
I visit the public projects area
Then
I should see project
"Community"
And
I should see project
"Internal"
And
I should not see project
"Enterprise"
And
I should not see project
"Archive"
Scenario
:
I
visit internal project page as user
Given
I sign in as a user
...
...
@@ -102,15 +106,20 @@ Feature: Explore Projects
Then
I should see list of merge requests for
"Internal"
project
Scenario
:
Trending page
Given
I sign in as a user
Given
archived project
"Archive"
And
project
"Archive"
has comments
And
I sign in as a user
And
project
"Community"
has comments
When
I visit the explore trending projects
Then
I should see project
"Community"
And
I should not see project
"Internal"
And
I should not see project
"Enterprise"
And
I should not see project
"Archive"
Scenario
:
Most starred page
Given
I sign in as a user
Given
archived project
"Archive"
And
I sign in as a user
When
I visit the explore starred projects
Then
I should see project
"Community"
And
I should see project
"Internal"
And
I should see project
"Archive"
features/groups.feature
View file @
07190227
...
...
@@ -152,3 +152,10 @@ Feature: Groups
And
I click on one group milestone
Then
I should see group milestone with descriptions and expiry date
And
I should see group milestone with all issues and MRs assigned to that milestone
# Group projects in settings
Scenario
:
I
should see all projects in the project list in settings
Given
Group
"Owned"
has archived project
When
I visit group
"Owned"
projects page
Then
I should see group
"Owned"
projects list
And
I should see
"archived"
label
features/steps/admin/projects.rb
View file @
07190227
...
...
@@ -2,6 +2,13 @@ class Spinach::Features::AdminProjects < Spinach::FeatureSteps
include
SharedAuthentication
include
SharedPaths
include
SharedAdmin
include
SharedProject
step
'I should see all non-archived projects'
do
Project
.
non_archived
.
each
do
|
p
|
expect
(
page
).
to
have_content
p
.
name_with_namespace
end
end
step
'I should see all projects'
do
Project
.
all
.
each
do
|
p
|
...
...
@@ -9,6 +16,15 @@ class Spinach::Features::AdminProjects < Spinach::FeatureSteps
end
end
step
'I check "Show archived projects"'
do
page
.
check
'Show archived projects'
click_button
"Search"
end
step
'I should see "archived" label'
do
expect
(
page
).
to
have_xpath
(
"//span[@class='label label-warning']"
,
text:
'archived'
)
end
step
'I click on first project'
do
click_link
Project
.
first
.
name_with_namespace
end
...
...
features/steps/groups.rb
View file @
07190227
...
...
@@ -226,6 +226,15 @@ class Spinach::Features::Groups < Spinach::FeatureSteps
expect
(
page
).
to
have_link
(
@mr3
.
title
,
href:
namespace_project_merge_request_path
(
@project3
.
namespace
,
@project3
,
@mr3
))
end
step
'Group "Owned" has archived project'
do
group
=
Group
.
find_by
(
name:
'Owned'
)
create
(
:project
,
namespace:
group
,
archived:
true
,
path:
"archived-project"
)
end
step
'I should see "archived" label'
do
expect
(
page
).
to
have_xpath
(
"//span[@class='label label-warning']"
,
text:
'archived'
)
end
protected
def
assigned_to_me
(
key
)
...
...
features/steps/shared/paths.rb
View file @
07190227
...
...
@@ -39,6 +39,10 @@ module SharedPaths
visit
edit_group_path
(
Group
.
find_by
(
name:
"Owned"
))
end
step
'I visit group "Owned" projects page'
do
visit
projects_group_path
(
Group
.
find_by
(
name:
"Owned"
))
end
step
'I visit group "Guest" page'
do
visit
group_path
(
Group
.
find_by
(
name:
"Guest"
))
end
...
...
features/steps/shared/project.rb
View file @
07190227
...
...
@@ -92,6 +92,29 @@ module SharedProject
@project
||=
Project
.
first
end
# ----------------------------------------
# Visibility of archived project
# ----------------------------------------
step
'archived project "Archive"'
do
create
:project
,
:public
,
archived:
true
,
name:
'Archive'
end
step
'I should not see project "Archive"'
do
project
=
Project
.
find_by
(
name:
"Archive"
)
expect
(
page
).
not_to
have_content
project
.
name_with_namespace
end
step
'I should see project "Archive"'
do
project
=
Project
.
find_by
(
name:
"Archive"
)
expect
(
page
).
to
have_content
project
.
name_with_namespace
end
step
'project "Archive" has comments'
do
project
=
Project
.
find_by
(
name:
"Archive"
)
2
.
times
{
create
(
:note_on_issue
,
project:
project
)
}
end
# ----------------------------------------
# Visibility level
# ----------------------------------------
...
...
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