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
b5815511
Commit
b5815511
authored
Sep 10, 2012
by
Nihad Abbasov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add spinach steps for remaining features
parent
698500dd
Changes
16
Hide whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
357 additions
and
24 deletions
+357
-24
features/project/deploy_keys.feature
features/project/deploy_keys.feature
+0
-0
features/project/merge_requests.feature
features/project/merge_requests.feature
+3
-3
features/project/network.feature
features/project/network.feature
+2
-3
features/project/project.feature
features/project/project.feature
+8
-5
features/project/snippets.feature
features/project/snippets.feature
+0
-0
features/project/team_management.feature
features/project/team_management.feature
+7
-8
features/project/wall.feature
features/project/wall.feature
+3
-2
features/project/web_hooks.feature
features/project/web_hooks.feature
+0
-0
features/project/wiki.feature
features/project/wiki.feature
+3
-3
features/steps/create_project.rb
features/steps/create_project.rb
+27
-0
features/steps/project.rb
features/steps/project.rb
+15
-0
features/steps/project_merge_requests.rb
features/steps/project_merge_requests.rb
+102
-0
features/steps/project_network_graph.rb
features/steps/project_network_graph.rb
+28
-0
features/steps/project_team_management.rb
features/steps/project_team_management.rb
+98
-0
features/steps/project_wall.rb
features/steps/project_wall.rb
+24
-0
features/steps/project_wiki.rb
features/steps/project_wiki.rb
+37
-0
No files found.
features/project/deploy_keys.feature
deleted
100644 → 0
View file @
698500dd
features/project/merge_requests.feature
View file @
b5815511
Feature
:
Merge Requests
Feature
:
Project
Merge Requests
Background
:
Given
I signin as a user
Given
I sign
in as a user
And
I own project
"Shop"
And
project
"Shop"
have
"Bug NS-04"
open merge request
And
project
"Shop"
have
"Feature NS-03"
closed merge request
And
I visit project
"Shop"
merge requests page
And
I visit project
"Shop"
merge requests page
Scenario
:
I
should see open merge requests
Then
I should see
"Bug NS-04"
in merge requests
...
...
features/project/network.feature
View file @
b5815511
@javascript
Feature
:
Project Network Graph
Background
:
Given
I signin as a user
Given
I sign
in as a user
And
I own project
"Shop"
And
I visit project
"Shop"
network page
@javascript
Scenario
:
I
should see project network
Then
page should have network graph
features/project/project.feature
View file @
b5815511
Feature
:
Project
Feature
:
Project
s
Background
:
Given
I signin as a user
And
I own project
"Shop"
And
I visit project
"Shop"
page
And
I visit project
"Shop"
page
Scenario
:
I
should see project activity
# @wip
# Scenario: I should see project activity
Scenario
:
I
edit project
# @wip
# Scenario: I edit project
Scenario
:
I
visit attachments
# @wip
# Scenario: I visit attachments
features/project/snippets.feature
deleted
100644 → 0
View file @
698500dd
features/project/team_management.feature
View file @
b5815511
Feature
:
Project Team management
Background
:
Given
I signin as a user
Background
:
Given
I sign
in as a user
And
I own project
"Shop"
And
gitlab user
"Mike"
And
gitlab user
"Sam"
And
gitlab user
"Mike"
And
gitlab user
"Sam"
And
"Sam"
is
"Shop"
developer
And
I visit project
"Shop"
team page
And
I visit project
"Shop"
team page
Scenario
:
See all team members
Then
I should be able to see myself in team
...
...
@@ -20,7 +20,7 @@ Feature: Project Team management
Scenario
:
Update user access
Given
I should see
"Sam"
in team list as
"Developer"
And
I change
"Sam"
role to
"Reporter"
Then
I visit project
"Shop"
team page
Then
I visit project
"Shop"
team page
And
I should see
"Sam"
in team list as
"Reporter"
Scenario
:
View team member profile
...
...
@@ -30,6 +30,5 @@ Feature: Project Team management
Scenario
:
Cancel team member
Given
I click link
"Sam"
And
I click link
"Remove from team"
Then
I visit project
"Shop"
team page
Then
I visit project
"Shop"
team page
And
I should not see
"Sam"
in team list
features/project/wall.feature
View file @
b5815511
...
...
@@ -7,11 +7,12 @@ Feature: Project Wall
Background
:
Given
I signin as a user
And
I own project
"Shop"
And
I visit project
"Shop"
wall page
And
I visit project
"Shop"
wall page
@javascript
Scenario
:
Write comment
Given
I write new comment
"my special test message"
Then
I should see project wall note
"my special test message"
Then
I visit project
"Shop"
wall page
Then
I visit project
"Shop"
wall page
And
I should see project wall note
"my special test message"
features/project/web_hooks.feature
deleted
100644 → 0
View file @
698500dd
features/project/wiki.feature
View file @
b5815511
Feature
:
Wiki
Background
:
Given
I signin as a user
Feature
:
Project
Wiki
Background
:
Given
I sign
in as a user
And
I own project
"Shop"
Given
I visit project wiki page
...
...
features/steps/create_project.rb
0 → 100644
View file @
b5815511
class
CreateProject
<
Spinach
::
FeatureSteps
Given
'I signin as a user'
do
login_as
:user
end
When
'I visit new project page'
do
visit
new_project_path
end
And
'fill project form with valid data'
do
fill_in
'project_name'
,
:with
=>
'NewProject'
fill_in
'project_code'
,
:with
=>
'NPR'
fill_in
'project_path'
,
:with
=>
'newproject'
click_button
"Create project"
end
Then
'I should see project page'
do
current_path
.
should
==
project_path
(
Project
.
last
)
page
.
should
have_content
(
'NewProject'
)
end
And
'I should see empty project instuctions'
do
page
.
should
have_content
"git init"
page
.
should
have_content
"git remote"
page
.
should
have_content
Project
.
last
.
url_to_repo
end
end
features/steps/project.rb
0 → 100644
View file @
b5815511
class
Projects
<
Spinach
::
FeatureSteps
Given
'I sign in as a user'
do
login_as
:user
end
And
'I own project "Shop"'
do
@project
=
Factory
:project
,
:name
=>
"Shop"
@project
.
add_access
(
@user
,
:admin
)
end
And
'I visit project "Shop" page'
do
project
=
Project
.
find_by_name
(
"Shop"
)
visit
project_path
(
project
)
end
end
features/steps/project_merge_requests.rb
0 → 100644
View file @
b5815511
class
ProjectMergeRequests
<
Spinach
::
FeatureSteps
Then
'I should see "Bug NS-04" in merge requests'
do
page
.
should
have_content
"Bug NS-04"
end
And
'I should not see "Feature NS-03" in merge requests'
do
page
.
should_not
have_content
"Feature NS-03"
end
Given
'I click link "Closed"'
do
click_link
"Closed"
end
Then
'I should see "Feature NS-03" in merge requests'
do
page
.
should
have_content
"Feature NS-03"
end
And
'I should not see "Bug NS-04" in merge requests'
do
page
.
should_not
have_content
"Bug NS-04"
end
Given
'I click link "All"'
do
click_link
"All"
end
Given
'I click link "Bug NS-04"'
do
click_link
"Bug NS-04"
end
Then
'I should see merge request "Bug NS-04"'
do
page
.
should
have_content
"Bug NS-04"
end
And
'I click link "Close"'
do
click_link
"Close"
end
Then
'I should see closed merge request "Bug NS-04"'
do
mr
=
MergeRequest
.
find_by_title
(
"Bug NS-04"
)
mr
.
closed
.
should
be_true
page
.
should
have_content
"Closed by"
end
Given
'I click link "New Merge Request"'
do
click_link
"New Merge Request"
end
And
'I submit new merge request "Wiki Feature"'
do
fill_in
"merge_request_title"
,
:with
=>
"Wiki Feature"
select
"master"
,
:from
=>
"merge_request_source_branch"
select
"stable"
,
:from
=>
"merge_request_target_branch"
click_button
"Save"
end
Then
'I should see merge request "Wiki Feature"'
do
page
.
should
have_content
"Wiki Feature"
end
Given
'I visit merge request page "Bug NS-04"'
do
mr
=
MergeRequest
.
find_by_title
(
"Bug NS-04"
)
visit
project_merge_request_path
(
mr
.
project
,
mr
)
end
And
'I leave a comment like "XML attached"'
do
fill_in
"note_note"
,
:with
=>
"XML attached"
click_button
"Add Comment"
end
Then
'I should see comment "XML attached"'
do
page
.
should
have_content
"XML attached"
end
Given
'I sign in as a user'
do
login_as
:user
end
And
'I own project "Shop"'
do
@project
=
Factory
:project
,
:name
=>
"Shop"
@project
.
add_access
(
@user
,
:admin
)
end
And
'project "Shop" have "Bug NS-04" open merge request'
do
project
=
Project
.
find_by_name
(
"Shop"
)
Factory
.
create
(
:merge_request
,
:title
=>
"Bug NS-04"
,
:project
=>
project
,
:author
=>
project
.
users
.
first
)
end
And
'project "Shop" have "Feature NS-03" closed merge request'
do
project
=
Project
.
find_by_name
(
"Shop"
)
Factory
.
create
(
:merge_request
,
:title
=>
"Feature NS-03"
,
:project
=>
project
,
:author
=>
project
.
users
.
first
,
:closed
=>
true
)
end
And
'I visit project "Shop" merge requests page'
do
visit
project_merge_requests_path
(
Project
.
find_by_name
(
"Shop"
))
end
end
features/steps/project_network_graph.rb
0 → 100644
View file @
b5815511
class
ProjectNetworkGraph
<
Spinach
::
FeatureSteps
Then
'page should have network graph'
do
page
.
should
have_content
"Project Network Graph"
within
".graph"
do
page
.
should
have_content
"master"
page
.
should
have_content
"scss_refactor..."
end
end
Given
'I sign in as a user'
do
login_as
:user
end
And
'I own project "Shop"'
do
@project
=
Factory
:project
,
:name
=>
"Shop"
@project
.
add_access
(
@user
,
:admin
)
end
And
'I visit project "Shop" network page'
do
project
=
Project
.
find_by_name
(
"Shop"
)
# Stub out find_all to speed this up (10 commits vs. 650)
commits
=
Grit
::
Commit
.
find_all
(
project
.
repo
,
nil
,
{
max_count:
10
})
Grit
::
Commit
.
stub
(
:find_all
).
and_return
(
commits
)
visit
graph_project_path
(
project
)
end
end
features/steps/project_team_management.rb
0 → 100644
View file @
b5815511
class
ProjectTeamManagement
<
Spinach
::
FeatureSteps
Then
'I should be able to see myself in team'
do
page
.
should
have_content
(
@user
.
name
)
page
.
should
have_content
(
@user
.
email
)
end
And
'I should see "Sam" in team list'
do
user
=
User
.
find_by_name
(
"Sam"
)
page
.
should
have_content
(
user
.
name
)
page
.
should
have_content
(
user
.
email
)
end
Given
'I click link "New Team Member"'
do
click_link
"New Team Member"
end
And
'I select "Mike" as "Reporter"'
do
user
=
User
.
find_by_name
(
"Mike"
)
within
"#new_team_member"
do
select
user
.
name
,
:from
=>
"user_ids"
select
"Reporter"
,
:from
=>
"project_access"
end
click_button
"Save"
end
Then
'I should see "Mike" in team list as "Reporter"'
do
user
=
User
.
find_by_name
(
"Mike"
)
role_id
=
find
(
".user_
#{
user
.
id
}
#team_member_project_access"
).
value
role_id
.
should
==
UsersProject
.
access_roles
[
"Reporter"
].
to_s
end
Given
'I should see "Sam" in team list as "Developer"'
do
user
=
User
.
find_by_name
(
"Sam"
)
role_id
=
find
(
".user_
#{
user
.
id
}
#team_member_project_access"
).
value
role_id
.
should
==
UsersProject
.
access_roles
[
"Developer"
].
to_s
end
And
'I change "Sam" role to "Reporter"'
do
user
=
User
.
find_by_name
(
"Sam"
)
within
".user_
#{
user
.
id
}
"
do
select
"Reporter"
,
:from
=>
"team_member_project_access"
end
end
Then
'I visit project "Shop" team page'
do
visit
team_project_path
(
Project
.
find_by_name
(
"Shop"
))
end
And
'I should see "Sam" in team list as "Reporter"'
do
user
=
User
.
find_by_name
(
"Sam"
)
role_id
=
find
(
".user_
#{
user
.
id
}
#team_member_project_access"
).
value
role_id
.
should
==
UsersProject
.
access_roles
[
"Reporter"
].
to_s
end
Given
'I click link "Sam"'
do
click_link
"Sam"
end
Then
'I should see "Sam" team profile'
do
user
=
User
.
find_by_name
(
"Sam"
)
page
.
should
have_content
(
user
.
name
)
page
.
should
have_content
(
user
.
email
)
page
.
should
have_content
(
"To team list"
)
end
And
'I click link "Remove from team"'
do
click_link
"Remove from team"
end
And
'I should not see "Sam" in team list'
do
user
=
User
.
find_by_name
(
"Sam"
)
page
.
should_not
have_content
(
user
.
name
)
page
.
should_not
have_content
(
user
.
email
)
end
Given
'I sign in as a user'
do
login_as
:user
end
And
'I own project "Shop"'
do
@project
=
Factory
:project
,
:name
=>
"Shop"
@project
.
add_access
(
@user
,
:admin
)
end
And
'gitlab user "Mike"'
do
Factory
:user
,
:name
=>
"Mike"
end
And
'gitlab user "Sam"'
do
Factory
:user
,
:name
=>
"Sam"
end
And
'"Sam" is "Shop" developer'
do
user
=
User
.
find_by_name
(
"Sam"
)
project
=
Project
.
find_by_name
(
"Shop"
)
project
.
add_access
(
user
,
:write
)
end
end
features/steps/project_wall.rb
0 → 100644
View file @
b5815511
class
ProjectWall
<
Spinach
::
FeatureSteps
Given
'I write new comment "my special test message"'
do
fill_in
"note_note"
,
:with
=>
"my special test message"
click_button
"Add Comment"
end
Then
'I should see project wall note "my special test message"'
do
page
.
should
have_content
"my special test message"
end
Then
'I visit project "Shop" wall page'
do
project
=
Project
.
find_by_name
(
"Shop"
)
visit
wall_project_path
(
project
)
end
Given
'I signin as a user'
do
login_as
:user
end
And
'I own project "Shop"'
do
@project
=
Factory
:project
,
:name
=>
"Shop"
@project
.
add_access
(
@user
,
:admin
)
end
end
features/steps/project_wiki.rb
0 → 100644
View file @
b5815511
class
ProjectWiki
<
Spinach
::
FeatureSteps
Given
'I create Wiki page'
do
fill_in
"Title"
,
:with
=>
'Test title'
fill_in
"Content"
,
:with
=>
'[link test](test)'
click_on
"Save"
end
Then
'I should see newly created wiki page'
do
page
.
should
have_content
"Test title"
page
.
should
have_content
"link test"
click_link
"link test"
page
.
should
have_content
"Editing page"
end
And
'I leave a comment like "XML attached"'
do
fill_in
"note_note"
,
:with
=>
"XML attached"
click_button
"Add Comment"
end
Then
'I should see comment "XML attached"'
do
page
.
should
have_content
"XML attached"
end
Given
'I sign in as a user'
do
login_as
:user
end
And
'I own project "Shop"'
do
@project
=
Factory
:project
,
:name
=>
"Shop"
@project
.
add_access
(
@user
,
:admin
)
end
Given
'I visit project wiki page'
do
visit
project_wiki_path
(
@project
,
:index
)
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