summaryrefslogtreecommitdiff
path: root/features
diff options
context:
space:
mode:
Diffstat (limited to 'features')
-rw-r--r--features/search.feature15
-rw-r--r--features/steps/search.rb11
2 files changed, 26 insertions, 0 deletions
diff --git a/features/search.feature b/features/search.feature
index 1608e824671..a9234c1a611 100644
--- a/features/search.feature
+++ b/features/search.feature
@@ -23,6 +23,13 @@ Feature: Search
Then I should see "Foo" link in the search results
And I should not see "Bar" link in the search results
+ Scenario: I should see milestones I am looking for
+ And project has milestones
+ When I search for "Foo"
+ When I click "Milestones" link
+ Then I should see "Foo" link in the search results
+ And I should not see "Bar" link in the search results
+
Scenario: I should see project code I am looking for
When I click project "Shop" link
And I search for "rspec"
@@ -44,6 +51,14 @@ Feature: Search
Then I should see "Foo" link in the search results
And I should not see "Bar" link in the search results
+ Scenario: I should see project milestones
+ And project has milestones
+ When I click project "Shop" link
+ And I search for "Foo"
+ And I click "Milestones" link
+ Then I should see "Foo" link in the search results
+ And I should not see "Bar" link in the search results
+
Scenario: I should see Wiki blobs
And project has Wiki content
When I click project "Shop" link
diff --git a/features/steps/search.rb b/features/steps/search.rb
index 87893aa0205..79273cbad9a 100644
--- a/features/steps/search.rb
+++ b/features/steps/search.rb
@@ -41,6 +41,12 @@ class Spinach::Features::Search < Spinach::FeatureSteps
end
end
+ step 'I click "Milestones" link' do
+ page.within '.search-filter' do
+ click_link 'Milestones'
+ end
+ end
+
step 'I click "Wiki" link' do
page.within '.search-filter' do
click_link 'Wiki'
@@ -72,6 +78,11 @@ class Spinach::Features::Search < Spinach::FeatureSteps
create(:merge_request, :simple, title: "Bar", source_project: project, target_project: project)
end
+ step 'project has milestones' do
+ create(:milestone, title: "Foo", project: project)
+ create(:milestone, title: "Bar", project: project)
+ end
+
step 'I should see "Foo" link in the search results' do
page.within('.results') do
find(:css, '.search-results').should have_link 'Foo'