summaryrefslogtreecommitdiff
path: root/features
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2015-02-04 22:57:41 +0000
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2015-02-04 22:57:41 +0000
commit986c5b6f879d4780aabedd07cdac183f1afebc01 (patch)
tree8bfe7549433e6adbe3ac52c28bb65cabdf8f6363 /features
parentfc13ea713751d853693396aa77b51bbaa71c015b (diff)
parent96a648ded25a46335302a7fa392cddfd2e3f4acb (diff)
downloadgitlab-ce-986c5b6f879d4780aabedd07cdac183f1afebc01.tar.gz
Merge branch 'foo-barred' into 'master'
Fix the intermittently failing "Bar" search tests. Over the past several months we've come to calling them the foobarred tests. We've seen them fail on our jenkins server, and on the GitLab semaphore tests. In this merge request I scope the test checks for the foo barred tests to check within the .search-results div. Fixes #567 See merge request !258
Diffstat (limited to 'features')
-rw-r--r--features/search.feature16
-rw-r--r--features/steps/search.rb8
2 files changed, 12 insertions, 12 deletions
diff --git a/features/search.feature b/features/search.feature
index 54708c17575..def21e00923 100644
--- a/features/search.feature
+++ b/features/search.feature
@@ -13,15 +13,15 @@ Feature: Search
And project has issues
When I search for "Foo"
And I click "Issues" link
- Then I should see "Foo" link
- And I should not see "Bar" 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 merge requests I am looking for
And project has merge requests
When I search for "Foo"
When I click "Merge requests" link
- Then I should see "Foo" link
- And I should not see "Bar" 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
@@ -33,14 +33,14 @@ Feature: Search
When I click project "Shop" link
And I search for "Foo"
And I click "Issues" link
- Then I should see "Foo" link
- And I should not see "Bar" 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 merge requests
And project has merge requests
When I click project "Shop" link
And I search for "Foo"
And I click "Merge requests" link
- Then I should see "Foo" link
- And I should not see "Bar" link
+ Then I should see "Foo" link in the search results
+ And I should not see "Bar" link in the search results
diff --git a/features/steps/search.rb b/features/steps/search.rb
index f3d8bd80f13..6f0e038c4d6 100644
--- a/features/steps/search.rb
+++ b/features/steps/search.rb
@@ -59,11 +59,11 @@ class Spinach::Features::Search < Spinach::FeatureSteps
create(:merge_request, :simple, title: "Bar", source_project: project, target_project: project)
end
- step 'I should see "Foo" link' do
- page.should have_link "Foo"
+ step 'I should see "Foo" link in the search results' do
+ find(:css, '.search-results').should have_link 'Foo'
end
- step 'I should not see "Bar" link' do
- page.should_not have_link "Bar"
+ step 'I should not see "Bar" link in the search results' do
+ find(:css, '.search-results').should_not have_link 'Bar'
end
end