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

Change subject: Copy geosearch.feature to nodejs
......................................................................

Copy geosearch.feature to nodejs

just works out of the box with GeoData enabled

Change-Id: Ie209ebee11736a9d550b6c63501a4d53d8362241
---
A tests/integration/features/geosearch.feature
1 file changed, 58 insertions(+), 0 deletions(-)


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

diff --git a/tests/integration/features/geosearch.feature 
b/tests/integration/features/geosearch.feature
new file mode 100644
index 0000000..45ccc65
--- /dev/null
+++ b/tests/integration/features/geosearch.feature
@@ -0,0 +1,58 @@
+#*  neartitle:Shanghai
+#*  neartitle:50km,Seoul
+#*  nearcoord:1.2345,-5.4321
+#*  nearcoord:17km,54.321,-12.345
+#*  boost-neartitle:"San Francisco"
+#*  boost-neartitle:50km,Kampala
+#*  boost-nearcoord:-12.345,87.654
+#*  boost-nearcoord:77km,34.567,76.543
+
+@clean @api @geo
+Feature: Geographical searches
+  Scenario: neartitle: with title
+    When I api search for neartitle:10km,San_Jose
+    Then Santa Clara is the first api search result
+
+  Scenario: neartitle: with title and default radius
+    When I api search for neartitle:Cupertino
+    Then there are no api search results
+
+  Scenario Outline: nearcoord: with coordinate
+    When I api search for nearcoord:<coordinate>
+    Then <city> is the first api search result
+  Examples:
+    | coordinate           | city        |
+    |37.333333,-121.9      | San Jose    |
+    |37.354444,-121.969167 | Santa Clara |
+    |37.3175,-122.041944   | Cupertino   |
+
+  Scenario Outline: nearcoord: with coordinate and radius
+    When I api search for nearcoord:10km,<coordinate>
+    Then there are <count> api search results
+    Examples:
+      | coordinate           | count |
+      |37.333333,-121.9      | 2     |
+      |37.354444,-121.969167 | 3     |
+      |37.3175,-122.041944   | 2     |
+
+
+  Scenario Outline: Title proximity boost
+    When I api search for boost-neartitle:<distance>km,Cupertino nice city
+    Then Cupertino is the first api search result
+    And there are 3 api search results
+  Examples:
+    | distance |
+    | 1        |
+    | 5        |
+    | 10       |
+    | 100      |
+
+  Scenario Outline: Coordinate proximity boost
+    When I api search for boost-nearcoord:<coordinate> nice city
+    Then <city> is the first api search result
+    And there are 3 api search results
+    Examples:
+      | coordinate           | city        |
+      |37.333333,-121.9      | San Jose    |
+      |37.354444,-121.969167 | Santa Clara |
+      |37.3175,-122.041944   | Cupertino   |

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie209ebee11736a9d550b6c63501a4d53d8362241
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CirrusSearch
Gerrit-Branch: master
Gerrit-Owner: DCausse <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to