BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
e4447de2
Commit
e4447de2
authored
Sep 06, 2012
by
randx
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Cucumber refactoring
parent
21bfd1e7
Show whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
149 additions
and
105 deletions
+149
-105
issues.feature
features/projects/issues/issues.feature
+28
-0
common_steps.rb
features/step_definitions/common_steps.rb
+21
-0
dashboard_steps.rb
features/step_definitions/dashboard_steps.rb
+0
-12
profile_steps.rb
features/step_definitions/profile/profile_steps.rb
+0
-12
browse_code_steps.rb
features/step_definitions/project/browse_code_steps.rb
+0
-12
project_commits_steps.rb
features/step_definitions/project/project_commits_steps.rb
+0
-24
project_issues_steps.rb
features/step_definitions/project/project_issues_steps.rb
+9
-9
project_merge_requests_steps.rb
.../step_definitions/project/project_merge_requests_steps.rb
+0
-9
project_milestones_steps.rb
...ures/step_definitions/project/project_milestones_steps.rb
+0
-5
project_team_steps.rb
features/step_definitions/project/project_team_steps.rb
+0
-8
project_wiki_steps.rb
features/step_definitions/project/project_wiki_steps.rb
+0
-4
projects_steps.rb
features/step_definitions/project/projects_steps.rb
+0
-10
visit_steps.rb
features/step_definitions/visit_steps.rb
+91
-0
No files found.
features/projects/issues/issues.feature
View file @
e4447de2
...
...
@@ -36,3 +36,31 @@ Feature: Issues
Given
I visit issue page
"Release 0.4"
And
I leave a comment like
"XML attached"
Then
I should see comment
"XML attached"
@javascript
Scenario
:
I
search issue
Given
I fill in issue search with
"Release"
Then
I should see
"Release 0.4"
in issues
And
I should not see
"Release 0.3"
in issues
@javascript
Scenario
:
I
search issue that not exist
Given
I fill in issue search with
"Bug"
Then
I should not see
"Release 0.4"
in issues
And
I should not see
"Release 0.3"
in issues
@javascript
Scenario
:
I
search all issues
Given
I click link
"All"
And
I fill in issue search with
"0.3"
Then
I should see
"Release 0.3"
in issues
And
I should not see
"Release 0.4"
in issues
@javascript
Scenario
:
I
clear search
Given
I click link
"All"
And
I fill in issue search with
"Something"
And
I fill in issue search with
""
Then
I should see
"Release 0.4"
in issues
And
I should see
"Release 0.3"
in issues
features/step_definitions/common_steps.rb
0 → 100644
View file @
e4447de2
include
LoginHelpers
Given
/^I signin as a user$/
do
login_as
:user
end
When
/^I click link "(.*?)"$/
do
|
link
|
click_link
link
end
When
/^I click button "(.*?)"$/
do
|
button
|
click_button
button
end
When
/^I fill in "(.*?)" with "(.*?)"$/
do
|
field
,
value
|
fill_in
field
,
:with
=>
value
end
Given
/^show me page$/
do
save_and_open_page
end
features/step_definitions/dashboard_steps.rb
View file @
e4447de2
Given
/^I visit dashboard page$/
do
visit
dashboard_path
end
Then
/^I should see "(.*?)" link$/
do
|
arg1
|
page
.
should
have_link
(
arg1
)
end
...
...
@@ -66,10 +62,6 @@ Given /^I search for "(.*?)"$/ do |arg1|
click_button
"Search"
end
Given
/^I visit dashboard issues page$/
do
visit
dashboard_issues_path
end
Then
/^I should see issues assigned to me$/
do
issues
=
@user
.
issues
issues
.
each
do
|
issue
|
...
...
@@ -78,10 +70,6 @@ Then /^I should see issues assigned to me$/ do
end
end
Given
/^I visit dashboard merge requests page$/
do
visit
dashboard_merge_requests_path
end
Then
/^I should see my merge requests$/
do
merge_requests
=
@user
.
merge_requests
merge_requests
.
each
do
|
mr
|
...
...
features/step_definitions/profile/profile_steps.rb
View file @
e4447de2
Given
/^I visit profile page$/
do
visit
profile_path
end
Then
/^I should see my profile info$/
do
page
.
should
have_content
"Profile"
page
.
should
have_content
@user
.
name
page
.
should
have_content
@user
.
email
end
Given
/^I visit profile password page$/
do
visit
profile_password_path
end
Then
/^I change my password$/
do
fill_in
"user_password"
,
:with
=>
"222333"
fill_in
"user_password_confirmation"
,
:with
=>
"222333"
...
...
@@ -22,10 +14,6 @@ Then /^I should be redirected to sign in page$/ do
current_path
.
should
==
new_user_session_path
end
Given
/^I visit profile token page$/
do
visit
profile_token_path
end
Then
/^I reset my token$/
do
@old_token
=
@user
.
private_token
click_button
"Reset"
...
...
features/step_definitions/project/browse_code_steps.rb
View file @
e4447de2
Given
/^I visit project source page$/
do
visit
tree_project_ref_path
(
@project
,
@project
.
root_ref
)
end
Then
/^I should see files from repository$/
do
page
.
should
have_content
(
"app"
)
page
.
should
have_content
(
"History"
)
page
.
should
have_content
(
"Gemfile"
)
end
Given
/^I visit project source page for "(.*?)"$/
do
|
arg1
|
visit
tree_project_ref_path
(
@project
,
arg1
)
end
Then
/^I should see files from repository for "(.*?)"$/
do
|
arg1
|
current_path
.
should
==
tree_project_ref_path
(
@project
,
arg1
)
page
.
should
have_content
(
"app"
)
...
...
@@ -31,10 +23,6 @@ Given /^I click on raw button$/ do
click_link
"raw"
end
Given
/^I visit blob file from repo$/
do
visit
tree_project_ref_path
(
@project
,
ValidCommit
::
ID
,
:path
=>
ValidCommit
::
BLOB_FILE_PATH
)
end
Then
/^I should see raw file content$/
do
page
.
source
.
should
==
ValidCommit
::
BLOB_FILE
end
...
...
features/step_definitions/project/project_commits_steps.rb
View file @
e4447de2
Given
/^I visit project commits page$/
do
visit
project_commits_path
(
@project
)
end
Then
/^I see project commits$/
do
current_path
.
should
==
project_commits_path
(
@project
)
...
...
@@ -23,19 +19,11 @@ Then /^I see commits atom feed$/ do
page
.
body
.
should
have_selector
(
"entry summary"
,
:text
=>
commit
.
description
)
end
Given
/^I click on commit link$/
do
visit
project_commit_path
(
@project
,
ValidCommit
::
ID
)
end
Then
/^I see commit info$/
do
page
.
should
have_content
ValidCommit
::
MESSAGE
page
.
should
have_content
"Showing 1 changed file"
end
Given
/^I visit compare refs page$/
do
visit
compare_project_commits_path
(
@project
)
end
Given
/^I fill compare fields with refs$/
do
fill_in
"from"
,
:with
=>
"master"
fill_in
"to"
,
:with
=>
"stable"
...
...
@@ -48,18 +36,6 @@ Given /^I see compared refs$/ do
page
.
should
have_content
"Showing 73 changed files"
end
Given
/^I visit project branches page$/
do
visit
branches_project_repository_path
(
@project
)
end
Given
/^I visit project commit page$/
do
visit
project_commit_path
(
@project
,
ValidCommit
::
ID
)
end
Given
/^I visit project tags page$/
do
visit
tags_project_repository_path
(
@project
)
end
Then
/^I should see "(.*?)" recent branches list$/
do
|
arg1
|
page
.
should
have_content
(
"Branches"
)
page
.
should
have_content
(
"master"
)
...
...
features/step_definitions/project/project_issues_steps.rb
View file @
e4447de2
...
...
@@ -8,10 +8,6 @@ Given /^project "(.*?)" have "(.*?)" closed issue$/ do |arg1, arg2|
Factory
.
create
(
:issue
,
:title
=>
arg2
,
:project
=>
project
,
:author
=>
project
.
users
.
first
,
:closed
=>
true
)
end
Given
/^I visit project "(.*?)" issues page$/
do
|
arg1
|
visit
project_issues_path
(
Project
.
find_by_name
(
arg1
))
end
Given
/^I should see "(.*?)" in issues$/
do
|
arg1
|
page
.
should
have_content
arg1
end
...
...
@@ -27,11 +23,6 @@ Then /^I should see issue "(.*?)"$/ do |arg1|
page
.
should
have_content
issue
.
project
.
name
end
Given
/^I visit issue page "(.*?)"$/
do
|
arg1
|
issue
=
Issue
.
find_by_title
(
arg1
)
visit
project_issue_path
(
issue
.
project
,
issue
)
end
Given
/^I submit new issue "(.*?)"$/
do
|
arg1
|
fill_in
"issue_title"
,
with:
arg1
click_button
"Submit new issue"
...
...
@@ -55,3 +46,12 @@ Then /^I should see label "(.*?)"$/ do |arg1|
page
.
should
have_content
arg1
end
end
Given
/^I fill in issue search with "(.*?)"$/
do
|
arg1
|
# Because fill_in, with: "" triggers nothing
# we need to trigger a keyup event
if
arg1
==
''
page
.
execute_script
(
"$('.issue_search').val('').keyup();"
);
end
fill_in
'issue_search'
,
with:
arg1
end
features/step_definitions/project/project_merge_requests_steps.rb
View file @
e4447de2
...
...
@@ -8,10 +8,6 @@ Given /^project "(.*?)" have "(.*?)" closed merge request$/ do |arg1, arg2|
Factory
.
create
(
:merge_request
,
:title
=>
arg2
,
:project
=>
project
,
:author
=>
project
.
users
.
first
,
:closed
=>
true
)
end
Given
/^I visit project "(.*?)" merge requests page$/
do
|
arg1
|
visit
project_merge_requests_path
(
Project
.
find_by_name
(
arg1
))
end
Then
/^I should see "(.*?)" in merge requests$/
do
|
arg1
|
page
.
should
have_content
arg1
end
...
...
@@ -34,11 +30,6 @@ Given /^I submit new merge request "(.*?)"$/ do |arg1|
click_button
"Save"
end
Given
/^I visit merge request page "(.*?)"$/
do
|
arg1
|
mr
=
MergeRequest
.
find_by_title
(
arg1
)
visit
project_merge_request_path
(
mr
.
project
,
mr
)
end
Then
/^I should see closed merge request "(.*?)"$/
do
|
arg1
|
mr
=
MergeRequest
.
find_by_title
(
arg1
)
mr
.
closed
.
should
be_true
...
...
features/step_definitions/project/project_milestones_steps.rb
View file @
e4447de2
...
...
@@ -12,11 +12,6 @@ Given /^project "(.*?)" has milestone "(.*?)"$/ do |arg1, arg2|
end
end
Given
/^I visit project "(.*?)" milestones page$/
do
|
arg1
|
@project
=
Project
.
find_by_name
(
arg1
)
visit
project_milestones_path
(
@project
)
end
Then
/^I should see active milestones$/
do
milestone
=
@project
.
milestones
.
first
page
.
should
have_content
(
milestone
.
title
[
0
..
10
])
...
...
features/step_definitions/project/project_team_steps.rb
View file @
e4447de2
...
...
@@ -8,10 +8,6 @@ Given /^"(.*?)" is "(.*?)" developer$/ do |arg1, arg2|
project
.
add_access
(
user
,
:write
)
end
Given
/^I visit project "(.*?)" team page$/
do
|
arg1
|
visit
team_project_path
(
Project
.
find_by_name
(
arg1
))
end
Then
/^I should be able to see myself in team$/
do
page
.
should
have_content
(
@user
.
name
)
page
.
should
have_content
(
@user
.
email
)
...
...
@@ -23,10 +19,6 @@ Then /^I should see "(.*?)" in team list$/ do |arg1|
page
.
should
have_content
(
user
.
email
)
end
Given
/^I click link "(.*?)"$/
do
|
arg1
|
click_link
arg1
end
Given
/^I select "(.*?)" as "(.*?)"$/
do
|
arg1
,
arg2
|
user
=
User
.
find_by_name
(
arg1
)
within
"#new_team_member"
do
...
...
features/step_definitions/project/project_wiki_steps.rb
View file @
e4447de2
Given
/^I visit project wiki page$/
do
visit
project_wiki_path
(
@project
,
:index
)
end
Given
/^I create Wiki page$/
do
fill_in
"Title"
,
:with
=>
'Test title'
fill_in
"Content"
,
:with
=>
'[link test](test)'
...
...
features/step_definitions/project/projects_steps.rb
View file @
e4447de2
include
LoginHelpers
Given
/^I signin as a user$/
do
login_as
:user
end
When
/^I visit new project page$/
do
visit
new_project_path
end
...
...
@@ -65,10 +59,6 @@ Given /^I visit project "(.*?)" network page$/ do |arg1|
visit
graph_project_path
(
project
)
end
Given
/^show me page$/
do
save_and_open_page
end
Given
/^page should have network graph$/
do
page
.
should
have_content
"Project Network Graph"
within
".graph"
do
...
...
features/step_definitions/visit_steps.rb
0 → 100644
View file @
e4447de2
Given
/^I visit project "(.*?)" issues page$/
do
|
arg1
|
visit
project_issues_path
(
Project
.
find_by_name
(
arg1
))
end
Given
/^I visit issue page "(.*?)"$/
do
|
arg1
|
issue
=
Issue
.
find_by_title
(
arg1
)
visit
project_issue_path
(
issue
.
project
,
issue
)
end
Given
/^I visit project "(.*?)" merge requests page$/
do
|
arg1
|
visit
project_merge_requests_path
(
Project
.
find_by_name
(
arg1
))
end
Given
/^I visit merge request page "(.*?)"$/
do
|
arg1
|
mr
=
MergeRequest
.
find_by_title
(
arg1
)
visit
project_merge_request_path
(
mr
.
project
,
mr
)
end
Given
/^I visit project "(.*?)" milestones page$/
do
|
arg1
|
@project
=
Project
.
find_by_name
(
arg1
)
visit
project_milestones_path
(
@project
)
end
Given
/^I visit project commits page$/
do
visit
project_commits_path
(
@project
)
end
Given
/^I visit compare refs page$/
do
visit
compare_project_commits_path
(
@project
)
end
Given
/^I visit project branches page$/
do
visit
branches_project_repository_path
(
@project
)
end
Given
/^I visit project commit page$/
do
visit
project_commit_path
(
@project
,
ValidCommit
::
ID
)
end
Given
/^I visit project tags page$/
do
visit
tags_project_repository_path
(
@project
)
end
Given
/^I click on commit link$/
do
visit
project_commit_path
(
@project
,
ValidCommit
::
ID
)
end
Given
/^I visit project source page$/
do
visit
tree_project_ref_path
(
@project
,
@project
.
root_ref
)
end
Given
/^I visit project source page for "(.*?)"$/
do
|
arg1
|
visit
tree_project_ref_path
(
@project
,
arg1
)
end
Given
/^I visit blob file from repo$/
do
visit
tree_project_ref_path
(
@project
,
ValidCommit
::
ID
,
:path
=>
ValidCommit
::
BLOB_FILE_PATH
)
end
Given
/^I visit project "(.*?)" team page$/
do
|
arg1
|
visit
team_project_path
(
Project
.
find_by_name
(
arg1
))
end
Given
/^I visit project wiki page$/
do
visit
project_wiki_path
(
@project
,
:index
)
end
Given
/^I visit profile page$/
do
visit
profile_path
end
Given
/^I visit profile token page$/
do
visit
profile_token_path
end
Given
/^I visit profile password page$/
do
visit
profile_password_path
end
Given
/^I visit dashboard page$/
do
visit
dashboard_path
end
Given
/^I visit dashboard issues page$/
do
visit
dashboard_issues_path
end
Given
/^I visit dashboard merge requests page$/
do
visit
dashboard_merge_requests_path
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