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
This commit is contained in:
Dmitriy Zaporozhets 2015-02-04 22:57:41 +00:00
commit 986c5b6f87
2 changed files with 12 additions and 12 deletions

View file

@ -13,15 +13,15 @@ Feature: Search
And project has issues And project has issues
When I search for "Foo" When I search for "Foo"
And I click "Issues" link And I click "Issues" link
Then I should see "Foo" link Then I should see "Foo" link in the search results
And I should not see "Bar" link And I should not see "Bar" link in the search results
Scenario: I should see merge requests I am looking for Scenario: I should see merge requests I am looking for
And project has merge requests And project has merge requests
When I search for "Foo" When I search for "Foo"
When I click "Merge requests" link When I click "Merge requests" link
Then I should see "Foo" link Then I should see "Foo" link in the search results
And I should not see "Bar" link And I should not see "Bar" link in the search results
Scenario: I should see project code I am looking for Scenario: I should see project code I am looking for
When I click project "Shop" link When I click project "Shop" link
@ -33,14 +33,14 @@ Feature: Search
When I click project "Shop" link When I click project "Shop" link
And I search for "Foo" And I search for "Foo"
And I click "Issues" link And I click "Issues" link
Then I should see "Foo" link Then I should see "Foo" link in the search results
And I should not see "Bar" link And I should not see "Bar" link in the search results
Scenario: I should see project merge requests Scenario: I should see project merge requests
And project has merge requests And project has merge requests
When I click project "Shop" link When I click project "Shop" link
And I search for "Foo" And I search for "Foo"
And I click "Merge requests" link And I click "Merge requests" link
Then I should see "Foo" link Then I should see "Foo" link in the search results
And I should not see "Bar" link And I should not see "Bar" link in the search results

View file

@ -59,11 +59,11 @@ class Spinach::Features::Search < Spinach::FeatureSteps
create(:merge_request, :simple, title: "Bar", source_project: project, target_project: project) create(:merge_request, :simple, title: "Bar", source_project: project, target_project: project)
end end
step 'I should see "Foo" link' do step 'I should see "Foo" link in the search results' do
page.should have_link "Foo" find(:css, '.search-results').should have_link 'Foo'
end end
step 'I should not see "Bar" link' do step 'I should not see "Bar" link in the search results' do
page.should_not have_link "Bar" find(:css, '.search-results').should_not have_link 'Bar'
end end
end end