EBernhardson has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/341950 )

Change subject: Make waffle squash test a little less specific
......................................................................

Make waffle squash test a little less specific

Cindy was running into problems where this waffle squash result
was in the reverse order expected. The order doesn't seem important
for this test, so accept the result in position 1 or 2.

Change-Id: I1f6c30b40254f8af4f0b871de8aa5f0091e0b185
---
M tests/browser/features/full_text_browser.feature
M tests/browser/features/step_definitions/search_steps.rb
2 files changed, 8 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CirrusSearch 
refs/changes/50/341950/1

diff --git a/tests/browser/features/full_text_browser.feature 
b/tests/browser/features/full_text_browser.feature
index 8d4ec12..f0d17a1 100644
--- a/tests/browser/features/full_text_browser.feature
+++ b/tests/browser/features/full_text_browser.feature
@@ -86,7 +86,7 @@
   Scenario: Text separated by a <br> tag is not jammed together
     Given a page named Waffle Squash exists with contents @wafflesquash.txt
       And a page named Waffle Squash 2 exists with contents waffle<br>squash
-      And within 20 seconds searching for Waffle Squash yields Waffle Squash 
as the first result
+      And within 20 seconds searching for Waffle Squash yields Waffle Squash 
within the results
       And within 20 seconds searching for Waffle Squash 2 yields Waffle Squash 
2 as the first result
     When I search for wafflesquash
     Then there are no search results
diff --git a/tests/browser/features/step_definitions/search_steps.rb 
b/tests/browser/features/step_definitions/search_steps.rb
index 9e16a59..31fe383 100644
--- a/tests/browser/features/step_definitions/search_steps.rb
+++ b/tests/browser/features/step_definitions/search_steps.rb
@@ -465,6 +465,13 @@
     @api_result["search"].length.should == results.to_i
   end
 end
+Then(/^within (\d+) seconds searching for (.*) yields (.*) within the 
results$/) do |seconds, term, title|
+    within(seconds) do
+        step("I search for " + term)
+        step(title + " is the first or second search result")
+    end
+end
+
 Then(/^within (\d+) seconds searching for (.*) yields (.*) as the first 
result$/) do |seconds, term, title|
   within(seconds) do
     step("I search for " + term)

-- 
To view, visit https://gerrit.wikimedia.org/r/341950
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I1f6c30b40254f8af4f0b871de8aa5f0091e0b185
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CirrusSearch
Gerrit-Branch: es5
Gerrit-Owner: EBernhardson <ebernhard...@wikimedia.org>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to