Commit bb75052a904c24d1484fa6ec0ad96839effb8ee3

Authored by Nihad Abbasov
1 parent 9f25657a

get rid of cucumber step definitions

features/step_definitions/common_steps.rb
@@ -1,21 +0,0 @@ @@ -1,21 +0,0 @@
1 -include LoginHelpers  
2 -  
3 -Given /^I signin as a user$/ do  
4 - login_as :user  
5 -end  
6 -  
7 -When /^I click link "(.*?)"$/ do |link|  
8 - click_link link  
9 -end  
10 -  
11 -When /^I click button "(.*?)"$/ do |button|  
12 - click_button button  
13 -end  
14 -  
15 -When /^I fill in "(.*?)" with "(.*?)"$/ do |field, value|  
16 - fill_in field, :with => value  
17 -end  
18 -  
19 -Given /^show me page$/ do  
20 - save_and_open_page  
21 -end  
features/step_definitions/dashboard_steps.rb
@@ -1,136 +0,0 @@ @@ -1,136 +0,0 @@
1 -Then /^I should see "(.*?)" link$/ do |arg1|  
2 - page.should have_link(arg1)  
3 -end  
4 -  
5 -Then /^I should see "(.*?)" project link$/ do |arg1|  
6 - page.should have_link(arg1)  
7 -end  
8 -  
9 -Then /^I should see project "(.*?)" activity feed$/ do |arg1|  
10 - project = Project.find_by_name(arg1)  
11 - page.should have_content "#{@user.name} pushed new branch new_design at #{project.name}"  
12 -end  
13 -  
14 -Given /^project "(.*?)" has push event$/ do |arg1|  
15 - @project = Project.find_by_name(arg1)  
16 -  
17 - data = {  
18 - :before => "0000000000000000000000000000000000000000",  
19 - :after => "0220c11b9a3e6c69dc8fd35321254ca9a7b98f7e",  
20 - :ref => "refs/heads/new_design",  
21 - :user_id => @user.id,  
22 - :user_name => @user.name,  
23 - :repository => {  
24 - :name => @project.name,  
25 - :url => "localhost/rubinius",  
26 - :description => "",  
27 - :homepage => "localhost/rubinius",  
28 - :private => true  
29 - }  
30 - }  
31 -  
32 - @event = Event.create(  
33 - :project => @project,  
34 - :action => Event::Pushed,  
35 - :data => data,  
36 - :author_id => @user.id  
37 - )  
38 -end  
39 -  
40 -Then /^I should see last push widget$/ do  
41 - page.should have_content "Your pushed to branch new_design"  
42 - page.should have_link "Create Merge Request"  
43 -end  
44 -  
45 -Then /^I click "(.*?)" link$/ do |arg1|  
46 - click_link arg1 #Create Merge Request"  
47 -end  
48 -  
49 -Then /^I see prefilled new Merge Request page$/ do  
50 - current_path.should == new_project_merge_request_path(@project)  
51 - find("#merge_request_source_branch").value.should == "new_design"  
52 - find("#merge_request_target_branch").value.should == "master"  
53 - find("#merge_request_title").value.should == "New Design"  
54 -end  
55 -  
56 -Given /^I visit dashboard search page$/ do  
57 - visit search_path  
58 -end  
59 -  
60 -Given /^I search for "(.*?)"$/ do |arg1|  
61 - fill_in "dashboard_search", :with => arg1  
62 - click_button "Search"  
63 -end  
64 -  
65 -Then /^I should see issues assigned to me$/ do  
66 - issues = @user.issues  
67 - issues.each do |issue|  
68 - page.should have_content(issue.title[0..10])  
69 - page.should have_content(issue.project.name)  
70 - end  
71 -end  
72 -  
73 -Then /^I should see my merge requests$/ do  
74 - merge_requests = @user.merge_requests  
75 - merge_requests.each do |mr|  
76 - page.should have_content(mr.title[0..10])  
77 - page.should have_content(mr.project.name)  
78 - end  
79 -end  
80 -  
81 -Given /^I have assigned issues$/ do  
82 - project = Factory :project  
83 - project.add_access(@user, :read, :write)  
84 -  
85 - issue1 = Factory :issue,  
86 - :author => @user,  
87 - :assignee => @user,  
88 - :project => project  
89 -  
90 - issue2 = Factory :issue,  
91 - :author => @user,  
92 - :assignee => @user,  
93 - :project => project  
94 -end  
95 -  
96 -Given /^I have authored merge requests$/ do  
97 - project1 = Factory :project  
98 -  
99 - project2 = Factory :project  
100 -  
101 - project1.add_access(@user, :read, :write)  
102 - project2.add_access(@user, :read, :write)  
103 -  
104 - merge_request1 = Factory :merge_request,  
105 - :author => @user,  
106 - :project => project1  
107 -  
108 - merge_request2 = Factory :merge_request,  
109 - :author => @user,  
110 - :project => project2  
111 -end  
112 -  
113 -Given /^user with name "(.*?)" joined project "(.*?)"$/ do |user_name, project_name|  
114 - user = Factory.create(:user, {name: user_name})  
115 - project = Project.find_by_name project_name  
116 - Event.create(  
117 - project: project,  
118 - author_id: user.id,  
119 - action: Event::Joined  
120 - )  
121 -end  
122 -  
123 -Given /^user with name "(.*?)" left project "(.*?)"$/ do |user_name, project_name|  
124 - user = User.find_by_name user_name  
125 - project = Project.find_by_name project_name  
126 - Event.create(  
127 - project: project,  
128 - author_id: user.id,  
129 - action: Event::Left  
130 - )  
131 -end  
132 -  
133 -Then /^I should see "(.*?)" event$/ do |event_text|  
134 - page.should have_content(event_text)  
135 -end  
136 -  
features/step_definitions/profile/profile_keys_steps.rb
@@ -1,34 +0,0 @@ @@ -1,34 +0,0 @@
1 -Given /^I visit profile keys page$/ do  
2 - visit keys_path  
3 -end  
4 -  
5 -Then /^I should see my ssh keys$/ do  
6 - @user.keys.each do |key|  
7 - page.should have_content(key.title)  
8 - end  
9 -end  
10 -  
11 -Given /^I have ssh keys:$/ do |table|  
12 - table.hashes.each do |row|  
13 - Factory :key, :user => @user, :title => row[:title], :key => "jfKLJDFKSFJSHFJ#{row[:title]}"  
14 - end  
15 -end  
16 -  
17 -Given /^I submit new ssh key "(.*?)"$/ do |arg1|  
18 - fill_in "key_title", :with => arg1  
19 - fill_in "key_key", :with => "ssh-rsa publickey234="  
20 - click_button "Save"  
21 -end  
22 -  
23 -Then /^I should see new ssh key "(.*?)"$/ do |arg1|  
24 - key = Key.find_by_title(arg1)  
25 - page.should have_content(key.title)  
26 - page.should have_content(key.key)  
27 - current_path.should == key_path(key)  
28 -end  
29 -  
30 -Then /^I should not see "(.*?)" ssh key$/ do |arg1|  
31 - within "#keys-table" do  
32 - page.should_not have_content(arg1)  
33 - end  
34 -end  
features/step_definitions/profile/profile_steps.rb
@@ -1,39 +0,0 @@ @@ -1,39 +0,0 @@
1 -Then /^I should see my profile info$/ do  
2 - page.should have_content "Profile"  
3 - page.should have_content @user.name  
4 - page.should have_content @user.email  
5 -end  
6 -  
7 -Then /^I change my password$/ do  
8 - fill_in "user_password", :with => "222333"  
9 - fill_in "user_password_confirmation", :with => "222333"  
10 - click_button "Save"  
11 -end  
12 -  
13 -Then /^I should be redirected to sign in page$/ do  
14 - current_path.should == new_user_session_path  
15 -end  
16 -  
17 -Then /^I reset my token$/ do  
18 - @old_token = @user.private_token  
19 - click_button "Reset"  
20 -end  
21 -  
22 -Then /^I should see new token$/ do  
23 - find("#token").value.should_not == @old_token  
24 - find("#token").value.should == @user.reload.private_token  
25 -end  
26 -  
27 -Then /^I change my contact info$/ do  
28 - fill_in "user_skype", :with => "testskype"  
29 - fill_in "user_linkedin", :with => "testlinkedin"  
30 - fill_in "user_twitter", :with => "testtwitter"  
31 - click_button "Save"  
32 - @user.reload  
33 -end  
34 -  
35 -Then /^I should see new contact info$/ do  
36 - @user.skype.should == 'testskype'  
37 - @user.linkedin.should == 'testlinkedin'  
38 - @user.twitter.should == 'testtwitter'  
39 -end  
features/step_definitions/project/browse_code_steps.rb
@@ -1,38 +0,0 @@ @@ -1,38 +0,0 @@
1 -Then /^I should see files from repository$/ do  
2 - page.should have_content("app")  
3 - page.should have_content("History")  
4 - page.should have_content("Gemfile")  
5 -end  
6 -  
7 -Then /^I should see files from repository for "(.*?)"$/ do |arg1|  
8 - current_path.should == tree_project_ref_path(@project, arg1)  
9 - page.should have_content("app")  
10 - page.should have_content("History")  
11 - page.should have_content("Gemfile")  
12 -end  
13 -  
14 -Given /^I click on file from repo$/ do  
15 - click_link "Gemfile"  
16 -end  
17 -  
18 -Then /^I should see it content$/ do  
19 - page.should have_content("rubygems.org")  
20 -end  
21 -  
22 -Given /^I click on raw button$/ do  
23 - click_link "raw"  
24 -end  
25 -  
26 -Then /^I should see raw file content$/ do  
27 - page.source.should == ValidCommit::BLOB_FILE  
28 -end  
29 -  
30 -Given /^I click blame button$/ do  
31 - click_link "blame"  
32 -end  
33 -  
34 -Then /^I should see git file blame$/ do  
35 - page.should have_content("rubygems.org")  
36 - page.should have_content("Dmitriy Zaporozhets")  
37 - page.should have_content("bc3735004cb Moving to rails 3.2")  
38 -end  
features/step_definitions/project/project_commits_steps.rb
@@ -1,64 +0,0 @@ @@ -1,64 +0,0 @@
1 -Then /^I see project commits$/ do  
2 - current_path.should == project_commits_path(@project)  
3 -  
4 - commit = @project.commit  
5 - page.should have_content(@project.name)  
6 - page.should have_content(commit.message)  
7 - page.should have_content(commit.id.to_s[0..5])  
8 -end  
9 -  
10 -Given /^I click atom feed link$/ do  
11 - click_link "Feed"  
12 -end  
13 -  
14 -Then /^I see commits atom feed$/ do  
15 - commit = CommitDecorator.decorate(@project.commit)  
16 - page.response_headers['Content-Type'].should have_content("application/atom+xml")  
17 - page.body.should have_selector("title", :text => "Recent commits to #{@project.name}")  
18 - page.body.should have_selector("author email", :text => commit.author_email)  
19 - page.body.should have_selector("entry summary", :text => commit.description)  
20 -end  
21 -  
22 -Then /^I see commit info$/ do  
23 - page.should have_content ValidCommit::MESSAGE  
24 - page.should have_content "Showing 1 changed file"  
25 -end  
26 -  
27 -Given /^I fill compare fields with refs$/ do  
28 - fill_in "from", :with => "master"  
29 - fill_in "to", :with => "stable"  
30 - click_button "Compare"  
31 -end  
32 -  
33 -Given /^I see compared refs$/ do  
34 - page.should have_content "Commits (27)"  
35 - page.should have_content "Compare View"  
36 - page.should have_content "Showing 73 changed files"  
37 -end  
38 -  
39 -Then /^I should see "(.*?)" recent branches list$/ do |arg1|  
40 - page.should have_content("Branches")  
41 - page.should have_content("master")  
42 -end  
43 -  
44 -Then /^I should see "(.*?)" all branches list$/ do |arg1|  
45 - page.should have_content("Branches")  
46 - page.should have_content("master")  
47 -end  
48 -  
49 -Then /^I should see "(.*?)" all tags list$/ do |arg1|  
50 - page.should have_content("Tags")  
51 - page.should have_content("v1.2.1")  
52 -end  
53 -  
54 -Then /^I should see "(.*?)" protected branches list$/ do |arg1|  
55 - within "table" do  
56 - page.should have_content "stable"  
57 - page.should_not have_content "master"  
58 - end  
59 -end  
60 -  
61 -Given /^project "(.*?)" has protected branches$/ do |arg1|  
62 - project = Project.find_by_name(arg1)  
63 - project.protected_branches.create(:name => "stable")  
64 -end  
features/step_definitions/project/project_issues_steps.rb
@@ -1,81 +0,0 @@ @@ -1,81 +0,0 @@
1 -Given /^project "(.*?)" have "(.*?)" open issue$/ do |arg1, arg2|  
2 - project = Project.find_by_name(arg1)  
3 - Factory.create(:issue, :title => arg2, :project => project, :author => project.users.first)  
4 -end  
5 -  
6 -Given /^project "(.*?)" have "(.*?)" closed issue$/ do |arg1, arg2|  
7 - project = Project.find_by_name(arg1)  
8 - Factory.create(:issue, :title => arg2, :project => project, :author => project.users.first, :closed => true)  
9 -end  
10 -  
11 -Given /^I should see "(.*?)" in issues$/ do |arg1|  
12 - page.should have_content arg1  
13 -end  
14 -  
15 -Given /^I should not see "(.*?)" in issues$/ do |arg1|  
16 - page.should_not have_content arg1  
17 -end  
18 -  
19 -Then /^I should see issue "(.*?)"$/ do |arg1|  
20 - issue = Issue.find_by_title(arg1)  
21 - page.should have_content issue.title  
22 - page.should have_content issue.author_name  
23 - page.should have_content issue.project.name  
24 -end  
25 -  
26 -Given /^I submit new issue "(.*?)"$/ do |arg1|  
27 - fill_in "issue_title", with: arg1  
28 - click_button "Submit new issue"  
29 -end  
30 -  
31 -Given /^project "(.*?)" have issues tags:$/ do |arg1, table|  
32 - project = Project.find_by_name(arg1)  
33 - table.hashes.each do |hash|  
34 - Factory :issue,  
35 - project: project,  
36 - label_list: [hash[:name]]  
37 - end  
38 -end  
39 -  
40 -Given /^I visit project "(.*?)" labels page$/ do |arg1|  
41 - visit project_labels_path(Project.find_by_name(arg1))  
42 -end  
43 -  
44 -Then /^I should see label "(.*?)"$/ do |arg1|  
45 - within ".labels-table" do  
46 - page.should have_content arg1  
47 - end  
48 -end  
49 -  
50 -Given /^I fill in issue search with "(.*?)"$/ do |arg1|  
51 - # Because fill_in, with: "" triggers nothing  
52 - # we need to trigger a keyup event  
53 - if arg1 == ''  
54 - page.execute_script("$('.issue_search').val('').keyup();");  
55 - end  
56 - fill_in 'issue_search', with: arg1  
57 -end  
58 -  
59 -When /^I select milestone "(.*?)"$/ do |milestone_title|  
60 - select milestone_title, from: "milestone_id"  
61 -end  
62 -  
63 -Then /^I should see selected milestone with title "(.*?)"$/ do |milestone_title|  
64 - issues_milestone_selector = "#issue_milestone_id_chzn/a"  
65 - wait_until{ page.has_content?("Details") }  
66 - page.find(issues_milestone_selector).should have_content(milestone_title)  
67 -end  
68 -  
69 -When /^I select first assignee from "(.*?)" project$/ do |project_name|  
70 - project = Project.find_by_name project_name  
71 - first_assignee = project.users.first  
72 - select first_assignee.name, from: "assignee_id"  
73 -end  
74 -  
75 -Then /^I should see first assignee from "(.*?)" as selected assignee$/ do |project_name|  
76 - issues_assignee_selector = "#issue_assignee_id_chzn/a"  
77 - wait_until{ page.has_content?("Details") }  
78 - project = Project.find_by_name project_name  
79 - assignee_name = project.users.first.name  
80 - page.find(issues_assignee_selector).should have_content(assignee_name)  
81 -end  
features/step_definitions/project/project_merge_requests_steps.rb
@@ -1,38 +0,0 @@ @@ -1,38 +0,0 @@
1 -Given /^project "(.*?)" have "(.*?)" open merge request$/ do |arg1, arg2|  
2 - project = Project.find_by_name(arg1)  
3 - Factory.create(:merge_request, :title => arg2, :project => project, :author => project.users.first)  
4 -end  
5 -  
6 -Given /^project "(.*?)" have "(.*?)" closed merge request$/ do |arg1, arg2|  
7 - project = Project.find_by_name(arg1)  
8 - Factory.create(:merge_request, :title => arg2, :project => project, :author => project.users.first, :closed => true)  
9 -end  
10 -  
11 -Then /^I should see "(.*?)" in merge requests$/ do |arg1|  
12 - page.should have_content arg1  
13 -end  
14 -  
15 -Then /^I should not see "(.*?)" in merge requests$/ do |arg1|  
16 - page.should_not have_content arg1  
17 -end  
18 -  
19 -Then /^I should see merge request "(.*?)"$/ do |arg1|  
20 - merge_request = MergeRequest.find_by_title(arg1)  
21 - page.should have_content(merge_request.title[0..10])  
22 - page.should have_content(merge_request.target_branch)  
23 - page.should have_content(merge_request.source_branch)  
24 -end  
25 -  
26 -Given /^I submit new merge request "(.*?)"$/ do |arg1|  
27 - fill_in "merge_request_title", :with => arg1  
28 - select "master", :from => "merge_request_source_branch"  
29 - select "stable", :from => "merge_request_target_branch"  
30 - click_button "Save"  
31 -end  
32 -  
33 -Then /^I should see closed merge request "(.*?)"$/ do |arg1|  
34 - mr = MergeRequest.find_by_title(arg1)  
35 - mr.closed.should be_true  
36 - page.should have_content "Closed by"  
37 -end  
38 -  
features/step_definitions/project/project_milestones_steps.rb
@@ -1,33 +0,0 @@ @@ -1,33 +0,0 @@
1 -Given /^project "(.*?)" has milestone "(.*?)"$/ do |arg1, arg2|  
2 - project = Project.find_by_name(arg1)  
3 -  
4 - milestone = Factory :milestone,  
5 - :title => arg2,  
6 - :project => project  
7 -  
8 - 3.times do |i|  
9 - issue = Factory :issue,  
10 - :project => project,  
11 - :milestone => milestone  
12 - end  
13 -end  
14 -  
15 -Then /^I should see active milestones$/ do  
16 - milestone = @project.milestones.first  
17 - page.should have_content(milestone.title[0..10])  
18 - page.should have_content(milestone.expires_at)  
19 - page.should have_content("Browse Issues")  
20 -end  
21 -  
22 -Then /^I should see milestone "(.*?)"$/ do |arg1|  
23 - milestone = @project.milestones.find_by_title(arg1)  
24 - page.should have_content(milestone.title[0..10])  
25 - page.should have_content(milestone.expires_at)  
26 - page.should have_content("Browse Issues")  
27 -end  
28 -  
29 -Given /^I submit new milestone "(.*?)"$/ do |arg1|  
30 - fill_in "milestone_title", :with => arg1  
31 - click_button "Create milestone"  
32 -end  
33 -  
features/step_definitions/project/project_team_steps.rb
@@ -1,55 +0,0 @@ @@ -1,55 +0,0 @@
1 -Given /^gitlab user "(.*?)"$/ do |arg1|  
2 - Factory :user, :name => arg1  
3 -end  
4 -  
5 -Given /^"(.*?)" is "(.*?)" developer$/ do |arg1, arg2|  
6 - user = User.find_by_name(arg1)  
7 - project = Project.find_by_name(arg2)  
8 - project.add_access(user, :write)  
9 -end  
10 -  
11 -Then /^I should be able to see myself in team$/ do  
12 - page.should have_content(@user.name)  
13 - page.should have_content(@user.email)  
14 -end  
15 -  
16 -Then /^I should see "(.*?)" in team list$/ do |arg1|  
17 - user = User.find_by_name(arg1)  
18 - page.should have_content(user.name)  
19 - page.should have_content(user.email)  
20 -end  
21 -  
22 -Given /^I select "(.*?)" as "(.*?)"$/ do |arg1, arg2|  
23 - user = User.find_by_name(arg1)  
24 - within "#new_team_member" do  
25 - select user.name, :from => "user_ids"  
26 - select arg2, :from => "project_access"  
27 - end  
28 - click_button "Save"  
29 -end  
30 -  
31 -Then /^I should see "(.*?)" in team list as "(.*?)"$/ do |arg1, arg2|  
32 - user = User.find_by_name(arg1)  
33 - role_id = find(".user_#{user.id} #team_member_project_access").value  
34 - role_id.should == UsersProject.access_roles[arg2].to_s  
35 -end  
36 -  
37 -Given /^I change "(.*?)" role to "(.*?)"$/ do |arg1, arg2|  
38 - user = User.find_by_name(arg1)  
39 - within ".user_#{user.id}" do  
40 - select arg2, :from => "team_member_project_access"  
41 - end  
42 -end  
43 -  
44 -Then /^I should see "(.*?)" team profile$/ do |arg1|  
45 - user = User.find_by_name(arg1)  
46 - page.should have_content(user.name)  
47 - page.should have_content(user.email)  
48 - page.should have_content("To team list")  
49 -end  
50 -  
51 -Then /^I should not see "(.*?)" in team list$/ do |arg1|  
52 - user = User.find_by_name(arg1)  
53 - page.should_not have_content(user.name)  
54 - page.should_not have_content(user.email)  
55 -end  
features/step_definitions/project/project_wiki_steps.rb
@@ -1,14 +0,0 @@ @@ -1,14 +0,0 @@
1 -Given /^I create Wiki page$/ do  
2 - fill_in "Title", :with => 'Test title'  
3 - fill_in "Content", :with => '[link test](test)'  
4 - click_on "Save"  
5 -end  
6 -  
7 -Then /^I should see newly created wiki page$/ do  
8 - page.should have_content("Test title")  
9 - page.should have_content("link test")  
10 -  
11 - click_link "link test"  
12 -  
13 - page.should have_content("Editing page")  
14 -end  
features/step_definitions/project/projects_steps.rb
@@ -1,77 +0,0 @@ @@ -1,77 +0,0 @@
1 -When /^I visit new project page$/ do  
2 - visit new_project_path  
3 -end  
4 -  
5 -When /^fill project form with valid data$/ do  
6 - fill_in 'project_name', :with => 'NewProject'  
7 - fill_in 'project_code', :with => 'NPR'  
8 - fill_in 'project_path', :with => 'newproject'  
9 - click_button "Create project"  
10 -end  
11 -  
12 -Then /^I should see project page$/ do  
13 - current_path.should == project_path(Project.last)  
14 - page.should have_content('NewProject')  
15 -end  
16 -  
17 -Then /^I should see empty project instuctions$/ do  
18 - page.should have_content("git init")  
19 - page.should have_content("git remote")  
20 - page.should have_content(Project.last.url_to_repo)  
21 -end  
22 -  
23 -Given /^I own project "(.*?)"$/ do |arg1|  
24 - @project = Factory :project, :name => arg1  
25 - @project.add_access(@user, :admin)  
26 -end  
27 -  
28 -Given /^I visit project "(.*?)" wall page$/ do |arg1|  
29 - project = Project.find_by_name(arg1)  
30 - visit wall_project_path(project)  
31 -end  
32 -  
33 -Then /^I should see project wall note "(.*?)"$/ do |arg1|  
34 - page.should have_content arg1  
35 -end  
36 -  
37 -Given /^project "(.*?)" has comment "(.*?)"$/ do |arg1, arg2|  
38 - project = Project.find_by_name(arg1)  
39 - project.notes.create(:note => arg1, :author => project.users.first)  
40 -end  
41 -  
42 -Given /^I write new comment "(.*?)"$/ do |arg1|  
43 - fill_in "note_note", :with => arg1  
44 - click_button "Add Comment"  
45 -end  
46 -  
47 -Given /^I visit project "(.*?)" page$/ do |arg1|  
48 - project = Project.find_by_name(arg1)  
49 - visit project_path(project)  
50 -end  
51 -  
52 -Given /^I visit project "(.*?)" network page$/ do |arg1|  
53 - project = Project.find_by_name(arg1)  
54 -  
55 - # Stub out find_all to speed this up (10 commits vs. 650)  
56 - commits = Grit::Commit.find_all(project.repo, nil, {max_count: 10})  
57 - Grit::Commit.stub(:find_all).and_return(commits)  
58 -  
59 - visit graph_project_path(project)  
60 -end  
61 -  
62 -Given /^page should have network graph$/ do  
63 - page.should have_content "Project Network Graph"  
64 - within ".graph" do  
65 - page.should have_content "master"  
66 - page.should have_content "scss_refactor..."  
67 - end  
68 -end  
69 -  
70 -Given /^I leave a comment like "(.*?)"$/ do |arg1|  
71 - fill_in "note_note", :with => arg1  
72 - click_button "Add Comment"  
73 -end  
74 -  
75 -Then /^I should see comment "(.*?)"$/ do |arg1|  
76 - page.should have_content(arg1)  
77 -end  
features/step_definitions/visit_steps.rb
@@ -1,91 +0,0 @@ @@ -1,91 +0,0 @@
1 -Given /^I visit project "(.*?)" issues page$/ do |arg1|  
2 - visit project_issues_path(Project.find_by_name(arg1))  
3 -end  
4 -  
5 -Given /^I visit issue page "(.*?)"$/ do |arg1|  
6 - issue = Issue.find_by_title(arg1)  
7 - visit project_issue_path(issue.project, issue)  
8 -end  
9 -  
10 -Given /^I visit project "(.*?)" merge requests page$/ do |arg1|  
11 - visit project_merge_requests_path(Project.find_by_name(arg1))  
12 -end  
13 -  
14 -Given /^I visit merge request page "(.*?)"$/ do |arg1|  
15 - mr = MergeRequest.find_by_title(arg1)  
16 - visit project_merge_request_path(mr.project, mr)  
17 -end  
18 -  
19 -Given /^I visit project "(.*?)" milestones page$/ do |arg1|  
20 - @project = Project.find_by_name(arg1)  
21 - visit project_milestones_path(@project)  
22 -end  
23 -  
24 -Given /^I visit project commits page$/ do  
25 - visit project_commits_path(@project)  
26 -end  
27 -  
28 -Given /^I visit compare refs page$/ do  
29 - visit compare_project_commits_path(@project)  
30 -end  
31 -  
32 -Given /^I visit project branches page$/ do  
33 - visit branches_project_repository_path(@project)  
34 -end  
35 -  
36 -Given /^I visit project commit page$/ do  
37 - visit project_commit_path(@project, ValidCommit::ID)  
38 -end  
39 -  
40 -Given /^I visit project tags page$/ do  
41 - visit tags_project_repository_path(@project)  
42 -end  
43 -  
44 -Given /^I click on commit link$/ do  
45 - visit project_commit_path(@project, ValidCommit::ID)  
46 -end  
47 -  
48 -Given /^I visit project source page$/ do  
49 - visit tree_project_ref_path(@project, @project.root_ref)  
50 -end  
51 -  
52 -Given /^I visit project source page for "(.*?)"$/ do |arg1|  
53 - visit tree_project_ref_path(@project, arg1)  
54 -end  
55 -  
56 -Given /^I visit blob file from repo$/ do  
57 - visit tree_project_ref_path(@project, ValidCommit::ID, :path => ValidCommit::BLOB_FILE_PATH)  
58 -end  
59 -  
60 -Given /^I visit project "(.*?)" team page$/ do |arg1|  
61 - visit team_project_path(Project.find_by_name(arg1))  
62 -end  
63 -  
64 -Given /^I visit project wiki page$/ do  
65 - visit project_wiki_path(@project, :index)  
66 -end  
67 -  
68 -Given /^I visit profile page$/ do  
69 - visit profile_path  
70 -end  
71 -  
72 -Given /^I visit profile token page$/ do  
73 - visit profile_token_path  
74 -end  
75 -  
76 -Given /^I visit profile password page$/ do  
77 - visit profile_password_path  
78 -end  
79 -  
80 -Given /^I visit dashboard page$/ do  
81 - visit dashboard_path  
82 -end  
83 -  
84 -Given /^I visit dashboard issues page$/ do  
85 - visit dashboard_issues_path  
86 -end  
87 -  
88 -Given /^I visit dashboard merge requests page$/ do  
89 - visit dashboard_merge_requests_path  
90 -end  
91 -