Comments cucumber. More refactoring. Cucumber -> branches, tags

This commit is contained in:
Dmitriy Zaporozhets 2012-08-03 19:59:55 +03:00 committed by randx
parent 1281c122c7
commit 9844ddd43f
16 changed files with 80 additions and 192 deletions

View file

@ -59,3 +59,30 @@ 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")
end
Then /^I should see "(.*?)" all branches list$/ do |arg1|
page.should have_content("Branches")
page.should have_content("master")
end
Then /^I should see "(.*?)" all tags list$/ do |arg1|
page.should have_content("Tags")
page.should have_content("v1.2.1")
end
Then /^I should see "(.*?)" protected branches list$/ do |arg1|
within "table" do
page.should have_content "stable"
page.should_not have_content "master"
end
end
Given /^project "(.*?)" has protected branches$/ do |arg1|
project = Project.find_by_name(arg1)
project.protected_branches.create(:name => "stable")
end

View file

@ -32,15 +32,6 @@ Given /^I visit issue page "(.*?)"$/ do |arg1|
visit project_issue_path(issue.project, issue)
end
Given /^I leave a comment like "(.*?)"$/ do |arg1|
fill_in "note_note", :with => arg1
click_button "Add Comment"
end
Then /^I should see commetn "(.*?)"$/ do |arg1|
page.should have_content(arg1)
end
Given /^I submit new issue "(.*?)"$/ do |arg1|
fill_in "issue_title", :with => arg1
click_button "Submit new issue"

View file

@ -50,6 +50,11 @@ Given /^I write new comment "(.*?)"$/ do |arg1|
click_button "Add Comment"
end
Given /^I visit project "(.*?)" page$/ do |arg1|
project = Project.find_by_name(arg1)
visit project_path(project)
end
Given /^I visit project "(.*?)" network page$/ do |arg1|
project = Project.find_by_name(arg1)
visit graph_project_path(project)
@ -66,3 +71,12 @@ Given /^page should have network graph$/ do
page.should have_content "notes_refacto..."
end
end
Given /^I leave a comment like "(.*?)"$/ do |arg1|
fill_in "note_note", :with => arg1
click_button "Add Comment"
end
Then /^I should see comment "(.*?)"$/ do |arg1|
page.should have_content(arg1)
end