[MediaWiki-commits] [Gerrit] Convert go feature to api tests - change (mediawiki...CirrusSearch)

2015-05-06 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Convert go feature to api tests
..


Convert go feature to api tests

This also requires the nearmatch api changes to core in I7153262.

Change-Id: Ie0a6e8b3b95b56dc9457fc9efe290950d3837a8b
---
R tests/browser/features/go_api.feature
A tests/browser/features/go_browser.feature
M tests/browser/features/prefix_search_api.feature
M tests/browser/features/step_definitions/search_steps.rb
4 files changed, 42 insertions(+), 34 deletions(-)

Approvals:
  Manybubbles: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/tests/browser/features/go.feature 
b/tests/browser/features/go_api.feature
similarity index 61%
rename from tests/browser/features/go.feature
rename to tests/browser/features/go_api.feature
index 75d16b7..51f3ffb 100644
--- a/tests/browser/features/go.feature
+++ b/tests/browser/features/go_api.feature
@@ -1,41 +1,36 @@
-@clean @go @phantomjs
+@clean @go @api
 Feature: Go Search
   Scenario: I can go to a page with mixed capital and lower case name by the 
name all lower cased
-When I go search for mixedcapsandlowercase
-Then I am on a page titled MixedCapsAndLowerCase
+When I get api near matches for mixedcapsandlowercase
+Then MixedCapsAndLowerCase is the first api search result
 
   Scenario: I can go to a page with mixed capital and lower case name by the 
name with totally wrong case cased
-When I go search for miXEdcapsandlowercASe
-Then I am on a page titled MixedCapsAndLowerCase
+When I get api near matches for miXEdcapsandlowercASe
+Then MixedCapsAndLowerCase is the first api search result
 
   Scenario: I can go to a page with an accented character without the accent
-When I go search for africa
-Then I am on a page titled África
+When I get api near matches for africa
+Then África is the first api search result
 
   @accented_namespace
   Scenario: I can go to a page in a namespace with an accented character 
without the accent
-When I go search for mo:test
-Then I am on a page titled Mó:Test
+When I get api near matches for mo:test
+Then Mó:Test is the first api search result
 
   @accented_namespace
   Scenario: When I go to a page with the namespace specified twice I end up 
on the search results page
-When I go search for file:mo:test
-Then I am on a page titled Search results
+When I get api near matches for file:mo:test
+Then there are no api search results
 
   @from_core
   Scenario: I can go to a page with mixed capital and lower case name by the 
name all lower cased and quoted
-When I go search for mixedcapsandlowercase
-Then I am on a page titled MixedCapsAndLowerCase
-
-  @from_core
-  Scenario: I can go to a user's page whether it is there or not
-When I go search for User:DoesntExist
-Then I am on a page titled User:DoesntExist
+When I get api near matches for mixedcapsandlowercase
+Then MixedCapsAndLowerCase is the first api search result
 
   @options
   Scenario Outline: When I near match just one page I go to that page
-When I go search for term Nearmatchflattentest
-Then I am on a page titled title Nearmatchflattentest
+When I get api near matches for term Nearmatchflattentest
+Then title Nearmatchflattentest is the first api search result
   Examples:
 |  term  |  title  |
 | soñ onlyaccent | Soñ Onlyaccent  |
@@ -45,8 +40,8 @@
 
   @options
   Scenario Outline: When I near match more than one page but one is exact 
(case, modulo case, or converted to title case) I go to that page
-When I go search for term Nearmatchflattentest
-Then I am on a page titled title Nearmatchflattentest
+When I get api near matches for term Nearmatchflattentest
+Then title Nearmatchflattentest is the first api search result
   Examples:
 |  term  |  title  |
 | son| son |
@@ -63,17 +58,17 @@
 | SON Titlecase  | Son Titlecase   |
 | soñ twoaccents | Soñ Twoaccents  |
 | són twoaccents | Són Twoaccents  |
-| bach   | Johann Sebastian Bach |
-| koan   | Kōan|
-| son redirect   | Soñ Redirect|
+| bach   | Bach|
+| koan   | Koan|
+| son redirect   | Son Redirect|
 | Son Redirectnotbetter | Són Redirectnotbetter |
-| Søn Redirectnoncompete | Blah Redirectnoncompete |
-| Soñ Redirectnoncompete | Blah Redirectnoncompete |
+| Søn Redirectnoncompete | Søn Redirectnoncompete |
+| Soñ Redirectnoncompete | Soñ Redirectnoncompete |
 
   @options
   Scenario Outline: When I near match more than one page but none of them are 
exact then I go to the search results page
-When I go search for term Nearmatchflattentest
-Then I am on a page titled Search results
+When I get api near matches for term 

