diff options
author | Dmitriy Zaporozhets <dzaporozhets@sphereconsultinginc.com> | 2012-08-03 20:49:54 +0400 |
---|---|---|
committer | Dmitriy Zaporozhets <dzaporozhets@sphereconsultinginc.com> | 2012-08-03 20:49:54 +0400 |
commit | 1281c122c7a4edf2873aad13c22ea09ce6dc57c3 (patch) | |
tree | 12bfd6b27c27919787d65f0a93551e652a894915 /features/step_definitions/project/browse_code_steps.rb | |
parent | b846ac10597d832bd4b03ee65a026fcf4f9480f2 (diff) |
Issues cucumber. refactored step_definitoons
Diffstat (limited to 'features/step_definitions/project/browse_code_steps.rb')
-rw-r--r-- | features/step_definitions/project/browse_code_steps.rb | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/features/step_definitions/project/browse_code_steps.rb b/features/step_definitions/project/browse_code_steps.rb new file mode 100644 index 00000000000..7f9001bb989 --- /dev/null +++ b/features/step_definitions/project/browse_code_steps.rb @@ -0,0 +1,50 @@ +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") + page.should have_content("History") + page.should have_content("Gemfile") +end + +Given /^I click on file from repo$/ do + click_link "Gemfile" +end + +Then /^I should see it content$/ do + page.should have_content("rubygems.org") +end + +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 + +Given /^I click blame button$/ do + click_link "blame" +end + +Then /^I should see git file blame$/ do + page.should have_content("rubygems.org") + page.should have_content("Dmitriy Zaporozhets") + page.should have_content("bc3735004cb Moving to rails 3.2") +end |