2012-06-15 06:15:28 +02:00
|
|
|
Then /^I see project commits$/ do
|
|
|
|
current_path.should == project_commits_path(@project)
|
|
|
|
|
|
|
|
commit = @project.commit
|
|
|
|
page.should have_content(@project.name)
|
|
|
|
page.should have_content(commit.message)
|
|
|
|
page.should have_content(commit.id.to_s[0..5])
|
|
|
|
end
|
|
|
|
|
|
|
|
Given /^I click atom feed link$/ do
|
|
|
|
click_link "Feed"
|
|
|
|
end
|
|
|
|
|
|
|
|
Then /^I see commits atom feed$/ do
|
2012-07-25 21:08:47 +02:00
|
|
|
commit = CommitDecorator.decorate(@project.commit)
|
2012-06-15 06:15:28 +02:00
|
|
|
page.response_headers['Content-Type'].should have_content("application/atom+xml")
|
|
|
|
page.body.should have_selector("title", :text => "Recent commits to #{@project.name}")
|
|
|
|
page.body.should have_selector("author email", :text => commit.author_email)
|
2012-07-25 21:08:47 +02:00
|
|
|
page.body.should have_selector("entry summary", :text => commit.description)
|
2012-06-15 06:15:28 +02:00
|
|
|
end
|
|
|
|
|
|
|
|
Then /^I see commit info$/ do
|
|
|
|
page.should have_content ValidCommit::MESSAGE
|
|
|
|
page.should have_content "Showing 1 changed file"
|
|
|
|
end
|
|
|
|
|
|
|
|
Given /^I fill compare fields with refs$/ do
|
|
|
|
fill_in "from", :with => "master"
|
|
|
|
fill_in "to", :with => "stable"
|
|
|
|
click_button "Compare"
|
|
|
|
end
|
|
|
|
|
|
|
|
Given /^I see compared refs$/ do
|
|
|
|
page.should have_content "Commits (27)"
|
|
|
|
page.should have_content "Compare View"
|
|
|
|
page.should have_content "Showing 73 changed files"
|
|
|
|
end
|
|
|
|
|
2012-08-03 18:59:55 +02:00
|
|
|
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|
|
2012-09-06 08:15:51 +02:00
|
|
|
within "table" do
|
2012-08-03 18:59:55 +02:00
|
|
|
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
|