diff options
author | Robert Speicher <rspeicher@gmail.com> | 2012-11-01 17:57:44 -0400 |
---|---|---|
committer | Robert Speicher <rspeicher@gmail.com> | 2012-11-01 17:57:44 -0400 |
commit | b1be377fb0b5e76fc1b0d78700eb3e714b66f1c2 (patch) | |
tree | e60507d653be8c3597213455f828218385b7c23a /features | |
parent | badb092a2d7e90ccf5358f1e8e6af9c9592351c4 (diff) | |
download | gitlab-ce-b1be377fb0b5e76fc1b0d78700eb3e714b66f1c2.tar.gz |
Add Spinach feature for Commit breadcrumbs
Diffstat (limited to 'features')
-rw-r--r-- | features/project/commits/commits.feature | 4 | ||||
-rw-r--r-- | features/steps/project/project_browse_commits.rb | 9 | ||||
-rw-r--r-- | features/steps/shared/paths.rb | 4 |
3 files changed, 17 insertions, 0 deletions
diff --git a/features/project/commits/commits.feature b/features/project/commits/commits.feature index df795ef71e6..f5a11048b2a 100644 --- a/features/project/commits/commits.feature +++ b/features/project/commits/commits.feature @@ -19,3 +19,7 @@ Feature: Project Browse commits Given I visit compare refs page And I fill compare fields with refs Then I see compared refs + + Scenario: I browse commits for a specific path + Given I visit my project's commits page for a specific path + Then I see breadcrumb links diff --git a/features/steps/project/project_browse_commits.rb b/features/steps/project/project_browse_commits.rb index cb5cabe98b3..036b6297337 100644 --- a/features/steps/project/project_browse_commits.rb +++ b/features/steps/project/project_browse_commits.rb @@ -42,4 +42,13 @@ class ProjectBrowseCommits < Spinach::FeatureSteps page.should have_content "Commits (1)" page.should have_content "Showing 2 changed files" end + + Then 'I see breadcrumb links' do + page.should have_selector('ul.breadcrumb') + page.should have_selector('ul.breadcrumb span.divider', count: 3) + page.should have_selector('ul.breadcrumb a', count: 4) + + find('ul.breadcrumb li:first a')['href'].should match(/#{@project.path}\/commits\/master\z/) + find('ul.breadcrumb li:last a')['href'].should match(%r{master/app/models/project\.rb\z}) + end end diff --git a/features/steps/shared/paths.rb b/features/steps/shared/paths.rb index 21936f19f47..5ce419d395d 100644 --- a/features/steps/shared/paths.rb +++ b/features/steps/shared/paths.rb @@ -121,6 +121,10 @@ module SharedPaths visit project_commits_path(@project, @project.root_ref, {limit: 5}) end + Given "I visit my project's commits page for a specific path" do + visit project_commits_path(@project, @project.root_ref + "/app/models/project.rb", {limit: 5}) + end + Given "I visit my project's network page" do # Stub GraphCommit max_size to speed up test (10 commits vs. 650) Gitlab::GraphCommit.stub(max_count: 10) |