[MediaWiki-commits] [Gerrit] Convert go feature to api tests - change (mediawiki...CirrusSearch)

2015-05-01 Thread EBernhardson (Code Review)
EBernhardson has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/208197

Change subject: Convert go feature to api tests
..

Convert go feature to api tests

This also requires the nearmatch api changes to core in I7153262.

Change-Id: Ie0a6e8b3b95b56dc9457fc9efe290950d3837a8b
---
R tests/browser/features/go_api.feature
A tests/browser/features/go_browser.feature
M tests/browser/features/prefix_search_api.feature
M tests/browser/features/step_definitions/search_steps.rb
4 files changed, 42 insertions(+), 34 deletions(-)


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

diff --git a/tests/browser/features/go.feature 
b/tests/browser/features/go_api.feature
similarity index 61%
rename from tests/browser/features/go.feature
rename to tests/browser/features/go_api.feature
index 75d16b7..51f3ffb 100644
--- a/tests/browser/features/go.feature
+++ b/tests/browser/features/go_api.feature
@@ -1,41 +1,36 @@
-@clean @go @phantomjs
+@clean @go @api
 Feature: Go Search
   Scenario: I can go to a page with mixed capital and lower case name by the 
name all lower cased
-When I go search for mixedcapsandlowercase
-Then I am on a page titled MixedCapsAndLowerCase
+When I get api near matches for mixedcapsandlowercase
+Then MixedCapsAndLowerCase is the first api search result
 
   Scenario: I can go to a page with mixed capital and lower case name by the 
name with totally wrong case cased
-When I go search for miXEdcapsandlowercASe
-Then I am on a page titled MixedCapsAndLowerCase
+When I get api near matches for miXEdcapsandlowercASe
+Then MixedCapsAndLowerCase is the first api search result
 
   Scenario: I can go to a page with an accented character without the accent
-When I go search for africa
-Then I am on a page titled África
+When I get api near matches for africa
+Then África is the first api search result
 
   @accented_namespace
   Scenario: I can go to a page in a namespace with an accented character 
without the accent
-When I go search for mo:test
-Then I am on a page titled Mó:Test
+When I get api near matches for mo:test
+Then Mó:Test is the first api search result
 
   @accented_namespace
   Scenario: When I go to a page with the namespace specified twice I end up 
on the search results page
-When I go search for file:mo:test
-Then I am on a page titled Search results
+When I get api near matches for file:mo:test
+Then there are no api search results
 
   @from_core
   Scenario: I can go to a page with mixed capital and lower case name by the 
name all lower cased and quoted
-When I go search for mixedcapsandlowercase
-Then I am on a page titled MixedCapsAndLowerCase
-
-  @from_core
-  Scenario: I can go to a user's page whether it is there or not
-When I go search for User:DoesntExist
-Then I am on a page titled User:DoesntExist
+When I get api near matches for mixedcapsandlowercase
+Then MixedCapsAndLowerCase is the first api search result
 
   @options
   Scenario Outline: When I near match just one page I go to that page
-When I go search for term Nearmatchflattentest
-Then I am on a page titled title Nearmatchflattentest
+When I get api near matches for term Nearmatchflattentest
+Then title Nearmatchflattentest is the first api search result
   Examples:
 |  term  |  title  |
 | soñ onlyaccent | Soñ Onlyaccent  |
@@ -45,8 +40,8 @@
 
   @options
   Scenario Outline: When I near match more than one page but one is exact 
(case, modulo case, or converted to title case) I go to that page
-When I go search for term Nearmatchflattentest
-Then I am on a page titled title Nearmatchflattentest
+When I get api near matches for term Nearmatchflattentest
+Then title Nearmatchflattentest is the first api search result
   Examples:
 |  term  |  title  |
 | son| son |
@@ -63,17 +58,17 @@
 | SON Titlecase  | Son Titlecase   |
 | soñ twoaccents | Soñ Twoaccents  |
 | són twoaccents | Són Twoaccents  |
-| bach   | Johann Sebastian Bach |
-| koan   | Kōan|
-| son redirect   | Soñ Redirect|
+| bach   | Bach|
+| koan   | Koan|
+| son redirect   | Son Redirect|
 | Son Redirectnotbetter | Són Redirectnotbetter |
-| Søn Redirectnoncompete | Blah Redirectnoncompete |
-| Soñ Redirectnoncompete | Blah Redirectnoncompete |
+| Søn Redirectnoncompete | Søn Redirectnoncompete |
+| Soñ Redirectnoncompete | Soñ Redirectnoncompete |
 
   @options
   Scenario Outline: When I near match more than one page but none of them are 
exact then I go to the search results page
-When I go search for term Nearmatchflattentest
-Then I am on a page titled Search