Commit b1be377f authored by Robert Speicher's avatar Robert Speicher

Add Spinach feature for Commit breadcrumbs

parent badb092a
......@@ -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
......@@ -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
......@@ -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)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment