diff options
Diffstat (limited to 'features/steps/shared/paths.rb')
-rw-r--r-- | features/steps/shared/paths.rb | 48 |
1 files changed, 46 insertions, 2 deletions
diff --git a/features/steps/shared/paths.rb b/features/steps/shared/paths.rb index bb35b8b0f8a..a1a8efd677a 100644 --- a/features/steps/shared/paths.rb +++ b/features/steps/shared/paths.rb @@ -1,6 +1,10 @@ module SharedPaths include Spinach::DSL + When 'I visit new project page' do + visit new_project_path + end + # ---------------------------------------- # Dashboard # ---------------------------------------- @@ -81,10 +85,50 @@ module SharedPaths visit admin_resque_path end - When 'I visit new project page' do - visit new_project_path + # ---------------------------------------- + # Generic Project + # ---------------------------------------- + + Given "I visit my project's home page" do + visit project_path(@project) + end + + Given "I visit my project's files page" do + visit project_tree_path(@project, @project.root_ref) + end + + Given "I visit my project's commits page" do + visit project_commits_path(@project, @project.root_ref, {limit: 5}) end + Given "I visit my project's network page" do + # Stub out find_all to speed this up (10 commits vs. 650) + commits = Grit::Commit.find_all(@project.repo, nil, {max_count: 10}) + Grit::Commit.stub(:find_all).and_return(commits) + + visit graph_project_path(@project) + end + + Given "I visit my project's issues page" do + visit project_issues_path(@project) + end + + Given "I visit my project's merge requests page" do + visit project_merge_requests_path(@project) + end + + Given "I visit my project's wall page" do + visit wall_project_path(@project) + end + + Given "I visit my project's wiki page" do + visit project_wiki_path(@project, :index) + end + + # ---------------------------------------- + # "Shop" Project + # ---------------------------------------- + And 'I visit project "Shop" page' do project = Project.find_by_name("Shop") visit project_path(project) |