Last login: Mon Dec 21 17:54:36 on ttys003 ~/Documents/gerrit/mediawiki/vagrant/mediawiki/extensions/CirrusSearch/tests/browser$ bundle exec cucumber @bad_syntax @clean @api Feature: Searches with syntax errors @setup_main Scenario: Searching for ~ treats the tilde like a space except that the whole "word" (including tilde) makes a phrase search # features/bad_syntax_api.feature:4 When I api search for ffnonesenseword~catapult # features/step_definitions/search_steps.rb:30 Then Two Words is the first api search result # features/step_definitions/search_steps.rb:304 @setup_main Scenario: Searching for ~ treats the tilde like a space (not finding any results if a fuzzy search was needed) # features/bad_syntax_api.feature:9 When I api search for ffnonesensewor~catapult # features/step_definitions/search_steps.rb:30 Then there are no api search results # features/step_definitions/search_steps.rb:388 @balance_quotes Scenario Outline: Searching for for a phrase with a hanging quote adds the quote automatically # features/bad_syntax_api.feature:14 When I api search for # features/step_definitions/search_steps.rb:30 Then Two Words is the first api search result # features/step_definitions/search_steps.rb:304 Examples: | term | | "two words | | "two words" "ffnonesenseword catapult | | "two words" "ffnonesenseword catapult pickles | | "two words" pickles "ffnonesenseword catapult | @balance_quotes Scenario Outline: Searching for a phrase containing /, :, and \" find the page as expected # features/bad_syntax_api.feature:25 Given a page named exists # features/step_definitions/page_steps.rb:1 When I api search for <term> # features/step_definitions/search_steps.rb:30 Then <title> is the first api search result # features/step_definitions/search_steps.rb:304 Examples: | term | title | | "10.1093/acprof:oso/9780195314250.003.0001" | 10.1093/acprof:oso/9780195314250.003.0001 | | "10.5194/os-8-1071-2012" | 10.5194/os-8-1071-2012 | | "10.7227/rie.86.2" | 10.7227/rie.86.2 | | "10.7227\\"yay" | 10.7227"yay | | intitle:"1911 Encyclopædia Britannica/Dionysius"' | 1911 Encyclopædia Britannica/Dionysius | Scenario: searching for NOT something will not crash (technically it should bring up the most linked document, but this isn't worth checking) # features/bad_syntax_api.feature:37 When I api search for NOT catapult # features/step_definitions/search_steps.rb:30 Then there is an api search result # features/step_definitions/search_steps.rb:271 Scenario Outline: searching for less than and greater than doesn't find tons and tons of tokens # features/bad_syntax_api.feature:41 When I api search for <query> # features/step_definitions/search_steps.rb:30 Then there are no api search results # features/step_definitions/search_steps.rb:388 Examples: | query | | <} | | <=} | | >. | | >=. | | > | | < | | >> | | <> | | <>= | | >>> | | <<< | | <<<~ | @filters Scenario Outline: Empty filters work like terms but aren't in test data so aren't found # features/bad_syntax_api.feature:60 When I api search for <term> # features/step_definitions/search_steps.rb:30 Then there are no api search results # features/step_definitions/search_steps.rb:388 Examples: | term | | intitle:"" catapult | | incategory:"" catapult | | intitle: | | intitle:"" | | incategory: | | incategory:"" | | hastemplate: | | hastemplate:"" | Scenario Outline: Searching with a / doesn't cause a degraded search result # features/bad_syntax_api.feature:74 When I api search for main <term> # features/step_definitions/search_steps.rb:30 Then Main Page is the first api search result # features/step_definitions/search_steps.rb:304 Examples: | term | | intitle:/page | | Main/Page | @exact_quotes @setup_main Scenario: Searching for "<word> <word>"~<not a numer> treats the ~ as a space # features/bad_syntax_api.feature:83 When I api search for "ffnonesenseword catapult"~anotherword # features/step_definitions/search_steps.rb:30 And Two Words is the first api search result # features/step_definitions/search_steps.rb:304 Scenario Outline: Searching for special whitespaces returns no result # features/bad_syntax_api.feature:87 When I api search for <specialwhitespaces> # features/step_definitions/search_steps.rb:30 Then the api warns text search is disabled # features/step_definitions/search_steps.rb:226 Examples: | specialwhitespaces | | %{\\u3000}% | | %{\\u0009}%%{\\u3000}% | | %{\\u0009}% %{\\u3000}% | | %ideographic_whitespace% | @boolean_operators Scenario Outline: ORs and ANDs around phrase prefixes finds the search terms # features/bad_syntax_api.feature:98 When I api search for "test catapul*" <operator> "test catapul*" <operator> "test catapul*" # features/step_definitions/search_steps.rb:30 Then there are no errors reported by the api # features/step_definitions/search_steps.rb:456 Examples: | operator | | AND | | OR | @boolean_operators @clean @api @setup_main Feature: Searches with boolean operators Scenario Outline: -, !, and NOT prohibit words in search results # features/boolean_operators_api.feature:3 When I api search for <query> # features/step_definitions/search_steps.rb:30 Then Catapult is the first api search result # features/step_definitions/search_steps.rb:304 But Amazing Catapult is not in the api search results # features/step_definitions/search_steps.rb:373 Examples: | query | | catapult -amazing | | -amazing catapult | | catapult !amazing | | !amazing catapult | | catapult NOT amazing | | NOT amazing catapult | Scenario Outline: +, &&, and AND require matches but since that is the default they don't look like they do anything # features/boolean_operators_api.feature:16 When I api search for <query> # features/step_definitions/search_steps.rb:30 Then Amazing Catapult is the first api search result # features/step_definitions/search_steps.rb:304 But Catapult is not in the api search results # features/step_definitions/search_steps.rb:373 Examples: | query | | +catapult amazing | | amazing +catapult | | +amazing +catapult | | catapult AND amazing | Scenario Outline: OR and || matches docs with either set # features/boolean_operators_api.feature:27 When I api search for <query> # features/step_definitions/search_steps.rb:30 Then Catapult is in the api search results # features/step_definitions/search_steps.rb:373 And Two Words is in the api search results # features/step_definitions/search_steps.rb:373 Examples: | query | | catapult OR África | | África \|\| catapult | | catapult OR "África" | | catapult \|\| "África" | | "África" OR catapult | | "África" \|\| catapult | @boost_template @clean @api Feature: Searches with the boost-template operator Scenario: Searching for a page without template boosts doesn't use them # features/boost_template_api.feature:3 When I api search for BoostTemplateTest # features/step_definitions/search_steps.rb:30 Then NoTemplates BoostTemplateTest is the first api search result # features/step_definitions/search_steps.rb:304 Scenario: Adding a single template boost is recognized # features/boost_template_api.feature:7 When I api search for boost-templates:"Template:BoostTemplateLow|10000%" BoostTemplateTest # features/step_definitions/search_steps.rb:30 Then LowTemplate is the first api search result # features/step_definitions/search_steps.rb:304 Scenario: Adding two template boosts is also recognized # features/boost_template_api.feature:11 When I api search for boost-templates:"Template:BoostTemplateLow|10000% Template:BoostTemplateHigh|100000%" BoostTemplateTest # features/step_definitions/search_steps.rb:30 Then HighTemplate is the first api search result # features/step_definitions/search_steps.rb:304 Scenario: Four templates is just fine (though I'm only actually using two of them) # features/boost_template_api.feature:15 When I api search for boost-templates:"Template:BoostTemplateFake|10% Template:BoostTemplateLow|10000% Template:BoostTemplateFake2|1000000% Template:BoostTemplateHigh|100000%" BoostTemplateTest # features/step_definitions/search_steps.rb:30 Then HighTemplate is the first api search result # features/step_definitions/search_steps.rb:304 Scenario: Template boosts can also lower the score of a template # features/boost_template_api.feature:19 When I api search for boost-templates:"Template:BoostTemplateLow|1%" BoostTemplateTest -intitle:"BoostTemplateTest" # features/step_definitions/search_steps.rb:30 Then HighTemplate is the first api search result # features/step_definitions/search_steps.rb:304 Scenario: Template boosts can also lower the score of another template (we didn't get lucky with the first one) # features/boost_template_api.feature:23 When I api search for boost-templates:"Template:BoostTemplateHigh|1%" BoostTemplateTest -intitle:"BoostTemplateTest" # features/step_definitions/search_steps.rb:30 Then LowTemplate is the first api search result # features/step_definitions/search_steps.rb:304 @clean @filters @api Feature: Searches with combined filters Scenario Outline: Filters can be combined # features/combined_filters_api.feature:3 When I api search for <term> # features/step_definitions/search_steps.rb:30 Then <first_result> is the first api search result # features/step_definitions/search_steps.rb:304 Examples: | term | first_result | | incategory:twowords intitle:catapult | none | | incategory:twowords intitle:"Two Words" | Two Words | | incategory:alpha incategory:beta | AlphaBeta | @clean @api @commons Feature: Searching for files on local wiki stored on commons Scenario: A file that exists only on commons can be found on the local wiki # features/commons.feature:3 When I api search in namespace 6 for oncommons # features/step_definitions/search_steps.rb:30 Then File:OnCommons.svg is the first api search result # features/step_definitions/search_steps.rb:304 Scenario: A file that exists on commons and the local wiki returns the local result # features/commons.feature:7 When I api search in namespace 6 for duplicated # features/step_definitions/search_steps.rb:30 Then File:DuplicatedLocally.svg is the first api search result # features/step_definitions/search_steps.rb:304 And Locally stored file *duplicated* on commons is the highlighted snippet of the first api search result # features/step_definitions/search_steps.rb:363 And there is no second api search result # features/step_definitions/search_steps.rb:297 @clean @api @relevancy Feature: Common Terms Query Scenario: The default query string builder is strict # features/commonterms_api.feature:3 When I api search for this is not a relevant Relevancytest # features/step_definitions/search_steps.rb:30 Then there are no api search results # features/step_definitions/search_steps.rb:388 Scenario: Commons term query allows to find results when stopwords are missing # features/commonterms_api.feature:7 When I activate common terms query with the default profile # features/step_definitions/search_steps.rb:24 And I api search for this is not a relevant Relevancytest # features/step_definitions/search_steps.rb:30 Then Relevancytest is in the api search results # features/step_definitions/search_steps.rb:373 And Relevancytestviaredirect is in the api search results # features/step_definitions/search_steps.rb:373 Scenario Outline: Commons term query is disabled when there is special syntax # features/commonterms_api.feature:13 When I activate common terms query with the default profile # features/step_definitions/search_steps.rb:24 And I api search for <query> this is +not a relevant Relevancytest # features/step_definitions/search_steps.rb:30 Then there are no api search results # features/step_definitions/search_steps.rb:388 Examples: | query | | this is +not a relevant Relevancytest | | this intitle:Relevancytest | | this is not a "relevant Relevancytest" | | this is not a releva* Relevancytest | Scenario: The aggressive recall profile will display results even if some words are missing # features/commonterms_api.feature:24 When I activate common terms query with the aggressive_recall profile # features/step_definitions/search_steps.rb:24 And I api search for a cool wordtest with Relevancytwo is bliss # features/step_definitions/search_steps.rb:30 Then Relevancytwo Wordtest is the first api search result # features/step_definitions/search_steps.rb:304 expected ["Wordtest Relevancytwo"] to include "Relevancytwo Wordtest" (RSpec::Expectations::ExpectationNotMetError) ./features/step_definitions/search_steps.rb:319:in `/^(.+) is( in)? the ((?:[^ ])+(?: or (?:[^ ])+)*) api search result$/' features/commonterms_api.feature:27:in `Then Relevancytwo Wordtest is the first api search result' Scenario: With common terms query stop words are used to boost relevancy # features/commonterms_api.feature:29 When I activate common terms query with the default profile # features/step_definitions/search_steps.rb:24 And I api search for Shakespeare to be or not to be # features/step_definitions/search_steps.rb:30 Then William Shakespeare Works is the first api search result # features/step_definitions/search_steps.rb:304 And William Shakespeare is the second api search result # features/step_definitions/search_steps.rb:304 @clean @phantomjs @bad_syntax Feature: Searches that prompt, or not, for new page creation Background: # features/create_new_page.feature:3 Given I am at a random page # mediawiki_selenium-1.6.3/lib/mediawiki_selenium/step_definitions/navigation_steps.rb:1 @incategory @wildcard Scenario Outline: Something something # features/create_new_page.feature:7 When I search for <query> # features/step_definitions/search_steps.rb:109 Then there is <condition> to create a new page from the search result # features/step_definitions/search_steps.rb:429 Examples: | query | condition | | "ffnonsesnseword catapult"~anotherword | no link | | catapult~~~~....[[\|\|.\|\|\|\|\|\|+\|+\|=\\\\=\\*.$.$.$. | no link | | \|\| catapult | no link | | *ickle | a link | | incategory:weaponry | no link | | catapu?t | no link | | catapul? | no link | | morelike:ThisPageDoesNotExist | no link | | morelike:ChangeMe | no link | @boolean_operators Scenario Outline: boolean operators in bad positions in the query are ignored so you get the option to create a new page # features/create_new_page.feature:23 When I search for <query> # features/step_definitions/search_steps.rb:109 Then there is no warning # features/step_definitions/search_steps.rb:485 And Catapult is in the first search result # features/step_definitions/search_steps.rb:281 And there is a link to create a new page from the search result # features/step_definitions/search_steps.rb:429 Examples: | query | | catapult + | | catapult - | | catapult ! | | + catapult | | - catapult | | ! catapult | | catapult + amazing | | catapult - amazing | | catapult ! amazing | | amazing+catapult | | amazing-catapult | | amazing!catapult | | catapult!!!!!!! | | catapult !!!!!!!! | | !!!! catapult | | ------- catapult | | ++++ catapult ++++ | | ++amazing++++catapult | | catapult ~/ | | catapult ~/ | | amazing~◆~catapult | | ******* catapult | @boolean_operators Scenario Outline: boolean operators in bad positions in the query are ignored but if there are other valid operators then you don't get the option to create a new page # features/create_new_page.feature:61 When I search for <query> # features/step_definitions/search_steps.rb:109 Then there is no warning # features/step_definitions/search_steps.rb:485 And Catapult is in the first search result # features/step_definitions/search_steps.rb:281 And there is no link to create a new page from the search result # features/step_definitions/search_steps.rb:429 Examples: | query | | catapult AND + amazing | | catapult AND - amazing | | catapult AND ! amazing | | catapult \|\|--- | | catapult~~~~....[[\|\|.\|\|\|\|\|\|+\|+\|=\\\\=\\*.$.$.$. | | T:8~=~¥9:77:7:57;7;76;6346- OR catapult | | catapult OR T:8~=~¥9:77:7:57;7;76;6346- | | --- AND catapult | | *catapult* | | ***catapult* | | ****** catapult* | @boolean_operators Scenario Outline: boolean operators in bad positions in the query are ignored and if the title isn't a valid article title then you don't get the option to create a new page # features/create_new_page.feature:81 When I search for <query> # features/step_definitions/search_steps.rb:109 Then there is no warning # features/step_definitions/search_steps.rb:485 And Catapult is in the first search result # features/step_definitions/search_steps.rb:281 And there is no link to create a new page from the search result # features/step_definitions/search_steps.rb:429 Examples: | query | | :~!$$=!~\\!{<} catapult | | catapult -_~^_~^_^^ | | catapult \|\| | | catapult ~~~~~~ | | catapult \|\|--- | | \|\| catapult | @wildcard Scenario Outline: Wildcards can't start a term but they aren't valid titles so you still don't get the link to create an article # features/create_new_page.feature:96 When I search for <wildcard>ickle # features/step_definitions/search_steps.rb:109 Then there is no warning # features/step_definitions/search_steps.rb:485 And there are no search results # features/step_definitions/search_steps.rb:385 And there is a link to create a new page from the search result # features/step_definitions/search_steps.rb:429 Examples: | wildcard | | * | | ? | @clean @api @suggestions Feature: Did you mean Scenario: Uncommon phrases spelled correctly don't get suggestions even if one of the words is very uncommon # features/did_you_mean_api.feature:3 When I api search for nobel prize # features/step_definitions/search_steps.rb:30 Then there is no api suggestion # features/step_definitions/search_steps.rb:444 Scenario: No suggestions on pages that are not the first # features/did_you_mean_api.feature:7 When I api search with offset 20 for popular cultur # features/step_definitions/search_steps.rb:30 Then there is no api suggestion # features/step_definitions/search_steps.rb:444 @stemming Scenario: Suggestions do not show up when a full title matches but with stemming # features/did_you_mean_api.feature:12 When I api search for stemmingsingleword # features/step_definitions/search_steps.rb:30 Then there is no api suggestion # features/step_definitions/search_steps.rb:444 @stemming Scenario: Suggestions do not show up when a full multi word title matches but with stemming # features/did_you_mean_api.feature:17 When I api search for stemming multiword # features/step_definitions/search_steps.rb:30 Then there is no api suggestion # features/step_definitions/search_steps.rb:444 @stemming Scenario: Suggestions do not show up when a full multi word title matches but with apostrophe normalization # features/did_you_mean_api.feature:22 When I api search for stemming possessive's # features/step_definitions/search_steps.rb:30 Then there is no api suggestion # features/step_definitions/search_steps.rb:444 Scenario: Suggestions don't come from redirect titles when it matches an actual title # features/did_you_mean_api.feature:26 When I api search for Noble Gasses # features/step_definitions/search_steps.rb:30 Then there is no api suggestion # features/step_definitions/search_steps.rb:444 Scenario: Common phrases spelled incorrectly get suggestions # features/did_you_mean_api.feature:30 When I api search for popular cultur # features/step_definitions/search_steps.rb:30 Then popular *culture* is suggested by api # features/step_definitions/search_steps.rb:436 Scenario: Uncommon phrases spelled incorrectly get suggestions even if they contain words that are spelled correctly on their own # features/did_you_mean_api.feature:34 When I api search for noble prize # features/step_definitions/search_steps.rb:30 Then *nobel* prize is suggested by api # features/step_definitions/search_steps.rb:436 Scenario: Suggestions can come from redirect titles when redirects are included in search # features/did_you_mean_api.feature:38 When I api search for Rrr Worrd # features/step_definitions/search_steps.rb:30 Then rrr *word* is suggested by api # features/step_definitions/search_steps.rb:436 Scenario Outline: Special search syntax is preserved in suggestions (though sometimes moved around) # features/did_you_mean_api.feature:42 When I api search for <term> # features/step_definitions/search_steps.rb:30 Then <suggested> is suggested by api # features/step_definitions/search_steps.rb:436 Examples: | term | suggested | | prefer-recent:noble prize | prefer-recent:*nobel* prize | | Template:nobel piep | Template:*noble pipe* | | prefer-recent:noble prize | prefer-recent:*nobel* prize | | incategory:prize noble prize | incategory:prize *nobel* prize | | noble incategory:prize prize | incategory:prize *nobel* prize | | hastemplate:prize noble prize | hastemplate:prize *nobel* prize | | -hastemplate:prize noble prize | -hastemplate:prize *nobel* prize | | boost-templates:"prize\|150%" noble prize | boost-templates:"prize\|150%" *nobel* prize | | noble prize prefix:n | *nobel* prize prefix:n | Scenario: Customize prefix length of did you mean suggestions # features/did_you_mean_api.feature:57 When I set did you mean suggester option cirrusSuggPrefixLength to 5 # features/step_definitions/search_steps.rb:20 And I api search for noble prize # features/step_definitions/search_steps.rb:30 Then there is no api suggestion # features/step_definitions/search_steps.rb:444 Scenario: Did you mean option suggests # features/did_you_mean_api.feature:62 When I api search for grammo awards # features/step_definitions/search_steps.rb:30 Then there is no api suggestion # features/step_definitions/search_steps.rb:444 Scenario: Customize max term freq did you mean suggestions # features/did_you_mean_api.feature:66 When I set did you mean suggester option cirrusSuggMaxTermFreq to 0.4 # features/step_definitions/search_steps.rb:20 And I set did you mean suggester option cirrusSuggConfidence to 1 # features/step_definitions/search_steps.rb:20 And I api search for grammo # features/step_definitions/search_steps.rb:30 Then *grammy* is suggested by api # features/step_definitions/search_steps.rb:436 Scenario: Customize max term freq did you mean suggestions # features/did_you_mean_api.feature:72 When I set did you mean suggester option cirrusSuggMaxTermFreq to 0.0000001 # features/step_definitions/search_steps.rb:20 And I set did you mean suggester option cirrusSuggConfidence to 1 # features/step_definitions/search_steps.rb:20 And I api search for grammo # features/step_definitions/search_steps.rb:30 Then there is no api suggestion # features/step_definitions/search_steps.rb:444 Scenario: Customize min doc freq did you mean suggestions # features/did_you_mean_api.feature:78 When I set did you mean suggester option cirrusSuggMode to popular # features/step_definitions/search_steps.rb:20 And I set did you mean suggester option cirrusSuggMinDocFreq to 0.99999999 # features/step_definitions/search_steps.rb:20 And I api search for noble prize # features/step_definitions/search_steps.rb:30 Then there is no api suggestion # features/step_definitions/search_steps.rb:444 Scenario: Customize prefix length of did you mean suggestions below the hard limit # features/did_you_mean_api.feature:84 When I set did you mean suggester option cirrusSuggPrefixLength to 1 # features/step_definitions/search_steps.rb:20 And I api search for nabel prize # features/step_definitions/search_steps.rb:30 Then there is no api suggestion # features/step_definitions/search_steps.rb:444 @expect_failure Scenario: Search for awards suggest1 suggest4 returns a suggestion # features/did_you_mean_api.feature:90 When I api search for awards suggest1 suggest4 # features/step_definitions/search_steps.rb:30 Then awards *suggest2 suggest3* is suggested by api # features/step_definitions/search_steps.rb:436 Scenario: When I use the collate option: awards suggest1 suggest4 returns no suggestion # features/did_you_mean_api.feature:94 When I set did you mean suggester option cirrusSuggCollate to yes # features/step_definitions/search_steps.rb:20 And I api search for awards suggest1 suggest4 # features/step_definitions/search_steps.rb:30 Then there is no api suggestion # features/step_definitions/search_steps.rb:444 @expect_failure Scenario: When I use the laplace smoothing model with alpha value 0.000001 the suggestions are not complete # features/did_you_mean_api.feature:100 When I set did you mean suggester option cirrusSuggSmoothing to laplace # features/step_definitions/search_steps.rb:20 And I set did you mean suggester option cirrusSuggAlpha to 0.1 # features/step_definitions/search_steps.rb:20 And I api search for grammo awards suggest1 suggest4 suggest4 # features/step_definitions/search_steps.rb:30 Then grammo awards suggest1 *suggest2 suggest3* is suggested by api # features/step_definitions/search_steps.rb:436 Scenario: When I use the laplace smoothing model with alpha value 0.9 there is no suggestion # features/did_you_mean_api.feature:106 When I set did you mean suggester option cirrusSuggSmoothing to laplace # features/step_definitions/search_steps.rb:20 And I set did you mean suggester option cirrusSuggAlpha to 0.9999 # features/step_definitions/search_steps.rb:20 And I api search for grammo awards suggest1 suggest4 suggest4 # features/step_definitions/search_steps.rb:30 Then there is no api suggestion # features/step_definitions/search_steps.rb:444 @clean @dump_action @phantomjs Feature: Cirrus dump Scenario: Can dump pages # features/dump_action.feature:3 When I dump the cirrus data for Main Page # features/step_definitions/search_steps.rb:176 Then the page text contains Main Page # features/step_definitions/general_steps.rb:4 And the page text contains template # features/step_definitions/general_steps.rb:4 And the page text contains namespace # features/step_definitions/general_steps.rb:4 And the page text contains version # features/step_definitions/general_steps.rb:4 And the page text contains _id # features/step_definitions/general_steps.rb:4 @clean @dump_config @phantomjs Feature: You can dump CirrusSearch's configuration Scenario: You can dump CirrusSearch's configuration # features/dump_config.feature:3 When I dump the cirrus config # features/step_definitions/search_steps.rb:182 Then the page text contains phraseSuggestMaxErrors # features/step_definitions/general_steps.rb:4 And the page text contains namespaceWeights # features/step_definitions/general_steps.rb:4 And the page text does not contain Password # features/step_definitions/general_steps.rb:7 And the page text does not contain password # features/step_definitions/general_steps.rb:7 @clean @dump_mapping @phantomjs Feature: You can dump the mapping CirrusSearch set on Elasticsearch's indexes Scenario: You can dump the mapping CirrusSearch set on Elasticsearch's indexes # features/dump_mapping.feature:3 When I dump the cirrus mapping # features/step_definitions/search_steps.rb:185 Then the page text contains "_all":{"enabled":false} # features/step_definitions/general_steps.rb:4 @clean @dump_quer @phantomjs Feature: Can dump the query syntax Scenario: Can dump the query syntax # features/dump_query.feature:3 Given I am at a random page # mediawiki_selenium-1.6.3/lib/mediawiki_selenium/step_definitions/navigation_steps.rb:1 When I search for main page # features/step_definitions/search_steps.rb:109 And I request a dump of the query # features/step_definitions/search_steps.rb:179 Then the page text contains query # features/step_definitions/general_steps.rb:4 And the page text contains stats # features/step_definitions/general_steps.rb:4 And the page text contains full_text search for 'main page' # features/step_definitions/general_steps.rb:4 And the page text contains "path": # features/step_definitions/general_steps.rb:4 @clean @dump_settings @phantomjs Feature: You can dump the settings CirrusSearch set on Elasticsearch's indexes Scenario: You can dump the settings CirrusSearch set on Elasticsearch's indexes # features/dump_settings.feature:3 When I dump the cirrus settings # features/step_definitions/search_steps.rb:188 Then the page text contains near_space_flattener # features/step_definitions/general_steps.rb:4 And the page text contains refresh_interval # features/step_definitions/general_steps.rb:4 @clean @phantomjs Feature: Elasticsearch version in Special:Version Scenario: Elasticsearch version is in Special:Version # features/elasticsearch_on_special_version.feature:3 When I go to Special:Version # features/step_definitions/page_steps.rb:75 Then there is a software version row for Elasticsearch # features/step_definitions/page_steps.rb:98 @clean @exact_quotes @api Feature: Searches that contain quotes Scenario: Searching for a word in quotes disbles stemming (can still find plural with exact match) # features/exact_quotes_api.feature:3 When I api search for "pickles" # features/step_definitions/search_steps.rb:30 Then Two Words is the first api search result # features/step_definitions/search_steps.rb:304 Scenario: Searching for a phrase in quotes disbles stemming (can't find plural with singular) # features/exact_quotes_api.feature:7 When I api search for "catapult pickle" # features/step_definitions/search_steps.rb:30 Then there are no api search results # features/step_definitions/search_steps.rb:388 Scenario: Searching for a phrase in quotes disbles stemming (can still find plural with exact match) # features/exact_quotes_api.feature:11 When I api search for "catapult pickles" # features/step_definitions/search_steps.rb:30 Then Two Words is the first api search result # features/step_definitions/search_steps.rb:304 Scenario: Quoted phrases have a default slop of 0 # features/exact_quotes_api.feature:15 When I api search for "ffnonesenseword pickles" # features/step_definitions/search_steps.rb:30 Then none is the first api search result # features/step_definitions/search_steps.rb:304 When I api search for "ffnonesenseword pickles"~1 # features/step_definitions/search_steps.rb:30 Then Two Words is the first api search result # features/step_definitions/search_steps.rb:304 Scenario: Quoted phrases match stop words # features/exact_quotes_api.feature:21 When I api search for "Contains A Stop Word" # features/step_definitions/search_steps.rb:30 Then Contains A Stop Word is the first api search result # features/step_definitions/search_steps.rb:304 Scenario: Adding a ~ to a phrase keeps stemming enabled # features/exact_quotes_api.feature:25 When I api search for "catapult pickle"~ # features/step_definitions/search_steps.rb:30 Then Two Words is the first api search result # features/step_definitions/search_steps.rb:304 Scenario: Adding a ~ to a phrase switches the default slop to 0 # features/exact_quotes_api.feature:29 When I api search for "ffnonesenseword pickle"~ # features/step_definitions/search_steps.rb:30 Then none is the first api search result # features/step_definitions/search_steps.rb:304 When I api search for "ffnonesenseword pickle"~1~ # features/step_definitions/search_steps.rb:30 Then Two Words is the first api search result # features/step_definitions/search_steps.rb:304 Scenario: Adding a ~ to a phrase stops it from matching stop words so long as there is enough slop # features/exact_quotes_api.feature:35 When I api search for "doesn't actually Contain A Stop Words"~1~ # features/step_definitions/search_steps.rb:30 Then Doesn't Actually Contain Stop Words is the first api search result # features/step_definitions/search_steps.rb:304 Scenario: Adding a ~<a number>~ to a phrase keeps stemming enabled # features/exact_quotes_api.feature:39 When I api search for "catapult pickle"~0~ # features/step_definitions/search_steps.rb:30 Then Two Words is the first api search result # features/step_definitions/search_steps.rb:304 Scenario: Adding a ~<a number> to a phrase turns off because it is a proximity search # features/exact_quotes_api.feature:43 When I api search for "catapult pickle"~0 # features/step_definitions/search_steps.rb:30 Then there are no api search results # features/step_definitions/search_steps.rb:388 Scenario: Searching for a quoted * actually searches for a * # features/exact_quotes_api.feature:47 When I api search for "pick*" # features/step_definitions/search_steps.rb:30 Then Pick* is the first api search result # features/step_definitions/search_steps.rb:304 Scenario Outline: Searching for "<word> <word>"~<number> activates a proximity search # features/exact_quotes_api.feature:51 When I api search for "ffnonesenseword anotherword"~<proximity> # features/step_definitions/search_steps.rb:30 Then <result> is the first api search result # features/step_definitions/search_steps.rb:304 Examples: | proximity | result | | 0 | none | | 1 | none | | 2 | Two Words | | 3 | Two Words | | 77 | Two Words | Scenario Outline: Prefixing a quoted phrase with - or ! or NOT negates it # features/exact_quotes_api.feature:62 When I api search for catapult <negation>"two words"<suffix> # features/step_definitions/search_steps.rb:30 Then Catapult is in the api search results # features/step_definitions/search_steps.rb:373 And Two Words is not in the api search results # features/step_definitions/search_steps.rb:373 Examples: | negation | suffix | | - | | | ! | | | %{exact:NOT } | | | - | ~ | | ! | ~ | | %{exact:NOT } | ~ | | - | ~1 | | ! | ~1 | | %{exact:NOT } | ~1 | | - | ~7~ | | ! | ~7~ | | %{exact:NOT } | ~7~ | Scenario: Can combine positive and negative phrase search # features/exact_quotes_api.feature:81 When I api search for catapult "catapult" -"two words" -"some stuff" # features/step_definitions/search_steps.rb:30 Then Catapult is in the api search results # features/step_definitions/search_steps.rb:373 And Two Words is not in the api search results # features/step_definitions/search_steps.rb:373 Scenario: Can combine positive and negative phrase search (backwards) # features/exact_quotes_api.feature:86 When I api search for catapult -"asdf" "two words" # features/step_definitions/search_steps.rb:30 Then Two Words is in the api search results # features/step_definitions/search_steps.rb:373 And Catapult is not in the api search results # features/step_definitions/search_steps.rb:373 @setup_main Scenario: Searching for a word in quotes disbles stemming (can't find plural with singular) # features/exact_quotes_api.feature:92 When I api search for "pickle" # features/step_definitions/search_steps.rb:30 Then there are no api search results # features/step_definitions/search_steps.rb:388 @frozen Feature: Mutations to frozen indexes are properly delayed Scenario: Updates to frozen indexes are delayed # features/frozen_index_api.feature:3 Given I delete FrozenTest # features/step_definitions/page_steps.rb:35 And a page named FrozenTest exists with contents foobarbaz # features/step_definitions/page_steps.rb:1 And within 20 seconds api searching for foobarbaz yields FrozenTest as the first result # features/step_definitions/search_steps.rb:403 And I globally freeze indexing # features/step_definitions/search_steps.rb:489 And a page named FrozenTest exists with contents superduperfrozen # features/step_definitions/page_steps.rb:1 And I wait 10 seconds # features/step_definitions/general_steps.rb:1 And I api search for superduperfrozen # features/step_definitions/search_steps.rb:30 And FrozenTest is not in the api search results # features/step_definitions/search_steps.rb:373 When I globally thaw indexing # features/step_definitions/search_steps.rb:496 And I wait 10 seconds # features/step_definitions/general_steps.rb:1 Then I api search for superduperfrozen yields FrozenTest as the first result # features/step_definitions/search_steps.rb:30 Scenario: Deletes to frozen indexes are delayed # features/frozen_index_api.feature:16 Given a page named FrozenDeleteTest exists with contents bazbarfoo # features/step_definitions/page_steps.rb:1 And within 20 seconds api searching for bazbarfoo yields FrozenDeleteTest as the first result # features/step_definitions/search_steps.rb:403 And I globally freeze indexing # features/step_definitions/search_steps.rb:489 And I delete FrozenDeleteTest # features/step_definitions/page_steps.rb:35 And a page named FrozenDeleteTest exists with contents mrfreeze recreated this page to work around mediawiki's behavior of not showing deleted pages in search results. mrfreeze is surprisingly helpful. # features/step_definitions/page_steps.rb:1 And I wait 10 seconds # features/step_definitions/general_steps.rb:1 And I api search for bazbarfoo # features/step_definitions/search_steps.rb:30 And FrozenDeleteTest is the first api search result # features/step_definitions/search_steps.rb:304 When I globally thaw indexing # features/step_definitions/search_steps.rb:496 And I wait 10 seconds # features/step_definitions/general_steps.rb:1 Then I api search for bazbarfoo yields no results # features/step_definitions/search_steps.rb:30 @commons Scenario: Updates to OtherIndex are delayed # features/frozen_index_api.feature:30 Given I delete on commons File:Frozen.svg # features/step_definitions/page_steps.rb:35 And I delete File:Frozen.svg # features/step_definitions/page_steps.rb:35 And a file named File:Frozen.svg exists on commons with contents Frozen.svg and description File stored on commons and locally for frozen tests # features/step_definitions/page_steps.rb:6 And a file named File:Frozen.svg exists with contents Frozen.svg and description Locally stored file also on commons for frozen tests # features/step_definitions/page_steps.rb:6 And within 20 seconds api searching in namespace 6 for frozen yields Locally stored file also on commons for *frozen* tests as the highlighted snippet of the first api search result # features/step_definitions/search_steps.rb:416 And I globally freeze indexing # features/step_definitions/search_steps.rb:489 And I delete File:Frozen.svg # features/step_definitions/page_steps.rb:35 And a file named File:Frozen.svg exists with contents Frozen.svg and description frozen reupload of locally stored file # features/step_definitions/page_steps.rb:6 And I wait 10 seconds # features/step_definitions/general_steps.rb:1 And I api search in namespace 6 for frozen # features/step_definitions/search_steps.rb:30 And Locally stored file also on commons for *frozen* tests is the highlighted snippet of the first api search result # features/step_definitions/search_steps.rb:363 When I globally thaw indexing # features/step_definitions/search_steps.rb:496 And I wait 10 seconds # features/step_definitions/general_steps.rb:1 Then I api search in namespace 6 for frozen yields *frozen* reupload of locally stored file as the highlighted snippet of the first api search result # features/step_definitions/search_steps.rb:30 @clean @phantomjs @setup_main @setup_namespaces Feature: Full text search advanced features Background: # features/full_text_advanced.feature:3 Given I am at the search results page # features/step_definitions/search_steps.rb:3 Scenario Outline: Main search with non-advanced clicky features # features/full_text_advanced.feature:6 When I click the <filter> link # features/step_definitions/search_steps.rb:154 And I search for <term> # features/step_definitions/search_steps.rb:109 Then I am on a page titled Search results # features/step_definitions/page_steps.rb:101 And <first_result> is the first search result # features/step_definitions/search_steps.rb:281 Examples: | filter | term | first_result | | Content pages | catapult | Catapult | | Content pages | smoosh | none | | Content pages | nothingasdf | none | | Multimedia | catapult | none | | Multimedia | smoosh | none | | Multimedia | nothingasdf | File:Nothingasdf | | Everything | catapult | Catapult | | Everything | smoosh | Help:Smoosh | | Everything | nothingasdf | File:Nothingasdf | Scenario Outline: Main search with advanced clicky features # features/full_text_advanced.feature:23 When I click the Advanced link # features/step_definitions/search_steps.rb:154 And I click the (Main) or (Article) label # features/step_definitions/search_steps.rb:157 And I click the <filters> labels # features/step_definitions/search_steps.rb:157 And I search for <term> # features/step_definitions/search_steps.rb:109 Then I am on a page titled Search results # features/step_definitions/page_steps.rb:101 And <first_result> the first search result # features/step_definitions/search_steps.rb:281 Examples: | filters | term | first_result | | Talk, Help | catapult | Talk:Two Words is | | Help, Help talk | catapult | none is | | (Main) or (Article) | catapult | Catapult is in | @clean @api Feature: Full text search @headings Scenario: Pages can be found by their headings # features/full_text_api.feature:4 When I api search for incategory:HeadingsTest "I am a heading" # features/step_definitions/search_steps.rb:30 Then HasHeadings is the first api search result # features/step_definitions/search_steps.rb:304 @headings Scenario: Ignored headings aren't searched so text with the same word is wins # features/full_text_api.feature:9 When I api search for incategory:HeadingsTest References # features/step_definitions/search_steps.rb:30 Then HasReferencesInText is the first api search result # features/step_definitions/search_steps.rb:304 @setup_main Scenario: Searching for a page using its title and another word not in the page's text doesn't find the page # features/full_text_api.feature:14 When I api search for DontExistWord Two Words # features/step_definitions/search_steps.rb:30 Then there are no api search results # features/step_definitions/search_steps.rb:388 @setup_main Scenario: Searching for a page using its title and another word in the page's text does find it # features/full_text_api.feature:19 When I api search for catapult Two Words # features/step_definitions/search_steps.rb:30 Then Two Words is the first api search result # features/step_definitions/search_steps.rb:304 @setup_phrase_rescore Scenario: Searching for an unquoted phrase finds the phrase first # features/full_text_api.feature:24 When I api search for Rescore Test Words # features/step_definitions/search_steps.rb:30 Then Rescore Test Words Chaff is the first api search result # features/step_definitions/search_steps.rb:304 @setup_phrase_rescore Scenario: Searching for a quoted phrase finds higher scored matches before the whole query interpreted as a phrase # features/full_text_api.feature:29 When I api search for Rescore "Test Words" # features/step_definitions/search_steps.rb:30 Then Test Words Rescore Rescore Test Words is the first api search result # features/step_definitions/search_steps.rb:304 # Note that other tests will catch this situation as well but this test should be pretty specific @setup_phrase_rescore Scenario: Searching for an unquoted phrase still prioritizes titles over text # features/full_text_api.feature:35 When I api search for Rescore Test TextContent # features/step_definitions/search_steps.rb:30 Then Rescore Test TextContent is the first api search result # features/step_definitions/search_steps.rb:304 @setup_phrase_rescore Scenario: Searching with a quoted word just treats the word as though it didn't have quotes # features/full_text_api.feature:40 When I api search for "Rescore" Words Test # features/step_definitions/search_steps.rb:30 Then Test Words Rescore Rescore Test Words is the first api search result # features/step_definitions/search_steps.rb:304 @programmer_friendly Scenario Outline: Programmer friendly searches # features/full_text_api.feature:45 When I api search for <term> # features/step_definitions/search_steps.rb:30 Then <page> is the first api search result # features/step_definitions/search_steps.rb:304 Examples: | term | page | | namespace aliases | $wgNamespaceAliases | | namespaceAliases | $wgNamespaceAliases | | $wgNamespaceAliases | $wgNamespaceAliases | | namespace_aliases | $wgNamespaceAliases | | NamespaceAliases | $wgNamespaceAliases | | wgnamespacealiases | $wgNamespaceAliases | | snake case | PFSC | | snakeCase | PFSC | | snake_case | PFSC | | SnakeCase | PFSC | | Pascal Case | PascalCase | | pascalCase | PascalCase | | pascal_case | PascalCase | | PascalCase | PascalCase | | pascalcase | PascalCase | | numeric 7 | NumericCase7 | | numericcase7 | NumericCase7 | | numericCase | NumericCase7 | | getInitial | this.getInitial | | reftoolbarbase js | RefToolbarBase.js | | this.iscamelcased | PFTest Paren | @stemmer Scenario Outline: Stemming works as expected # features/full_text_api.feature:73 When I api search for StemmerTest <term> # features/step_definitions/search_steps.rb:30 Then <first_result> is the first api search result # features/step_definitions/search_steps.rb:304 And <second_result> is the second api search result # features/step_definitions/search_steps.rb:304 Examples: | term | first_result | second_result | | aliases | StemmerTest Aliases | StemmerTest Alias | | alias | StemmerTest Alias | StemmerTest Aliases | | used | StemmerTest Used | none | | uses | StemmerTest Used | none | | use | StemmerTest Used | none | | us | none | none | | guideline | StemmerTest Guidelines | none | @match_stopwords Scenario: When you search for a stopword you find pages with that stopword # features/full_text_api.feature:88 When I api search for to -intitle:Manyredirectstarget # features/step_definitions/search_steps.rb:30 Then To is the first api search result # features/step_definitions/search_steps.rb:304 @many_redirects Scenario: When you search for a page by redirects having more unrelated redirects doesn't penalize the score # features/full_text_api.feature:93 When I api search for incategory:ManyRedirectsTest Many Redirects Test # features/step_definitions/search_steps.rb:30 Then Manyredirectstarget is the first api search result # features/step_definitions/search_steps.rb:304 @fallback_finder Scenario: I can find things that Elasticsearch typically thinks of as word breaks in the title # features/full_text_api.feature:98 When I api search for $US # features/step_definitions/search_steps.rb:30 Then $US is the first api search result # features/step_definitions/search_steps.rb:304 @fallback_finder Scenario: I can find things that Elaticsearch typically thinks of as word breaks in redirect title # features/full_text_api.feature:103 When I api search for ¢ # features/step_definitions/search_steps.rb:30 Then Cent (currency) is the first api search result # features/step_definitions/search_steps.rb:304 @accent_squashing Scenario Outline: Searching with accents # features/full_text_api.feature:108 When I api search for "<term>" # features/step_definitions/search_steps.rb:30 Then <first_result> is the first api search result # features/step_definitions/search_steps.rb:304 Examples: | term | first_result | | África | África | | Africa | África | | AlphaBeta | AlphaBeta | | ÁlphaBeta | none | @unicode_normalization Scenario Outline: Searching for similar unicode characters finds all variants # features/full_text_api.feature:119 When I api search for <term> # features/step_definitions/search_steps.rb:30 Then there are 4 api search results # features/step_definitions/search_steps.rb:394 Examples: | term | | वाङ्मय | | वाङ्‍मय | | वाङ‍्मय | | वाङ्‌मय | @accented_namespace Scenario: Searching for an accented namespace without the accent finds things in it # features/full_text_api.feature:130 When I api search for mo:some text # features/step_definitions/search_steps.rb:30 Then Mó:Test is the first api search result # features/step_definitions/search_steps.rb:304 @accented_namespace Scenario: If the search started with a namespace it doesn't pick up the accented namespace # features/full_text_api.feature:135 When I api search for file:mo:some text # features/step_definitions/search_steps.rb:30 Then Mó:Test is not in the api search results # features/step_definitions/search_steps.rb:373 @clean @phantomjs Feature: Full text search Background: # features/full_text_browser.feature:3 Given I am at a random page # mediawiki_selenium-1.6.3/lib/mediawiki_selenium/step_definitions/navigation_steps.rb:1 @setup_main @setup_namespaces Scenario Outline: Query string search # features/full_text_browser.feature:7 When I search for <term> # features/step_definitions/search_steps.rb:109 Then I am on a page titled Search results # features/step_definitions/page_steps.rb:101 And <first_result> the first search <image?>result # features/step_definitions/search_steps.rb:281 But Two Words is <two_words_is_in> the search results # features/step_definitions/search_steps.rb:376 Examples: | term | first_result | two_words_is_in | image? | | catapult | Catapult is in | in | | unable to locate element, using {:id=>"mw-searchButton", :tag_name=>"button"} (Watir::Exception::UnknownObjectException) (eval):1:in `process_watir_call' ./features/step_definitions/search_steps.rb:129:in `block (2 levels) in <top (required)>' ./features/step_definitions/search_steps.rb:114:in `/^I search for (.+)$/' features/full_text_browser.feature:8:in `When I search for <term>' | pickles | Two Words is | in | | | rdir | Two Words is | not in | | | talk:catapult | Talk:Two Words is | not in | | | talk:intitle:words | Talk:Two Words is | not in | | | template:pickles | Template:Template Test is | not in | | | pickles/ | Two Words is | in | | | catapult/pickles | Two Words is | in | | | File:"Screenshot, for test purposes" | File:Savepage-greyed.png is | not in | image | | "JavaScript disabled" | none is | not in | | | "3.1 Conquest of Persian empire" | none is | not in | | | "Succession of Umar edit" | none is | not in | | @setup_main Scenario Outline: Searching for empty-string like values # features/full_text_browser.feature:31 When I search for <term> # features/step_definitions/search_steps.rb:109 Then I am on a page titled <title> # features/step_definitions/page_steps.rb:101 And there are no search results # features/step_definitions/search_steps.rb:385 And there are no errors reported # features/step_definitions/search_steps.rb:450 Examples: | term | title | | the empty string | Search | | ♙ | Search results | | %{exact: } | Search results | | %{exact: } | Search results | | %{exact: } | Search results | @javascript_injection Scenario: Searching for a page with javascript doesn't execute it (in this case, removing the page title) # features/full_text_browser.feature:45 When I search for Javascript findme # features/step_definitions/search_steps.rb:109 Then the title still exists # features/step_definitions/search_steps.rb:464 @file_text Scenario: When you search for text that is in a file, you can find it! # features/full_text_browser.feature:50 When I search for File:debian rhino # features/step_definitions/search_steps.rb:109 Then File:Linux Distribution Timeline text version.pdf is the first search imageresult # features/step_definitions/search_steps.rb:323 @js_and_css Scenario: JS pages don't corrupt the output # features/full_text_browser.feature:55 When I search for User:Tools/some.js jQuery # features/step_definitions/search_steps.rb:109 Then there is not alttitle on the first search result # features/step_definitions/search_steps.rb:370 @js_and_css Scenario: CSS pages don't corrupt the output # features/full_text_browser.feature:60 When I search for User:Tools/some.css jQuery # features/step_definitions/search_steps.rb:109 Then there is not alttitle on the first search result # features/step_definitions/search_steps.rb:370 @setup_main Scenario: Word count is output in the results # features/full_text_browser.feature:65 When I search for Two Words # features/step_definitions/search_steps.rb:109 Then there are search results with (4 words) in the data # features/step_definitions/search_steps.rb:467 @setup_main @filenames Scenario Outline: Portions of file names # features/full_text_browser.feature:70 When I search for <term> # features/step_definitions/search_steps.rb:109 Then I am on a page titled Search results # features/step_definitions/page_steps.rb:101 And <first_result> is the first search imageresult # features/step_definitions/search_steps.rb:323 Examples: | term | first_result | | File:Savepage-greyed.png | File:Savepage-greyed.png | | File:Savepage | File:Savepage-greyed.png | | File:greyed.png | File:Savepage-greyed.png | | File:greyed | File:Savepage-greyed.png | | File:Savepage png | File:Savepage-greyed.png | | File:No_SVG.svg | File:No SVG.svg | | File:No SVG.svg | File:No SVG.svg | | File:No svg | File:No SVG.svg | | File:svg.svg | File:Somethingelse svg SVG.svg | Scenario: Text separated by a <br> tag is not jammed together # features/full_text_browser.feature:86 Given a page named Waffle Squash exists with contents @wafflesquash.txt # features/step_definitions/page_steps.rb:1 And a page named Waffle Squash 2 exists with contents waffle<br>squash # features/step_definitions/page_steps.rb:1 And within 20 seconds searching for Waffle Squash yields Waffle Squash as the first result # features/step_definitions/search_steps.rb:397 And within 20 seconds searching for Waffle Squash 2 yields Waffle Squash 2 as the first result # features/step_definitions/search_steps.rb:397 When I search for wafflesquash # features/step_definitions/search_steps.rb:109 Then there are no search results # features/step_definitions/search_steps.rb:385 @clean @api @setup_main Feature: Searches that contain fuzzy matches Scenario: Searching for <text>~0 activates fuzzy search but with 0 fuzziness (finding a result if the term is corret) # features/fuzzy_api.feature:3 When I api search for ffnonesenseword~0 # features/step_definitions/search_steps.rb:30 Then Two Words is the first api search result # features/step_definitions/search_steps.rb:304 Scenario: Searching for <text>~0 activates fuzzy search but with 0 fuzziness (finding nothing if fuzzy search is required) # features/fuzzy_api.feature:7 When I api search for ffnonesensewor~0 # features/step_definitions/search_steps.rb:30 Then there are no api search results # features/step_definitions/search_steps.rb:388 Scenario: Fuzzy search doesn't find terms that don't match the first two characters for performance reasons # features/fuzzy_api.feature:11 When I api search for fgnonesenseword~ # features/step_definitions/search_steps.rb:30 Then there are no api search results # features/step_definitions/search_steps.rb:388 Scenario: Searching for <text>~ activates fuzzy search # features/fuzzy_api.feature:15 When I api search for ffnonesensewor~ # features/step_definitions/search_steps.rb:30 Then Two Words is the first api search result # features/step_definitions/search_steps.rb:304 Scenario Outline: Searching for <text>~<number between 0 and 1> activates fuzzy search # features/fuzzy_api.feature:19 When I api search for ffnonesensewor~<number> # features/step_definitions/search_steps.rb:30 Then Two Words is the first api search result # features/step_definitions/search_steps.rb:304 Examples: | number | | .8 | | 0.8 | | 1 | @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 # features/go_api.feature:3 When I get api near matches for mixedcapsandlowercase # features/step_definitions/search_steps.rb:93 Then MixedCapsAndLowerCase is the first api search result # features/step_definitions/search_steps.rb:304 Scenario: I can "go" to a page with mixed capital and lower case name by the name with totally wrong case cased # features/go_api.feature:7 When I get api near matches for miXEdcapsandlowercASe # features/step_definitions/search_steps.rb:93 Then MixedCapsAndLowerCase is the first api search result # features/step_definitions/search_steps.rb:304 Scenario: I can "go" to a page with an accented character without the accent # features/go_api.feature:11 When I get api near matches for africa # features/step_definitions/search_steps.rb:93 Then África is the first api search result # features/step_definitions/search_steps.rb:304 @accented_namespace Scenario: I can "go" to a page in a namespace with an accented character without the accent # features/go_api.feature:16 When I get api near matches for mo:test # features/step_definitions/search_steps.rb:93 Then Mó:Test is the first api search result # features/step_definitions/search_steps.rb:304 @accented_namespace Scenario: When I "go" to a page with the namespace specified twice I end up on the search results page # features/go_api.feature:21 When I get api near matches for file:mo:test # features/step_definitions/search_steps.rb:93 Then there are no api search results # features/step_definitions/search_steps.rb:388 @from_core Scenario: I can "go" to a page with mixed capital and lower case name by the name all lower cased and quoted # features/go_api.feature:26 When I get api near matches for "mixedcapsandlowercase" # features/step_definitions/search_steps.rb:93 Then MixedCapsAndLowerCase is the first api search result # features/step_definitions/search_steps.rb:304 @options Scenario Outline: When I near match just one page I go to that page # features/go_api.feature:31 When I get api near matches for <term> Nearmatchflattentest # features/step_definitions/search_steps.rb:93 Then <title> Nearmatchflattentest is the first api search result # features/step_definitions/search_steps.rb:304 Examples: | term | title | | soñ onlyaccent | Soñ Onlyaccent | | son onlyaccent | Soñ Onlyaccent | | Søn Redirecttoomany | Søn Redirecttoomany | | Són Redirecttoomany | Són Redirecttoomany | @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 # features/go_api.feature:42 When I get api near matches for <term> Nearmatchflattentest # features/step_definitions/search_steps.rb:93 Then <title> Nearmatchflattentest is the first api search result # features/step_definitions/search_steps.rb:304 Examples: | term | title | | son | son | | Son | Son | | SON | SON | | soñ | soñ | | Son Nolower | Son Nolower | | son Nolower | Son Nolower | | SON Nolower | SON Nolower | | soñ Nolower | Soñ Nolower | | son Titlecase | Son Titlecase | | Son Titlecase | Son Titlecase | | soñ Titlecase | Soñ Titlecase | | SON Titlecase | Son Titlecase | | soñ twoaccents | Soñ Twoaccents | | són twoaccents | Són Twoaccents | | bach | Bach | | koan | Koan | | son redirect | Son Redirect | | Son Redirectnotbetter | Són Redirectnotbetter | | 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 # features/go_api.feature:69 When I get api near matches for <term> Nearmatchflattentest # features/step_definitions/search_steps.rb:93 Then there are no api search results # features/step_definitions/search_steps.rb:388 Examples: | term | | son twoaccents | | Son Double | | Son Redirecttoomany | @redirect Scenario: When I near match a redirect and a page then the redirect is chosen if it is a better match # features/go_api.feature:79 When I get api near matches for SEO Redirecttest # features/step_definitions/search_steps.rb:93 Then SEO Redirecttest is the first api search result # features/step_definitions/search_steps.rb:304 @clean @go @phantomjs Feature: Go Search @from_core Scenario: I can "go" to a user's page whether it is there or not # features/go_browser.feature:4 When I go search for User:DoesntExist # features/step_definitions/search_steps.rb:6 Then I am on a page titled User:DoesntExist # features/step_definitions/page_steps.rb:101 @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 # features/go_browser.feature:9 When I go search for <term> Nearmatchflattentest # features/step_definitions/search_steps.rb:6 Then I am on a page titled <title> Nearmatchflattentest # features/step_definitions/page_steps.rb:101 Examples: | term | title | | bach | Johann Sebastian Bach | | Søn Redirectnoncompete | Blah Redirectnoncompete | | Soñ Redirectnoncompete | Blah Redirectnoncompete | Scenario: Searching for a string that is a valid mediawiki title but longer than the max prefix search does not fail # features/go_browser.feature:18 When I go search for vdyējūyeyafqhrqtwtfmvvbv不顾要死不活的姑娘风景如小D3:n t q h ra r n q r n q n r q r n w t n ran s g是否能Z或者 Ru 人也不发达噶分湖人奴嗯也能一年时光啊郭德纲)n蜂蜜犹如的还是创始人发布A大股东 # features/step_definitions/search_steps.rb:6 Then there are no search results # features/step_definitions/search_steps.rb:385 @clean @filters @hastemplate @api Feature: Searches with the hastemplate filter Scenario: hastemplate: finds pages with matching templates with namespace specified # features/hastemplate_api.feature:3 When I api search for hastemplate:"Template:Template Test" # features/step_definitions/search_steps.rb:30 Then Two Words is the first api search result # features/step_definitions/search_steps.rb:304 Scenario: hastemplate: finds pages with matching templates that aren't in the template namespace if you prefix them with the namespace # features/hastemplate_api.feature:7 When I api search for hastemplate:"Talk:TalkTemplate" # features/step_definitions/search_steps.rb:30 Then HasTTemplate is the first api search result # features/step_definitions/search_steps.rb:304 Scenario: hastemplate: finds pages which contain a template in the main namespace if they are prefixed with : (which is how you'd transclude them) # features/hastemplate_api.feature:11 When I api search for hastemplate::MainNamespaceTemplate # features/step_definitions/search_steps.rb:30 Then HasMainNSTemplate is the first api search result # features/step_definitions/search_steps.rb:304 Scenario: hastemplate: doesn't find pages which contain a template in the main namespace if you don't prefix the name with : (that is for the Template namespace) # features/hastemplate_api.feature:15 When I api search for hastemplate:MainNamespaceTemplate # features/step_definitions/search_steps.rb:30 Then HasMainNSTemplate is not in the api search results # features/step_definitions/search_steps.rb:373 Scenario: -hastemplate removes pages with matching templates # features/hastemplate_api.feature:19 When I api search for -hastemplate:"Template Test" catapult # features/step_definitions/search_steps.rb:30 Then Two Words is not in the api search results # features/step_definitions/search_steps.rb:373 Scenario: hastemplate: finds pages with matching templates (when you don't specify a namespace, Template is assumed) # features/hastemplate_api.feature:23 When I api search for hastemplate:"Template Test" # features/step_definitions/search_steps.rb:30 Then Two Words is the first api search result # features/step_definitions/search_steps.rb:304 @clean @highlighting @api Feature: Highlighting @setup_main Scenario Outline: Found words are highlighted # features/highlighting_api.feature:4 When I api search for <term> # features/step_definitions/search_steps.rb:30 Then <highlighted_title> is the highlighted title of the first api search result # features/step_definitions/search_steps.rb:363 And <highlighted_text> is the highlighted snippet of the first api search result # features/step_definitions/search_steps.rb:363 Examples: | term | highlighted_title | highlighted_text | | two words | *Two* *Words* | ffnonesenseword catapult pickles anotherword | | pickles | Two Words | ffnonesenseword catapult *pickles* anotherword | | ffnonesenseword pickles | Two Words | *ffnonesenseword* catapult *pickles* anotherword | | two words catapult pickles | *Two* *Words* | ffnonesenseword *catapult* *pickles* anotherword | | template:test pickle | Template:Template *Test* | *pickles* | | Africa test | *África* | for *testing* | | "discuss problems of social and cultural importance" | Rashidun Caliphate | community centers as well where the faithful gathered to *discuss* *problems* *of* *social* *and* *cultural* *importance*. During the caliphate of Umar as many as four thousand | | "discuss problems of social and cultural importance"~ | Rashidun Caliphate | community centers as well where the faithful gathered to *discuss* *problems* *of* *social* *and* *cultural* *importance*. During the caliphate of Umar as many as four thousand | | tallest alborz | Rashidun Caliphate | Mount Damavand, Iran's *tallest* mountain is located in *Alborz* mountain range. | Scenario: Even stopwords are highlighted # features/highlighting_api.feature:23 When I api search for the once and future king # features/step_definitions/search_steps.rb:30 Then *The* *Once* *and* *Future* *King* is the highlighted title of the first api search result # features/step_definitions/search_steps.rb:363 Scenario: Found words are highlighted even if found by different analyzers # features/highlighting_api.feature:27 When I api search for "threatening the unity" community # features/step_definitions/search_steps.rb:30 Then Troubles emerged soon after Abu Bakr's succession, *threatening* *the* *unity* and stability of the new *community* and state. Apostasy had actually begun in the lifetime is the highlighted snippet of the first api search result # features/step_definitions/search_steps.rb:363 @headings Scenario: Found words are highlighted in headings # features/highlighting_api.feature:32 When I api search for "i am a heading" # features/step_definitions/search_steps.rb:30 Then *I* *am* *a* *heading* is the highlighted sectionsnippet of the first api search result # features/step_definitions/search_steps.rb:363 @headings Scenario: References are not included in headings # features/highlighting_api.feature:37 When I api search for "Reference in heading" # features/step_definitions/search_steps.rb:30 Then *Reference* *in* *heading* is the highlighted sectionsnippet of the first api search result # features/step_definitions/search_steps.rb:363 Scenario: Found words are highlighted in headings even in large documents # features/highlighting_api.feature:41 When I api search for "Succession of Umar" # features/step_definitions/search_steps.rb:30 Then *Succession* *of* *Umar* is the highlighted sectionsnippet of the first api search result # features/step_definitions/search_steps.rb:363 Scenario: Found words are highlighted in text even in large documents # features/highlighting_api.feature:45 When I api search for Allowance to non-Muslims # features/step_definitions/search_steps.rb:30 Then *Allowance* *to* *non*-*Muslims* is in the highlighted snippet of the first api search result # features/step_definitions/search_steps.rb:363 Scenario: Found words are highlighted in text even in large documents # features/highlighting_api.feature:49 When I api search for "Allowance to non-Muslims" # features/step_definitions/search_steps.rb:30 Then *Allowance* *to* *non*-*Muslims* is in the highlighted snippet of the first api search result # features/step_definitions/search_steps.rb:363 Scenario: Words are not found in image captions unless there are no matches in the page # features/highlighting_api.feature:53 When I api search for The Rose Trellis Egg # features/step_definitions/search_steps.rb:30 Then *The* *Rose* *Trellis* Faberge *Egg* is a jewelled enameled imperial Easter *egg* made in St. Petersburg, Russia under *the* supervision of *the* jeweler Peter Carl is the highlighted snippet of the first api search result # features/step_definitions/search_steps.rb:363 @headings Scenario: Found words are highlighted in headings even if they contain both a phrase and a non-phrase # features/highlighting_api.feature:58 When I api search for i "am a heading" # features/step_definitions/search_steps.rb:30 Then *I* *am* *a* *heading* is the highlighted sectionsnippet of the first api search result # features/step_definitions/search_steps.rb:363 @headings Scenario: Found words are highlighted in headings when searching for a non-strict phrase # features/highlighting_api.feature:63 When I api search for "i am a heading"~ # features/step_definitions/search_steps.rb:30 Then *I* *am* *a* *heading* is the highlighted sectionsnippet of the first api search result # features/step_definitions/search_steps.rb:363 @headings Scenario: Found words are highlighted in headings even in large documents when searching in a non-strict phrase # features/highlighting_api.feature:68 When I api search for "Succession of Umar"~ # features/step_definitions/search_steps.rb:30 Then *Succession* *of* *Umar* is the highlighted sectionsnippet of the first api search result # features/step_definitions/search_steps.rb:363 Scenario: Found words are highlighted in headings even in large documents when searching in a non-strict phrase # features/highlighting_api.feature:72 When I api search for "Allowance to non-Muslims"~ # features/step_definitions/search_steps.rb:30 Then *Allowance* *to* *non*-*Muslims* is in the highlighted snippet of the first api search result # features/step_definitions/search_steps.rb:363 @headings Scenario: The highest scoring heading is highlighted AND it doesn't contain html even if the heading on the page does # features/highlighting_api.feature:77 When I api search for "bold heading" # features/step_definitions/search_steps.rb:30 Then I am a *bold* *heading* is the highlighted sectionsnippet of the first api search result # features/step_definitions/search_steps.rb:363 @headings Scenario: HTML comments in headings are not highlighted # features/highlighting_api.feature:82 When I api search for "Heading with html comment" # features/step_definitions/search_steps.rb:30 Then *Heading* *with* *html* *comment* is the highlighted sectionsnippet of the first api search result # features/step_definitions/search_steps.rb:363 Scenario: Redirects are highlighted # features/highlighting_api.feature:86 When I api search for rdir # features/step_definitions/search_steps.rb:30 Then *Rdir* is the highlighted redirectsnippet of the first api search result # features/step_definitions/search_steps.rb:363 Scenario: The highest scoring redirect is highlighted # features/highlighting_api.feature:90 When I api search for crazy rdir # features/step_definitions/search_steps.rb:30 Then *Crazy* *Rdir* is the highlighted redirectsnippet of the first api search result # features/step_definitions/search_steps.rb:363 Scenario: Highlighted titles don't contain underscores in the namespace # features/highlighting_api.feature:94 When I api search for user_talk:test # features/step_definitions/search_steps.rb:30 Then User talk:*Test* is the highlighted title of the first api search result # features/step_definitions/search_steps.rb:363 Scenario: Highlighted text prefers the beginning of the article # features/highlighting_api.feature:98 When I api search for Rashidun Caliphate # features/step_definitions/search_steps.rb:30 Then Template:Infobox Former Country Template:History of the Arab States The *Rashidun* *Caliphate* (Template:lang-ar al-khilafat ar-Rāshidīyah), comprising the first is the highlighted snippet of the first api search result # features/step_definitions/search_steps.rb:363 When I api search for caliphs # features/step_definitions/search_steps.rb:30 Then collectively named the Ulema. The first four *caliphs* are called the Rashidun, meaning the Rightly Guided *Caliphs*, because they are believed to have followed is the highlighted snippet of the first api search result # features/step_definitions/search_steps.rb:363 @references Scenario: References don't appear in highlighted section titles # features/highlighting_api.feature:105 When I api search for "Reference Section" # features/step_definitions/search_steps.rb:30 Then *Reference* *Section* is the highlighted sectionsnippet of the first api search result # features/step_definitions/search_steps.rb:363 @references Scenario: References ([1]) don't appear in highlighted text # features/highlighting_api.feature:110 When I api search for Reference Text Highlight Test # features/step_definitions/search_steps.rb:30 Then *Reference* *Text* foo baz bar is the highlighted snippet of the first api search result # features/step_definitions/search_steps.rb:363 @references Scenario: References are highlighted if you search for them # features/highlighting_api.feature:115 When I api search for Reference foo bar baz Highlight Test # features/step_definitions/search_steps.rb:30 Then *Reference* Text *foo* *baz* *bar* is the highlighted snippet of the first api search result # features/step_definitions/search_steps.rb:363 @programmer_friendly Scenario: camelCase is highlighted correctly # features/highlighting_api.feature:120 When I api search for namespace aliases # features/step_definitions/search_steps.rb:30 Then $wg*Namespace**Aliases* is the highlighted title of the first api search result # features/step_definitions/search_steps.rb:363 @file_text Scenario: When you search for text that is in a file if there are no matches on the page you get the highlighted text from the file # features/highlighting_api.feature:125 When I api search for File:debian rhino # features/step_definitions/search_steps.rb:30 Then File:Linux Distribution Timeline text version.pdf is the first api search result # features/step_definitions/search_steps.rb:304 And *Debian* is in the highlighted snippet of the first api search result # features/step_definitions/search_steps.rb:363 And Arco-*Debian* is in the highlighted snippet of the first api search result # features/step_definitions/search_steps.rb:363 And Black*Rhino* is in the highlighted snippet of the first api search result # features/step_definitions/search_steps.rb:363 And the first api search result is a match to file content # features/step_definitions/search_steps.rb:367 @file_text Scenario: When you search for text that is in a file if there are matches on the page you get those # features/highlighting_api.feature:134 When I api search for File:debian rhino linux # features/step_definitions/search_steps.rb:30 Then File:Linux Distribution Timeline text version.pdf is the first api search result # features/step_definitions/search_steps.rb:304 And *Linux* distribution timeline. is the highlighted snippet of the first api search result # features/step_definitions/search_steps.rb:363 @redirect Scenario: Redirects containing &s are highlighted # features/highlighting_api.feature:140 Given a page named Highlight & Ampersand exists with contents #REDIRECT [[Main Page]] # features/step_definitions/page_steps.rb:1 When I api search for Highlight Ampersand # features/step_definitions/search_steps.rb:30 Then *Highlight* & *Ampersand* is the highlighted redirectsnippet of the first api search result # features/step_definitions/search_steps.rb:363 @redirect Scenario: The best matched redirect is highlighted # features/highlighting_api.feature:146 Given a page named Rrrrtest Foorr exists with contents #REDIRECT [[Main Page]] # features/step_definitions/page_steps.rb:1 And a page named Rrrrtest Foorr Barr exists with contents #REDIRECT [[Main Page]] # features/step_definitions/page_steps.rb:1 And a page named Rrrrtest exists with contents #REDIRECT [[Main Page]] # features/step_definitions/page_steps.rb:1 When I api search for Rrrrtest Foorr Barr # features/step_definitions/search_steps.rb:30 Then *Rrrrtest* *Foorr* *Barr* is the highlighted redirectsnippet of the first api search result # features/step_definitions/search_steps.rb:363 @redirect Scenario: Long redirects are highlighted # features/highlighting_api.feature:154 Given a page named Joint Declaration of the Government of the United Kingdom of Great Britain and Northern Ireland and the Government of the People's Republic of China on the Question of Hong Kong exists with contents #REDIRECT [[Main Page]] # features/step_definitions/page_steps.rb:1 When I api search for Joint Declaration of the Government of the United Kingdom of Great Britain and Northern Ireland and the Government of the People's Republic of China on the Question of Hong Kong # features/step_definitions/search_steps.rb:30 Then *Joint* *Declaration* *of* *the* *Government* *of* *the* *United* *Kingdom* *of* *Great* *Britain* *and* *Northern* *Ireland* *and* *the* *Government* *of* *the* *People's* *Republic* *of* *China* *on* *the* *Question* *of* *Hong* *Kong* is the highlighted redirectsnippet of the first api search result # features/step_definitions/search_steps.rb:363 @category Scenario: Category only matches just get a text summary and have the category highlighted in the alttitle # features/highlighting_api.feature:160 When I api search for TemplateTagged # features/step_definitions/search_steps.rb:30 Then ffnonesenseword catapult pickles anotherword is the highlighted snippet of the first api search result # features/step_definitions/search_steps.rb:363 And *TemplateTagged* is the highlighted categorysnippet of the first api search result # features/step_definitions/search_steps.rb:363 @insource Scenario: insource:"" highlights the source # features/highlighting_api.feature:166 When I api search for insource:"p2 Byzantine Empire" # features/step_definitions/search_steps.rb:30 Then |*p2* = *Byzantine* *Empire* is in the highlighted snippet of the first api search result # features/step_definitions/search_steps.rb:363 @insource @regex Scenario: insource:// highlights the source using only the regex # features/highlighting_api.feature:171 When I api search for insource:"a" insource:/b c/ -rashidun # features/step_definitions/search_steps.rb:30 Then a *b c* is in the highlighted snippet of the first api search result # features/step_definitions/search_steps.rb:363 @insource @regex Scenario: insource:// works on multi-byte strings # features/highlighting_api.feature:176 When I api search for insource:"rashidun" insource:/p2 *= Byzantine Empire/ # features/step_definitions/search_steps.rb:30 Then |*p2 = Byzantine Empire* is in the highlighted snippet of the first api search result # features/step_definitions/search_steps.rb:363 @clean @filters @incategory @api Feature: Searches with the incategory filter Scenario: incategory: only includes pages with the category # features/incategory_api.feature:4 When I api search for incategory:weaponry # features/step_definitions/search_steps.rb:30 Then Catapult is in the api search results # features/step_definitions/search_steps.rb:373 And Amazing Catapult is in the api search results # features/step_definitions/search_steps.rb:373 But Two Words is not in the api search results # features/step_definitions/search_steps.rb:373 Scenario: incategory: splits on | to create an OR query # features/incategory_api.feature:10 When I api search for incategory:weaponry|nothing # features/step_definitions/search_steps.rb:30 Then Catapult is in the api search results # features/step_definitions/search_steps.rb:373 And Amazing Catapult is in the api search results # features/step_definitions/search_steps.rb:373 But Two Words is not in the api search results # features/step_definitions/search_steps.rb:373 Scenario Outline: incategory: does not fail when the category is unknown # features/incategory_api.feature:16 When I api search for incategory:<category> # features/step_definitions/search_steps.rb:30 Then there are no api search results # features/step_definitions/search_steps.rb:388 Examples: | category | | doesnotexistatleastihopenot | | id:2147483600 | Scenario: incategory: finds categories by page id # features/incategory_api.feature:24 When I locate the page id of Category:Weaponry and store it as %weaponry_id% # features/step_definitions/search_steps.rb:14 And I api search for incategory:id:%weaponry_id% # features/step_definitions/search_steps.rb:30 Then Catapult is in the api search results # features/step_definitions/search_steps.rb:373 And Amazing Catapult is in the api search results # features/step_definitions/search_steps.rb:373 But Two Words is not in the api search results # features/step_definitions/search_steps.rb:373 Scenario: incategory: works on categories from templates # features/incategory_api.feature:31 When I api search for incategory:templatetagged incategory:twowords # features/step_definitions/search_steps.rb:30 Then Two Words is the first api search result # features/step_definitions/search_steps.rb:304 Scenario: incategory works with multi word categories # features/incategory_api.feature:35 When I api search for incategory:"Categorywith Twowords" # features/step_definitions/search_steps.rb:30 Then Two Words is the first api search result # features/step_definitions/search_steps.rb:304 Scenario: incategory can find categories containing quotes if the quote is escaped # features/incategory_api.feature:39 When I api search for incategory:"Categorywith \" Quote" # features/step_definitions/search_steps.rb:30 Then Two Words is the first api search result # features/step_definitions/search_steps.rb:304 Scenario: incategory can be repeated # features/incategory_api.feature:43 When I api search for incategory:"Categorywith \" Quote" incategory:"Categorywith Twowords" # features/step_definitions/search_steps.rb:30 Then Two Words is the first api search result # features/step_definitions/search_steps.rb:304 Scenario: incategory works with can find two word categories with spaces # features/incategory_api.feature:47 When I api search for incategory:Categorywith_Twowords # features/step_definitions/search_steps.rb:30 Then Two Words is the first api search result # features/step_definitions/search_steps.rb:304 Scenario: incategory: when passed a quoted category that doesn't exist finds nothing even though there is a category that matches one of the words # features/incategory_api.feature:51 When I api search for incategory:"Dontfindme Weaponry" # features/step_definitions/search_steps.rb:30 Then there are no api search results # features/step_definitions/search_steps.rb:388 Scenario: incategory when passed a single word category doesn't find a two word category that contains that word # features/incategory_api.feature:55 When I api search for incategory:ASpace # features/step_definitions/search_steps.rb:30 Then there are no api search results # features/step_definitions/search_steps.rb:388 Scenario: incategory: finds a multiword category when it is surrounded by quotes # features/incategory_api.feature:59 When I api search for incategory:"CategoryWith ASpace" # features/step_definitions/search_steps.rb:30 Then IHaveATwoWordCategory is the first api search result # features/step_definitions/search_steps.rb:304 Scenario: incategory: can be combined with other text # features/incategory_api.feature:63 When I api search for incategory:weaponry amazing # features/step_definitions/search_steps.rb:30 Then Amazing Catapult is the first api search result # features/step_definitions/search_steps.rb:304 Scenario: -incategory: excludes pages with the category # features/incategory_api.feature:67 When I api search for -incategory:weaponry incategory:twowords # features/step_definitions/search_steps.rb:30 Then Two Words is the first api search result # features/step_definitions/search_steps.rb:304 Scenario: incategory: can handle a space after the : # features/incategory_api.feature:71 When I api search for incategory: weaponry # features/step_definitions/search_steps.rb:30 Then Catapult is in the api search results # features/step_definitions/search_steps.rb:373 And Amazing Catapult is in the api search results # features/step_definitions/search_steps.rb:373 But Two Words is not in the api search results # features/step_definitions/search_steps.rb:373 Scenario Outline: incategory: can handle multiple spaces between clauses # features/incategory_api.feature:77 When I api search for incategory:weaponry<spaces>incategory:weaponry # features/step_definitions/search_steps.rb:30 Then Catapult is in the api search results # features/step_definitions/search_steps.rb:373 And Amazing Catapult is in the api search results # features/step_definitions/search_steps.rb:373 And Two Words is not in the api search results # features/step_definitions/search_steps.rb:373 Examples: | spaces | | %{\\u0020}%%{\\u0020}% | | %{\\u0020}%%{\\u0009}% | | %{\\u3000}%%{\\u3000}% | @clean @filters @insource @api Feature: Searches with the insource filter Scenario: insource: only includes pages with the source # features/insource_api.feature:3 When I api search for all:insource:pickles # features/step_definitions/search_steps.rb:30 Then Template:Template Test is in the api search results # features/step_definitions/search_steps.rb:373 But Two Words is not in the api search results # features/step_definitions/search_steps.rb:373 Scenario: insource: can be combined with other text # features/insource_api.feature:8 When I api search for all:insource:catapult two words # features/step_definitions/search_steps.rb:30 Then Two Words is the first api search result # features/step_definitions/search_steps.rb:304 But Template:Template Test is not in the api search results # features/step_definitions/search_steps.rb:373 Scenario: -insource: excludes pages with that in the source # features/insource_api.feature:13 When I api search for all:-insource:pickles pickles # features/step_definitions/search_steps.rb:30 Then Two Words is the first api search result # features/step_definitions/search_steps.rb:304 But Template:Template Test is not in the api search results # features/step_definitions/search_steps.rb:373 Scenario: insource with quotes performs an exact phrase query # features/insource_api.feature:18 When I api search for insource:"catapult Template_Test anotherword" # features/step_definitions/search_steps.rb:30 Then Two Words is the first api search result # features/step_definitions/search_steps.rb:304 Scenario: insource with quotes performs an exact phrase query # features/insource_api.feature:22 When I api search for insource:"catapult anotherword" # features/step_definitions/search_steps.rb:30 Then Two Words is not in the api search results # features/step_definitions/search_steps.rb:373 Scenario: insource with quotes performs an exact phrase query even with escaped quotes # features/insource_api.feature:26 When I api search for insource:"\"catapult Template_Test anotherword\"" # features/step_definitions/search_steps.rb:30 Then Two Words is the first api search result # features/step_definitions/search_steps.rb:304 Scenario: insource with quotes performs an exact phrase query even with escaped quotes # features/insource_api.feature:30 When I api search for insource:"\"catapult anotherword\"" # features/step_definitions/search_steps.rb:30 Then Two Words is not in the api search results # features/step_definitions/search_steps.rb:373 @wildcards Scenario: insource: can take a wildcard # features/insource_api.feature:35 When I api search for all:insource:pickl* # features/step_definitions/search_steps.rb:30 Then Template:Template Test is the first api search result # features/step_definitions/search_steps.rb:304 @regex Scenario: insource:// executes a regular expression # features/insource_api.feature:40 When I api search for all:insource:/kles \[\[Ca/ # features/step_definitions/search_steps.rb:30 Then Template:Template Test is the first api search result # features/step_definitions/search_steps.rb:304 @regex Scenario: insource:// can be combined with other filters # features/insource_api.feature:45 When I api search for asdf insource:/\[\[Category/ # features/step_definitions/search_steps.rb:30 Then Catapult is the first api search result # features/step_definitions/search_steps.rb:304 When I api search for insource:/\[\[Category/ asdf # features/step_definitions/search_steps.rb:30 Then Catapult is the first api search result # features/step_definitions/search_steps.rb:304 @regex Scenario: insource:// finds text inside of template calls # features/insource_api.feature:52 When I api search for insource:/year_end.*=.*661/ # features/step_definitions/search_steps.rb:30 Then Rashidun Caliphate is the first api search result # features/step_definitions/search_steps.rb:304 @regex Scenario: insource:// can find escaped forward slashes # features/insource_api.feature:57 When I api search for insource:/a\/b/ # features/step_definitions/search_steps.rb:30 Then RegexEscapedForwardSlash is the first api search result # features/step_definitions/search_steps.rb:304 @regex Scenario: insource:// can find escaped backslash # features/insource_api.feature:62 When I api search for insource:/a\\b/ # features/step_definitions/search_steps.rb:30 Then RegexEscapedBackslash is the first api search result # features/step_definitions/search_steps.rb:304 @regex Scenario: insource:// can find escaped dots # features/insource_api.feature:67 When I api search for insource:/a\.b/ # features/step_definitions/search_steps.rb:30 Then RegexEscapedDot is the first api search result # features/step_definitions/search_steps.rb:304 @regex Scenario: insource:// can contain spaces # features/insource_api.feature:72 When I api search for RegexSpaces insource:/a b c/ # features/step_definitions/search_steps.rb:30 Then RegexSpaces is the first api search result # features/step_definitions/search_steps.rb:304 @regex Scenario: insource:// can find a url # features/insource_api.feature:77 When I api search for all:insource:/show_bug.cgi\?id=52908/ # features/step_definitions/search_steps.rb:30 Then File:Savepage-greyed.png is the first api search result # features/step_definitions/search_steps.rb:304 @regex Scenario: insource:// is case sensitive by default but can be made case insensitive # features/insource_api.feature:82 When I api search for insource:/a\.B/ # features/step_definitions/search_steps.rb:30 Then there are no api search results # features/step_definitions/search_steps.rb:388 When I api search for insource:/a\.B/i # features/step_definitions/search_steps.rb:30 Then RegexEscapedDot is the first api search result # features/step_definitions/search_steps.rb:304 @regex Scenario: insource:// reports errors sanely # features/insource_api.feature:89 When I api search for all:insource:/[ / # features/step_definitions/search_steps.rb:30 Then this error is reported by api: Regular expression syntax error at 2: expected ']' # features/step_definitions/search_steps.rb:459 @regex Scenario: insource:// doesn't break other clauses # features/insource_api.feature:94 When I api search for insource:/b c/ insource:/a b c/ # features/step_definitions/search_steps.rb:30 Then RegexSpaces is the first api search result # features/step_definitions/search_steps.rb:304 @regex Scenario: insource:// for some complex regexes fails entirely # features/insource_api.feature:99 When I api search for all:insource:/[ab]*a[ab]{50,80}/ # features/step_definitions/search_steps.rb:30 Then this error is reported by api: Regular expression is too complex. Learn more about simplifying it [[mw:Special:MyLanguage/Help:CirrusSearch/RegexTooComplex|here]]. # features/step_definitions/search_steps.rb:459 @regex Scenario: insource:// for other complex regexes finds answers and doesn't spin forever # features/insource_api.feature:104 When I api search for all:insource:/[ab]*a[cd]{50,80}/ # features/step_definitions/search_steps.rb:30 Then RegexComplexResult is the first api search result # features/step_definitions/search_steps.rb:304 @regex Scenario Outline: insource:// accepts multiple spaces between clauses # features/insource_api.feature:109 When I api search for insource:/b c/<spaces>insource:/a b c/ # features/step_definitions/search_steps.rb:30 Then RegexSpaces is the first api search result # features/step_definitions/search_steps.rb:304 Examples: | spaces | | %{\\u0020}%%{\\u0020}% | | %{\\u0020}%%{\\u0009}% | | %{\\u3000}%%{\\u3000}% | @clean @filters @intitle @api Feature: Searches with the intitle filter Scenario: intitle: can be combined with other text # features/intitle_api.feature:3 When I api search for intitle:catapult amazing # features/step_definitions/search_steps.rb:30 Then Amazing Catapult is the first api search result # features/step_definitions/search_steps.rb:304 And Two Words is not in the api search results # features/step_definitions/search_steps.rb:373 @wildcards Scenario: intitle: can take a wildcard # features/intitle_api.feature:9 When I api search for intitle:catapul* # features/step_definitions/search_steps.rb:30 Then Catapult is in the api search results # features/step_definitions/search_steps.rb:373 @wildcards @setup_main Scenario: intitle: can take a wildcard and combine it with a regular wildcard # features/intitle_api.feature:14 When I api search for intitle:catapul* amaz* # features/step_definitions/search_steps.rb:30 Then Amazing Catapult is the first api search result # features/step_definitions/search_steps.rb:304 Scenario: intitle: will accept a space after its : with quoted titles # features/intitle_api.feature:18 When I api search for intitle: "amazing catapult" # features/step_definitions/search_steps.rb:30 Then Amazing Catapult is the first api search result # features/step_definitions/search_steps.rb:304 And Two Words is not in the api search results # features/step_definitions/search_steps.rb:373 Scenario: intitle: with quoted titles performs an exact phrase search # features/intitle_api.feature:23 When I api search for intitle:"links to catapult" # features/step_definitions/search_steps.rb:30 Then Links To Catapult is the first api search result # features/step_definitions/search_steps.rb:304 Scenario: intitle: with quoted titles performs an exact phrase search # features/intitle_api.feature:27 When I api search for intitle:"links catapult" # features/step_definitions/search_steps.rb:30 Then Links To Catapult is not in the api search results # features/step_definitions/search_steps.rb:373 Scenario: intitle: with quoted titles performs an exact phrase search even with escaped quotes # features/intitle_api.feature:31 When I api search for intitle:"\"links to catapult\"" # features/step_definitions/search_steps.rb:30 Then Links To Catapult is the first api search result # features/step_definitions/search_steps.rb:304 Scenario: intitle: with quoted titles performs an exact phrase search even with escaped quote # features/intitle_api.feature:35 When I api search for intitle:"\"links catapult\"" # features/step_definitions/search_steps.rb:30 Then Links To Catapult is not in the api search results # features/step_definitions/search_steps.rb:373 Scenario: intitle: only includes pages with the title # features/intitle_api.feature:39 When I api search for intitle:catapult # features/step_definitions/search_steps.rb:30 Then Catapult is in the api search results # features/step_definitions/search_steps.rb:373 And Amazing Catapult is in the api search results # features/step_definitions/search_steps.rb:373 But Two Words is not in the api search results # features/step_definitions/search_steps.rb:373 Scenario: -intitle: excludes pages with part of the title # features/intitle_api.feature:45 When I api search for -intitle:amazing intitle:catapult # features/step_definitions/search_steps.rb:30 Then Catapult is the first api search result # features/step_definitions/search_steps.rb:304 And Amazing Catapult is not in the api search results # features/step_definitions/search_steps.rb:373 Scenario: -intitle: doesn't highlight excluded title # features/intitle_api.feature:50 When I api search for -intitle:catapult two words # features/step_definitions/search_steps.rb:30 Then Two Words is the first api search result # features/step_definitions/search_steps.rb:304 And ffnonesenseword catapult pickles anotherword is the highlighted snippet of the first api search result # features/step_definitions/search_steps.rb:363 Scenario: intitle: will accept a space after its : # features/intitle_api.feature:55 When I api search for intitle: catapult # features/step_definitions/search_steps.rb:30 Then Catapult is in the api search results # features/step_definitions/search_steps.rb:373 And Amazing Catapult is in the api search results # features/step_definitions/search_steps.rb:373 But Two Words is not in the api search results # features/step_definitions/search_steps.rb:373 Scenario Outline: intitle: will accept multiple spaces between clauses # features/intitle_api.feature:61 When I api search for intitle:catapult<spaces>intitle:catapult # features/step_definitions/search_steps.rb:30 Then Catapult is in the api search results # features/step_definitions/search_steps.rb:373 And Amazing Catapult is in the api search results # features/step_definitions/search_steps.rb:373 But Two Words is not in the api search results # features/step_definitions/search_steps.rb:373 Examples: | spaces | | %{\\u0020}%%{\\u0020}% | | %{\\u0020}%%{\\u0009}% | | %{\\u3000}%%{\\u3000}% | @clean @filters @linksto @api Feature: Searches with the linksto filter Scenario: linksto only includes pages with the links # features/linksto_api.feature:3 When I api search for linksto:"LinksToTest Target" # features/step_definitions/search_steps.rb:30 Then LinksToTest Plain is in the api search results # features/step_definitions/search_steps.rb:373 And LinksToTest OtherText is in the api search results # features/step_definitions/search_steps.rb:373 Scenario: linksto can be combined with other text # features/linksto_api.feature:8 When I api search for linksto:"LinksToTest Target" text # features/step_definitions/search_steps.rb:30 Then LinksToTest OtherText is the first api search result # features/step_definitions/search_steps.rb:304 Scenario: -linksto excludes pages with the link # features/linksto_api.feature:12 When I api search for -linksto:"LinksToTest Target" LinksToTest # features/step_definitions/search_steps.rb:30 Then LinksToTest No Link is in the api search results # features/step_definitions/search_steps.rb:373 But LinksToTest Plain is not in the api search results # features/step_definitions/search_steps.rb:373 Scenario: linksto works on links from templates # features/linksto_api.feature:17 When I api search for linksto:"LinksToTest Target" Using Template # features/step_definitions/search_steps.rb:30 Then LinksToTest Using Template is the first api search result # features/step_definitions/search_steps.rb:304 Scenario: linksto finds links in non-main namespace # features/linksto_api.feature:21 When I api search for linksto:"Template:LinksToTest Template" # features/step_definitions/search_steps.rb:30 Then LinksToTest LinksToTemplate is the first api search result # features/step_definitions/search_steps.rb:304 @clean @more_like_this @api Feature: More like an article Scenario: Searching for morelike:<page that doesn't exist> returns no results # features/more_like_api.feature:3 When I api search for morelike:IDontExist # features/step_definitions/search_steps.rb:30 Then there are no api search results # features/step_definitions/search_steps.rb:388 Scenario: Searching for morelike:<page> returns pages that are "like" that page # features/more_like_api.feature:7 When I api search for morelike:More Like Me 1 # features/step_definitions/search_steps.rb:30 Then More Like Me is in the first api search result # features/step_definitions/search_steps.rb:304 But More Like Me 1 is not in the api search results # features/step_definitions/search_steps.rb:373 Scenario: Searching for morelike:<redirect> returns pages that are "like" the page that it is a redirect to # features/more_like_api.feature:12 When I api search for morelike:More Like Me Rdir # features/step_definitions/search_steps.rb:30 Then More Like Me is in the first api search result # features/step_definitions/search_steps.rb:304 But More Like Me 1 is not in the api search results # features/step_definitions/search_steps.rb:373 @redirect_loop Scenario: Searching for morelike:<redirect in a loop> returns no results # features/more_like_api.feature:18 When I api search for morelike:Redirect Loop # features/step_definitions/search_steps.rb:30 Then there are no api search results # features/step_definitions/search_steps.rb:388 Scenario: Searching for morelike:<page>|<page>|<page> returns pages that are "like" all those pages # features/more_like_api.feature:22 When I api search for morelike:More Like Me 1|More Like Me Set 2 Page 1|More Like Me Set 3 Page 1 # features/step_definitions/search_steps.rb:30 Then More Like Me is part of the api search result # features/step_definitions/search_steps.rb:379 And More Like Me Set 2 is part of the api search result # features/step_definitions/search_steps.rb:379 And More Like Me Set 3 is part of the api search result # features/step_definitions/search_steps.rb:379 But More Like Me 1 is not in the api search results # features/step_definitions/search_steps.rb:373 And More Like Me Set 2 Page 1 is not in the api search results # features/step_definitions/search_steps.rb:373 And More Like Me Set 3 Page 1 is not in the api search results # features/step_definitions/search_steps.rb:373 @clean @phantomjs @setup_main Feature: More like this queries with custom settings Background: # features/more_like_this_options.feature:3 Given I am at a random page # mediawiki_selenium-1.6.3/lib/mediawiki_selenium/step_definitions/navigation_steps.rb:1 @setup_namespaces Scenario: Searching for morelike:<page> with the title field and filtering with the word length # features/more_like_this_options.feature:7 When I set More Like This Options to title field, word length to 3 and I search for morelike:More Like Me 1 # features/step_definitions/search_steps.rb:195 Then More Like Me 2 is in the search results # features/step_definitions/search_steps.rb:376 And More Like Me 3 is in the search results # features/step_definitions/search_steps.rb:376 And More Like Me 4 is in the search results # features/step_definitions/search_steps.rb:376 And More Like Me 5 is in the search results # features/step_definitions/search_steps.rb:376 And More Like Me Set 3 Page 3 is in the search results # features/step_definitions/search_steps.rb:376 But More Like Me 1 is not in the search results # features/step_definitions/search_steps.rb:376 And ChangeMe is not in the search results # features/step_definitions/search_steps.rb:376 Scenario: Searching for morelike:<page> with the title field and filtering with the percent terms to match # features/more_like_this_options.feature:17 When I set More Like This Options to title field, percent terms to match to 0.7 and I search for morelike:More Like Me 1 # features/step_definitions/search_steps.rb:200 Then More Like Me 2 is in the search results # features/step_definitions/search_steps.rb:376 And More Like Me 3 is in the search results # features/step_definitions/search_steps.rb:376 And More Like Me 4 is in the search results # features/step_definitions/search_steps.rb:376 And More Like Me 5 is in the search results # features/step_definitions/search_steps.rb:376 And More Like Me Set 3 Page 3 is in the search results # features/step_definitions/search_steps.rb:376 But More Like Me 1 is not in the search results # features/step_definitions/search_steps.rb:376 And ChangeMe is not in the search results # features/step_definitions/search_steps.rb:376 Scenario: Searching for morelike:<page> with the title field and bad settings give no results # features/more_like_this_options.feature:27 When I set More Like This Options to bad settings and I search for morelike:More Like Me 1 # features/step_definitions/search_steps.rb:205 Then there are no search results # features/step_definitions/search_steps.rb:385 Scenario: Searching for morelike:<page> with the title field and settings with poor precision # features/more_like_this_options.feature:31 When I set More Like This Options to title field, word length to 1 and I search for morelike:More Like Me 1 # features/step_definitions/search_steps.rb:195 Then ChangeMe is in the search results # features/step_definitions/search_steps.rb:376 Scenario: Searching for morelike:<page> with the all field works even if cirrusMtlUseFields is set to yes # features/more_like_this_options.feature:35 When I set More Like This Options to all field, word length to 4 and I search for morelike:More Like Me 1 # features/step_definitions/search_steps.rb:195 Then More Like Me 2 is in the search results # features/step_definitions/search_steps.rb:376 And More Like Me 3 is in the search results # features/step_definitions/search_steps.rb:376 And More Like Me 4 is in the search results # features/step_definitions/search_steps.rb:376 And More Like Me 5 is in the search results # features/step_definitions/search_steps.rb:376 But ChangeMe is not in the search results # features/step_definitions/search_steps.rb:376 @clean @api @phrase_prefix Feature: Searches with a phrase prefix term Scenario: Simple quoted prefix phrases get results # features/phrase_prefix_api.feature:3 When I api search for functional p* # features/step_definitions/search_steps.rb:30 Then Functional programming is the first api search result # features/step_definitions/search_steps.rb:304 And *Functional* *programming* is referential transparency. is the highlighted snippet of the first api search result # features/step_definitions/search_steps.rb:363 @clean @api @prefer_recent Feature: Searches with prefer-recent @expect_failure Scenario Outline: Recently updated articles are prefered if prefer-recent: is specified # features/prefer_recent_api.feature:4 When I api search for PreferRecent First OR Second OR Third # features/step_definitions/search_steps.rb:30 Then PreferRecent Second Second is the first api search result # features/step_definitions/search_steps.rb:304 When I api search for prefer-recent:<options> PreferRecent First OR Second OR Third # features/step_definitions/search_steps.rb:30 Then PreferRecent Third is the first api search result # features/step_definitions/search_steps.rb:304 Examples: | options | | 1,.001 | expected ["PreferRecent Second Second"] to include "PreferRecent Third" (RSpec::Expectations::ExpectationNotMetError) ./features/step_definitions/search_steps.rb:319:in `/^(.+) is( in)? the ((?:[^ ])+(?: or (?:[^ ])+)*) api search result$/' features/prefer_recent_api.feature:8:in `Then PreferRecent Third is the first api search result' | 1,0.001 | expected ["PreferRecent Second Second"] to include "PreferRecent Third" (RSpec::Expectations::ExpectationNotMetError) ./features/step_definitions/search_steps.rb:319:in `/^(.+) is( in)? the ((?:[^ ])+(?: or (?:[^ ])+)*) api search result$/' features/prefer_recent_api.feature:8:in `Then PreferRecent Third is the first api search result' | 1,.0001 | | .99,.0001 | | .99,.001 | expected ["PreferRecent Second Second"] to include "PreferRecent Third" (RSpec::Expectations::ExpectationNotMetError) ./features/step_definitions/search_steps.rb:319:in `/^(.+) is( in)? the ((?:[^ ])+(?: or (?:[^ ])+)*) api search result$/' features/prefer_recent_api.feature:8:in `Then PreferRecent Third is the first api search result' @expect_failure Scenario Outline: You can specify prefer-recent: in such a way that being super recent isn't enough # features/prefer_recent_api.feature:18 When I api search for prefer-recent:<options> PreferRecent First OR Second OR Third # features/step_definitions/search_steps.rb:30 Then PreferRecent Second Second is the first api search result # features/step_definitions/search_steps.rb:304 Examples: | options | | | | 1 | | 1,1 | | 1,.1 | | .4,.0001 | @clean @api @prefix_filter Feature: Searches with a prefix filter Scenario: The prefix: filter interprets spaces literally # features/prefix_api.feature:3 When I api search for prefix prefix:prefix tes # features/step_definitions/search_steps.rb:30 Then Prefix Test is the first api search result # features/step_definitions/search_steps.rb:304 Scenario: The prefix: filter interprets underscores as spaces # features/prefix_api.feature:7 When I api search for prefix prefix:prefix_tes # features/step_definitions/search_steps.rb:30 Then Prefix Test is the first api search result # features/step_definitions/search_steps.rb:304 Scenario: It is ok to start the query with the prefix filter # features/prefix_api.feature:11 When I api search for prefix:prefix tes # features/step_definitions/search_steps.rb:30 Then Prefix Test is the first api search result # features/step_definitions/search_steps.rb:304 Scenario: It is ok to specify an empty prefix filter # features/prefix_api.feature:15 When I api search for prefix test prefix: # features/step_definitions/search_steps.rb:30 Then Prefix Test is the first api search result # features/step_definitions/search_steps.rb:304 Scenario: The prefix: filter can be used to apply a namespace and a title prefix # features/prefix_api.feature:19 When I api search for prefix:talk:prefix tes # features/step_definitions/search_steps.rb:30 Then Talk:Prefix Test is the first api search result # features/step_definitions/search_steps.rb:304 But Prefix Test is not in the api search results # features/step_definitions/search_steps.rb:373 Scenario: The prefix: filter can be used to apply a namespace without a title prefix # features/prefix_api.feature:24 When I api search for prefix test prefix:talk: # features/step_definitions/search_steps.rb:30 Then Talk:Prefix Test is the first api search result # features/step_definitions/search_steps.rb:304 But Prefix Test is not in the api search results # features/step_definitions/search_steps.rb:373 Scenario: The prefix: filter can apply a namespace containing a space # features/prefix_api.feature:29 When I api search for prefix test prefix:user talk: # features/step_definitions/search_steps.rb:30 Then User talk:Prefix Test is the first api search result # features/step_definitions/search_steps.rb:304 But Prefix Test is not in the api search results # features/step_definitions/search_steps.rb:373 Scenario: The prefix: filter can apply a namespace containing an underscore # features/prefix_api.feature:34 When I api search for prefix test prefix:user_talk: # features/step_definitions/search_steps.rb:30 Then User talk:Prefix Test is the first api search result # features/step_definitions/search_steps.rb:304 But Prefix Test is not in the api search results # features/step_definitions/search_steps.rb:373 Scenario: The prefix: filter can be used to filter to subpages # features/prefix_api.feature:39 When I api search for prefix test aaaa prefix:Prefix Test/ # features/step_definitions/search_steps.rb:30 Then Prefix Test/AAAA is the first api search result # features/step_definitions/search_steps.rb:304 But Prefix Test AAAA is not in the api search results # features/step_definitions/search_steps.rb:373 Scenario: The prefix: filter can be used to filter to subpages starting with some title # features/prefix_api.feature:44 When I api search for prefix test aaaa prefix:Prefix Test/aa # features/step_definitions/search_steps.rb:30 Then Prefix Test/AAAA is the first api search result # features/step_definitions/search_steps.rb:304 But Prefix Test AAAA is not in the api search results # features/step_definitions/search_steps.rb:373 Scenario: The prefix: filter can be quoted # features/prefix_api.feature:49 When I api search for prefix test prefix:"user_talk:" # features/step_definitions/search_steps.rb:30 Then User talk:Prefix Test is the first api search result # features/step_definitions/search_steps.rb:304 But Prefix Test is not in the api search results # features/step_definitions/search_steps.rb:373 Scenario: The prefix: filter doesn't find redirects # features/prefix_api.feature:54 When I api search for prefix:Prefix Test Redirec # features/step_definitions/search_steps.rb:30 Then there are no api search results # features/step_definitions/search_steps.rb:388 Scenario: The prefix: filter filters results to those with titles prefixed by value # features/prefix_api.feature:58 When I api search for prefix prefix:prefix # features/step_definitions/search_steps.rb:30 Then Prefix Test is the first api search result # features/step_definitions/search_steps.rb:304 But Foo Prefix Test is not in the api search results # features/step_definitions/search_steps.rb:373 @clean @phantomjs @prefix_filter Feature: Searches with a prefix filter Background: # features/prefix_browser.feature:3 Given I am at a random page # mediawiki_selenium-1.6.3/lib/mediawiki_selenium/step_definitions/navigation_steps.rb:1 Scenario: You can add the prefix to the url # features/prefix_browser.feature:6 When I am at the search results page with the search prefix and the prefix prefix # features/step_definitions/search_steps.rb:3 Then Prefix Test is the first search result # features/step_definitions/search_steps.rb:281 But Foo Prefix Test is not in the search results # features/step_definitions/search_steps.rb:376 @clean @api @prefix Feature: Prefix search via api Scenario: Suggestions don't appear when you search for a string that is too long # features/prefix_search_api.feature:3 When I get api suggestions for 贵州省瞬时速度团头鲂身体c实施ysstsstsg说tyttxy以推销员会同香港推广系统在同他讨厌她团体淘汰>赛系统大选于它拥有一天天用于与体育学院国ttxzyttxtxytdttyyyztdsytstsstxtttd天天体育系统的摄像头听到他他偷笑>偷笑太阳团体杏眼桃腮他要tttxx y贵州省瞬时速度团头鲂身体c实施ysstsstsg说tyttxy以推销员会同香港推广系统在同他讨厌她团体淘汰>赛系统大选于它拥有一天天用于与体育学院国ttxzyttxtxytdttyyyztdsytstsstxtttd天天体育系统的摄像头听到他他偷笑>偷笑太阳团体杏眼桃腮他要tttxx y # features/step_definitions/search_steps.rb:53 unexpected HTTP response (400) (MediawikiApi::HttpError) ./features/support/cirrus_search_api_helper.rb:39:in `suggestions_for' ./features/step_definitions/search_steps.rb:55:in `/^I get api suggestions for (.*)$/' features/prefix_search_api.feature:4:in `When I get api suggestions for 贵州省瞬时速度团头鲂身体c实施ysstsstsg说tyttxy以推销员会同香港推广系统在同他讨厌她团体淘汰>赛系统大选于它拥有一天天用于与体育学院国ttxzyttxtxytdttyyyztdsytstsstxtttd天天体育系统的摄像头听到他他偷笑>偷笑太阳团体杏眼桃腮他要tttxx y贵州省瞬时速度团头鲂身体c实施ysstsstsg说tyttxy以推销员会同香港推广系统在同他讨厌她团体淘汰>赛系统大选于它拥有一天天用于与体育学院国ttxzyttxtxytdttyyyztdsytstsstxtttd天天体育系统的摄像头听到他他偷笑>偷笑太阳团体杏眼桃腮他要tttxx y' Then the api warns Prefix search request was longer than the maximum allowed length. (288 > 255) # features/step_definitions/search_steps.rb:226 @redirect Scenario: Prefix search lists page name if both redirect and page name match # features/prefix_search_api.feature:8 When I get api suggestions for Redirecttest Y # features/step_definitions/search_steps.rb:53 Then Redirecttest Yay is the first api suggestion # features/step_definitions/search_steps.rb:230 And Redirecttest Yikes is not in the api suggestions # features/step_definitions/search_steps.rb:258 @redirect Scenario: Prefix search ranks redirects under title matches # features/prefix_search_api.feature:14 When I get api suggestions for PrefixRedirectRanking # features/step_definitions/search_steps.rb:53 Then PrefixRedirectRanking 1 is the first api suggestion # features/step_definitions/search_steps.rb:230 And PrefixRedirectRanking 2 is the second api suggestion # features/step_definitions/search_steps.rb:230 @accent_squashing Scenario Outline: Search suggestions with accents # features/prefix_search_api.feature:20 When I get api suggestions for <term> # features/step_definitions/search_steps.rb:53 Then <first_suggestion> is the first api suggestion # features/step_definitions/search_steps.rb:230 And <second_suggestion> is the second api suggestion # features/step_definitions/search_steps.rb:230 Examples: | term | first_suggestion | second_suggestion | | Áccent Sorting | Áccent Sorting | Accent Sorting | | áccent Sorting | Áccent Sorting | Accent Sorting | | Accent Sorting | Accent Sorting | Áccent Sorting | | accent Sorting | Accent Sorting | Áccent Sorting | Scenario: Searching for a bare namespace finds everything in the namespace # features/prefix_search_api.feature:31 Given a page named Template talk:Foo exists # features/step_definitions/page_steps.rb:1 And within 20 seconds api searching for Template talk:Foo yields Template talk:Foo as the first result # features/step_definitions/search_steps.rb:403 When I get api suggestions for template talk: # features/step_definitions/search_steps.rb:53 Then Template talk:Foo is in the api suggestions # features/step_definitions/search_steps.rb:258 Scenario Outline: Search suggestions # features/prefix_search_api.feature:37 When I get api suggestions for <term> # features/step_definitions/search_steps.rb:53 Then <first_result> is the first api suggestion # features/step_definitions/search_steps.rb:230 And the api should offer to search for pages containing <term> # features/step_definitions/search_steps.rb:60 When I get api near matches for <term> # features/step_definitions/search_steps.rb:93 Then <title> is the first api search result # features/step_definitions/search_steps.rb:304 Examples: | term | first_result | title | | catapult | Catapult | Catapult | | catapul | Catapult | none | | two words | Two Words | Two Words | | ~catapult | none | none | | Template:Template Test | Template:Template Test | Template:Template Test | | l'or | L'Oréal | none | | l or | L'Oréal | none | | L'orea | L'Oréal | none | | L'Oréal | L'Oréal | L'Oréal | | L’Oréal | L'Oréal | L'Oréal | | L Oréal | L'Oréal | L'Oréal | | Jean-Yves Le Drian | Jean-Yves Le Drian | Jean-Yves Le Drian | | Jean Yves Le Drian | Jean-Yves Le Drian | Jean-Yves Le Drian | @redirect Scenario: Prefix search includes redirects # features/prefix_search_api.feature:62 When I get api suggestions for SEO Redirecttest # features/step_definitions/search_steps.rb:53 Then SEO Redirecttest is the first api suggestion # features/step_definitions/search_steps.rb:230 When I get api near matches for SEO Redirecttest # features/step_definitions/search_steps.rb:93 Then SEO Redirecttest is the first api search result # features/step_definitions/search_steps.rb:304 @redirect Scenario: Prefix search includes redirects for pages outside the main namespace # features/prefix_search_api.feature:69 When I get api suggestions for User_talk:SEO Redirecttest # features/step_definitions/search_steps.rb:53 Then User talk:SEO Redirecttest is the first api suggestion # features/step_definitions/search_steps.rb:230 When I get api near matches for User_talk:SEO Redirecttest # features/step_definitions/search_steps.rb:93 Then User talk:SEO Redirecttest is the first api search result # features/step_definitions/search_steps.rb:304 @accent_squashing @accented_namespace Scenario Outline: Search suggestions with accents # features/prefix_search_api.feature:76 When I get api suggestions for <term> # features/step_definitions/search_steps.rb:53 Then <first_result> is the first api suggestion # features/step_definitions/search_steps.rb:230 And the api should offer to search for pages containing <term> # features/step_definitions/search_steps.rb:60 When I get api near matches for <term> # features/step_definitions/search_steps.rb:93 Then <title> is the first api search result # features/step_definitions/search_steps.rb:304 Examples: | term | first_result | title | | África | África | África | | Africa | África | África | | AlphaBeta | AlphaBeta | AlphaBeta | | ÁlphaBeta | AlphaBeta | AlphaBeta | | Mó:Test | Mó:Test | Mó:Test | | Mo:Test | Mó:Test | Mó:Test | | file:Mo:Test | none | none | @clean @api @relevancy Feature: Results are ordered from most relevant to least. Scenario: Words in order are worth more then words out of order # features/relevancy_api.feature:3 When I api search for Relevancytwo Wordtest # features/step_definitions/search_steps.rb:30 Then Relevancytwo Wordtest is the first api search result # features/step_definitions/search_steps.rb:304 And Wordtest Relevancytwo is the second api search result # features/step_definitions/search_steps.rb:304 Scenario: Results are sorted based on namespace: main, talk, file, help, file talk, etc # features/relevancy_api.feature:8 When I api search for all:Relevancynamespacetest # features/step_definitions/search_steps.rb:30 Then Relevancynamespacetest is the first api search result # features/step_definitions/search_steps.rb:304 And Talk:Relevancynamespacetest is the second api search result # features/step_definitions/search_steps.rb:304 And File:Relevancynamespacetest is the third api search result # features/step_definitions/search_steps.rb:304 And Help:Relevancynamespacetest is the fourth api search result # features/step_definitions/search_steps.rb:304 And File talk:Relevancynamespacetest is the fifth api search result # features/step_definitions/search_steps.rb:304 And User talk:Relevancynamespacetest is the sixth api search result # features/step_definitions/search_steps.rb:304 And Template:Relevancynamespacetest is the seventh api search result # features/step_definitions/search_steps.rb:304 Scenario: When the user doesn't set a language are sorted with wiki language ahead of other languages # features/relevancy_api.feature:18 When I api search for Relevancylanguagetest # features/step_definitions/search_steps.rb:30 Then Relevancylanguagetest/en is the first api search result # features/step_definitions/search_steps.rb:304 Scenario: Redirects count as incoming links # features/relevancy_api.feature:22 Given a page named Relevancyredirecttest Smaller exists with contents Relevancyredirecttest A text text text text text text text text text text text text text # features/step_definitions/page_steps.rb:1 And a page named Relevancyredirecttest Smaller/A exists with contents [[Relevancyredirecttest Smaller]] # features/step_definitions/page_steps.rb:1 And a page named Relevancyredirecttest Smaller/B exists with contents [[Relevancyredirecttest Smaller]] # features/step_definitions/page_steps.rb:1 And a page named Relevancyredirecttest Larger exists with contents Relevancyredirecttest B text text text text text text text text text text text text text # features/step_definitions/page_steps.rb:1 And a page named Relevancyredirecttest Larger/Redirect exists with contents #REDIRECT [[Relevancyredirecttest Larger]] # features/step_definitions/page_steps.rb:1 And a page named Relevancyredirecttest Larger/A exists with contents [[Relevancyredirecttest Larger]] # features/step_definitions/page_steps.rb:1 And a page named Relevancyredirecttest Larger/B exists with contents [[Relevancyredirecttest Larger/Redirect]] # features/step_definitions/page_steps.rb:1 And a page named Relevancyredirecttest Larger/C exists with contents [[Relevancyredirecttest Larger/Redirect]] # features/step_definitions/page_steps.rb:1 Then within 20 seconds api searching for Relevancyredirecttest yields Relevancyredirecttest Larger as the first result and Relevancyredirecttest Smaller as the second result # features/step_definitions/search_steps.rb:403 # Note that this test can fail spuriously in two ways: # 1. If the required pages are created as part of the hook for @relevancy its quite possible for the large influx # of jobs to cause the counting jobs to not pick up all the counts. I'm not super sure why that is but moving the # creation into its own section makes it pretty consistent. # 2. Its quite possible for the second result to be deeper in the result list for a few seconds after the pages are # created. It gets its position updated by the link counting job which has to wait for refreshing and undelaying. Scenario: Results are sorted based on what part of the page matches: title, redirect, category, etc # features/relevancy_api.feature:39 When I api search with disabled incoming link weighting for Relevancytest # features/step_definitions/search_steps.rb:30 Then Relevancytest is the first api search result # features/step_definitions/search_steps.rb:304 And Relevancytestviaredirect is the second api search result # features/step_definitions/search_steps.rb:304 And Relevancytestviacategory is the third api search result # features/step_definitions/search_steps.rb:304 And Relevancytestviaheading is the fourth api search result # features/step_definitions/search_steps.rb:304 And Relevancytestviaopening is the fifth api search result # features/step_definitions/search_steps.rb:304 And Relevancytestviatext is the sixth or seventh api search result # features/step_definitions/search_steps.rb:304 And Relevancytestviaauxtext is the sixth or seventh api search result # features/step_definitions/search_steps.rb:304 Scenario: Results are sorted based on what part of the page matches: title, redirect, category, etc # features/relevancy_api.feature:49 When I api search with disabled incoming link weighting for "Relevancytestphrase phrase" # features/step_definitions/search_steps.rb:30 Then Relevancytestphrase phrase is the first api search result # features/step_definitions/search_steps.rb:304 And Relevancytestphraseviaredirect is the second api search result # features/step_definitions/search_steps.rb:304 And Relevancytestphraseviacategory is the third api search result # features/step_definitions/search_steps.rb:304 And Relevancytestphraseviaheading is the fourth api search result # features/step_definitions/search_steps.rb:304 And Relevancytestphraseviaopening is the fifth api search result # features/step_definitions/search_steps.rb:304 And Relevancytestphraseviatext is the sixth or seventh api search result # features/step_definitions/search_steps.rb:304 And Relevancytestphraseviaauxtext is the sixth or seventh api search result # features/step_definitions/search_steps.rb:304 Scenario: When the user has a language results are sorted with user language ahead of wiki language ahead of other languages # features/relevancy_api.feature:59 When I api search in the ja language for Relevancylanguagetest # features/step_definitions/search_steps.rb:30 Then Relevancylanguagetest/ja is the first api search result # features/step_definitions/search_steps.rb:304 And Relevancylanguagetest/en is the second api search result # features/step_definitions/search_steps.rb:304 And Relevancylanguagetest/ar is the third api search result # features/step_definitions/search_steps.rb:304 Scenario: Incoming links count in page weight # features/relevancy_api.feature:65 Given a page named Relevancylinktest Smaller exists # features/step_definitions/page_steps.rb:1 And a page named Relevancylinktest Larger Extraword exists # features/step_definitions/page_steps.rb:1 And a page named Relevancylinktest Larger/Link A exists with contents [[Relevancylinktest Larger Extraword]] # features/step_definitions/page_steps.rb:1 And a page named Relevancylinktest Larger/Link B exists with contents [[Relevancylinktest Larger Extraword]] # features/step_definitions/page_steps.rb:1 And a page named Relevancylinktest Larger/Link C exists with contents [[Relevancylinktest Larger Extraword]] # features/step_definitions/page_steps.rb:1 And a page named Relevancylinktest Larger/Link D exists with contents [[Relevancylinktest Larger Extraword]] # features/step_definitions/page_steps.rb:1 When within 20 seconds api searching for Relevancylinktest -intitle:link yields Relevancylinktest Larger Extraword as the first result and Relevancylinktest Smaller as the second result # features/step_definitions/search_steps.rb:403 And I api search with disabled incoming link weighting for Relevancylinktest -intitle:link # features/step_definitions/search_steps.rb:30 Then Relevancylinktest Smaller is the first api search result # features/step_definitions/search_steps.rb:304 And Relevancylinktest Larger Extraword is the second api search result # features/step_definitions/search_steps.rb:304 # This test can fail spuriously for the same reasons that "Redirects count as incoming links" can fail Scenario: Results are sorted based on how close the match is # features/relevancy_api.feature:78 When I api search with disabled incoming link weighting for Relevancyclosetest Foô # features/step_definitions/search_steps.rb:30 Then Relevancyclosetest Foô is the first api search result # features/step_definitions/search_steps.rb:304 And Relevancyclosetest Foo is the second api search result # features/step_definitions/search_steps.rb:304 And Foo Relevancyclosetest is the third api search result # features/step_definitions/search_steps.rb:304 Scenario: Results are sorted based on how close the match is (backwards this time) # features/relevancy_api.feature:84 When I api search with disabled incoming link weighting for Relevancyclosetest Foo # features/step_definitions/search_steps.rb:30 Then Relevancyclosetest Foo is the first api search result # features/step_definitions/search_steps.rb:304 And Relevancyclosetest Foô is the second api search result # features/step_definitions/search_steps.rb:304 And Foo Relevancyclosetest is the third api search result # features/step_definitions/search_steps.rb:304 @clean @api @setup_main @removed_text Feature: Removed text Scenario: Searching fox text that is inside <video> and <audio> tags doesn't find it # features/removed_text_api.feature:3 When I api search for "JavaScript disabled" # features/step_definitions/search_steps.rb:30 Then there are no api search results # features/step_definitions/search_steps.rb:388 Scenario: Searching fox text that is inside autocollapse tags doesn't find it # features/removed_text_api.feature:7 When I api search for in autocollapse # features/step_definitions/search_steps.rb:30 Then there are no api search results # features/step_definitions/search_steps.rb:388 # # This file is subject to the license terms in the COPYING file found in the # CirrusSearch top-level directory and at # https://git.wikimedia.org/blob/mediawiki%2Fextensions%2FCirrusSearch/HEAD/COPYING. No part of # CirrusSearch, including this file, may be copied, modified, propagated, or # distributed except according to the terms contained in the COPYING file. # # Copyright 2012-2014 by the Mediawiki developers. See the CREDITS file in the # CirrusSearch top-level directory and at # https://git.wikimedia.org/blob/mediawiki%2Fextensions%2FCirrusSearch/HEAD/CREDITS # @clean @firefox @test2.wikipedia.org @phantomjs @smoke Feature: Smoke test @en.wikipedia.beta.wmflabs.org Scenario: Search suggestions # features/smoke.feature:16 Given I am at a random page # mediawiki_selenium-1.6.3/lib/mediawiki_selenium/step_definitions/navigation_steps.rb:1 When I search for: main # features/step_definitions/simple_search_steps.rb:12 Then a list of suggested pages should appear # features/step_definitions/simple_search_steps.rb:16 And Main Page should be the first result # features/step_definitions/simple_search_steps.rb:23 @expect_failure Scenario: Fill in search term and click search # features/smoke.feature:23 Given I am at a random page # mediawiki_selenium-1.6.3/lib/mediawiki_selenium/step_definitions/navigation_steps.rb:1 When I search for: ma # features/step_definitions/simple_search_steps.rb:12 And I click the search button # features/step_definitions/search_steps.rb:106 Then I should land on Search Results page # features/step_definitions/simple_search_steps.rb:19 @en.wikipedia.beta.wmflabs.org Scenario: Search with accent yields result page with accent # features/smoke.feature:30 Given I am at a random page # mediawiki_selenium-1.6.3/lib/mediawiki_selenium/step_definitions/navigation_steps.rb:1 When I search for África # features/step_definitions/search_steps.rb:109 Then the page I arrive on has title África # features/step_definitions/simple_search_steps.rb:27 # # This file is subject to the license terms in the COPYING file found in the # CirrusSearch top-level directory and at # https://git.wikimedia.org/blob/mediawiki%2Fextensions%2FCirrusSearch/HEAD/COPYING. No part of # CirrusSearch, including this file, may be copied, modified, propagated, or # distributed except according to the terms contained in the COPYING file. # # Copyright 2012-2014 by the Mediawiki developers. See the CREDITS file in the # CirrusSearch top-level directory and at # https://git.wikimedia.org/blob/mediawiki%2Fextensions%2FCirrusSearch/HEAD/CREDITS # @api @suggest Feature: Suggestion API test Scenario: Search suggestions # features/suggest_api.feature:15 When I ask suggestion API for main # features/step_definitions/search_steps.rb:63 Then the API should produce list containing Main Page # features/step_definitions/search_steps.rb:77 Scenario: Created pages suggestions # features/suggest_api.feature:19 When I ask suggestion API for x-m # features/step_definitions/search_steps.rb:63 Then the API should produce list containing X-Men # features/step_definitions/search_steps.rb:77 Scenario: Nothing to suggest # features/suggest_api.feature:23 When I ask suggestion API for jabberwocky # features/step_definitions/search_steps.rb:63 Then the API should produce empty list # features/step_definitions/search_steps.rb:90 Scenario: Ordering # features/suggest_api.feature:27 When I ask suggestion API for x-m # features/step_definitions/search_steps.rb:63 Then the API should produce list starting with X-Men # features/step_definitions/search_steps.rb:84 Scenario: Fuzzy # features/suggest_api.feature:31 When I ask suggestion API for xmen # features/step_definitions/search_steps.rb:63 Then the API should produce list starting with X-Men # features/step_definitions/search_steps.rb:84 Scenario Outline: Search redirects shows the best redirect # features/suggest_api.feature:35 When I ask suggestion API for <term> # features/step_definitions/search_steps.rb:63 Then the API should produce list containing <suggested> # features/step_definitions/search_steps.rb:77 Examples: | term | suggested | | eise | Eisenhardt, Max | | max | Max Eisenhardt | | magnetu | Magneto | Scenario Outline: Search prefers exact match over fuzzy match # features/suggest_api.feature:44 When I ask suggestion API for <term> # features/step_definitions/search_steps.rb:63 Then the API should produce list starting with <suggested> # features/step_definitions/search_steps.rb:84 Examples: | term | suggested | | max | Max Eisenhardt | | mai | Main Page | | eis | Eisenhardt, Max | Scenario Outline: Search prefers exact db match over partial prefix match # features/suggest_api.feature:53 When I ask suggestion API at most 2 items for <term> # features/step_definitions/search_steps.rb:70 Then the API should produce list starting with <first> # features/step_definitions/search_steps.rb:84 And the API should produce list containing <other> # features/step_definitions/search_steps.rb:77 Examples: | term | first | other | | Ic | Iceman | Ice | | Ice | Ice | Iceman | Scenario: Ordering & limit # features/suggest_api.feature:62 When I ask suggestion API at most 1 item for x-m # features/step_definitions/search_steps.rb:70 Then the API should produce list starting with X-Men # features/step_definitions/search_steps.rb:84 And the API should produce list of length 1 # features/step_definitions/search_steps.rb:87 Scenario Outline: Search fallback to prefix search if namespace is provided # features/suggest_api.feature:67 When I ask suggestion API for <term> # features/step_definitions/search_steps.rb:63 Then the API should produce list starting with <suggested> # features/step_definitions/search_steps.rb:84 Examples: | term | suggested | | Special: | Special:ActiveUsers | | Special:Act | Special:ActiveUsers | @clean @api @update Feature: Search backend updates Scenario: Deleted pages are removed from the index # features/update_general_api.feature:3 Given a page named DeleteMe exists # features/step_definitions/page_steps.rb:1 Then within 20 seconds api searching for DeleteMe yields DeleteMe as the first result # features/step_definitions/search_steps.rb:403 When I delete DeleteMe # features/step_definitions/page_steps.rb:35 Then within 20 seconds api searching for DeleteMe yields none as the first result # features/step_definitions/search_steps.rb:403 Scenario: Deleted redirects are removed from the index # features/update_general_api.feature:9 Given a page named DeleteMeRedirect exists with contents #REDIRECT [[DeleteMe]] # features/step_definitions/page_steps.rb:1 And a page named DeleteMe exists # features/step_definitions/page_steps.rb:1 Then within 20 seconds api searching for DeleteMeRedirect yields DeleteMe as the first result # features/step_definitions/search_steps.rb:403 When I delete DeleteMeRedirect # features/step_definitions/page_steps.rb:35 Then within 20 seconds api searching for DeleteMeRedirect yields none as the first result # features/step_definitions/search_steps.rb:403 Scenario: Altered pages are updated in the index # features/update_general_api.feature:16 Given a page named ChangeMe exists with contents foo # features/step_definitions/page_steps.rb:1 When I edit ChangeMe to add superduperchangedme # features/step_definitions/page_steps.rb:46 Then within 20 seconds api searching for superduperchangedme yields ChangeMe as the first result # features/step_definitions/search_steps.rb:403 Scenario: Pages containing altered template are updated in the index # features/update_general_api.feature:21 Given a page named Template:ChangeMe exists with contents foo # features/step_definitions/page_steps.rb:1 And a page named ChangeMyTemplate exists with contents {{Template:ChangeMe}} # features/step_definitions/page_steps.rb:1 When I edit Template:ChangeMe to add superduperultrachangedme # features/step_definitions/page_steps.rb:46 Then within 20 seconds api searching for superduperultrachangedme yields ChangeMyTemplate as the first result # features/step_definitions/search_steps.rb:403 Scenario: Really really long links don't break updates # features/update_general_api.feature:27 When a page named ReallyLongLink%{epoch} exists with contents @really_long_link.txt # features/step_definitions/page_steps.rb:1 Then within 20 seconds api searching for ReallyLongLink%{epoch} yields ReallyLongLink%{epoch} as the first result # features/step_definitions/search_steps.rb:403 # This test doesn't rely on our paranoid revision delete handling logic, rather, it verifies what should work with the # logic with a similar degree of paranoia Scenario: When a revision is deleted the page is updated regardless of if the revision is current # features/update_general_api.feature:33 Given a page named RevDelTest exists with contents first # features/step_definitions/page_steps.rb:1 And a page named RevDelTest exists with contents delete this revision # features/step_definitions/page_steps.rb:1 And within 20 seconds api searching for intitle:RevDelTest "delete this revision" yields RevDelTest as the first result # features/step_definitions/search_steps.rb:403 And a page named RevDelTest exists with contents current revision # features/step_definitions/page_steps.rb:1 When I delete the second most recent revision via api of RevDelTest # features/step_definitions/page_steps.rb:59 Then within 20 seconds api searching for intitle:RevDelTest "delete this revision" yields none as the first result # features/step_definitions/search_steps.rb:403 When I api search for intitle:RevDelTest current revision # features/step_definitions/search_steps.rb:30 Then RevDelTest is the first api search result # features/step_definitions/search_steps.rb:304 @move Scenario: Moved pages that leave a redirect are updated in the index # features/update_general_api.feature:44 Given a page named Move%{epoch} From2 exists with contents move me # features/step_definitions/page_steps.rb:1 And within 20 seconds api searching for Move%{epoch} From2 yields Move%{epoch} From2 as the first result # features/step_definitions/search_steps.rb:403 When I move Move%{epoch} From2 to Move%{epoch} To2 and do not leave a redirect via api # features/step_definitions/page_steps.rb:90 Then within 20 seconds api searching for Move%{epoch} From2 yields none as the first result # features/step_definitions/search_steps.rb:403 And within 20 seconds api searching for Move%{epoch} To2 yields Move%{epoch} To2 as the first result # features/step_definitions/search_steps.rb:403 @move Scenario: Moved pages that switch indexes are removed from their old index if they leave a redirect # features/update_general_api.feature:52 Given a page named Move%{epoch} From3 exists with contents move me # features/step_definitions/page_steps.rb:1 And within 20 seconds api searching for Move%{epoch} From3 yields Move%{epoch} From3 as the first result # features/step_definitions/search_steps.rb:403 When I move Move%{epoch} From3 to User:Move%{epoch} To3 and leave a redirect via api # features/step_definitions/page_steps.rb:90 Then within 20 seconds api searching for User:Move%{epoch} To3 yields User:Move%{epoch} To3 as the first result # features/step_definitions/search_steps.rb:403 And within 20 seconds api searching for Move%{epoch} From3 yields none as the first result # features/step_definitions/search_steps.rb:403 @move Scenario: Moved pages that switch indexes are removed from their old index if they don't leave a redirect # features/update_general_api.feature:60 Given a page named Move%{epoch} From4 exists with contents move me # features/step_definitions/page_steps.rb:1 And within 20 seconds api searching for Move%{epoch} From4 yields Move%{epoch} From4 as the first result # features/step_definitions/search_steps.rb:403 When I move Move%{epoch} From4 to User:Move%{epoch} To4 and do not leave a redirect via api # features/step_definitions/page_steps.rb:90 Then within 20 seconds api searching for User:Move%{epoch} To4 yields User:Move%{epoch} To4 as the first result # features/step_definitions/search_steps.rb:403 And within 20 seconds api searching for Move%{epoch} To4 yields none as the first result # features/step_definitions/search_steps.rb:403 @clean @non_existent @api @update Feature: Search backend updates that reference nonexistent pages Scenario: Pages that link to nonexistent pages still get their search index updated # features/update_non_existent_api.feature:3 Given a page named IDontExist doesn't exist # features/step_definitions/page_steps.rb:31 And a page named ILinkToNonExistentPages%{epoch} exists with contents [[IDontExist]] # features/step_definitions/page_steps.rb:1 Then within 10 seconds api searching for ILinkToNonExistentPages%{epoch} yields ILinkToNonExistentPages%{epoch} as the first result # features/step_definitions/search_steps.rb:403 Scenario: Pages that redirect to nonexistent pages don't throw errors # features/update_non_existent_api.feature:8 Given a page named IDontExist doesn't exist # features/step_definitions/page_steps.rb:31 When a page named IRedirectToNonExistentPages%{epoch} exists with contents #REDIRECT [[IDontExist]] # features/step_definitions/page_steps.rb:1 Scenario: Linking to a nonexistent page doesn't add it to the search index with an [INVALID] word count # features/update_non_existent_api.feature:12 Given a page named ILinkToNonExistentPages%{epoch} exists with contents [[IDontExistLink%{epoch}]] # features/step_definitions/page_steps.rb:1 Then within 20 seconds api searching for IDontExistLink%{epoch} yields ILinkToNonExistentPages%{epoch} as the first result # features/step_definitions/search_steps.rb:403 And there are no api search results with [INVALID] words in the data # features/step_definitions/search_steps.rb:475 When a page named IDontExistLink%{epoch} exists # features/step_definitions/page_steps.rb:1 Then within 10 seconds api searching for IDontExistLink%{epoch} yields IDontExistLink%{epoch} as the first result # features/step_definitions/search_steps.rb:403 And there are no api search results with [INVALID] words in the data # features/step_definitions/search_steps.rb:475 Scenario: Redirecting to a non-existing page doesn't add it to the search index with an [INVALID] word count # features/update_non_existent_api.feature:20 Given a page named IRedirectToNonExistentPages%{epoch} exists with contents #REDIRECT [[IDontExistRdir%{epoch}]] # features/step_definitions/page_steps.rb:1 When wait 5 seconds for the index to get the page # features/step_definitions/general_steps.rb:1 And I api search for IDontExistRdir%{epoch} # features/step_definitions/search_steps.rb:30 And there are no api search results with [INVALID] words in the data # features/step_definitions/search_steps.rb:475 And a page named IDontExistRdir%{epoch} exists # features/step_definitions/page_steps.rb:1 Then within 10 seconds api searching for IDontExistRdir%{epoch} yields IDontExistRdir%{epoch} as the first result # features/step_definitions/search_steps.rb:403 And there are no api search results with [INVALID] words in the data # features/step_definitions/search_steps.rb:475 Scenario: Linking to a page that redirects to a non-existing page doesn't add it to the search index with an [INVALID] word count # features/update_non_existent_api.feature:29 Given a page named IRedirectToNonExistentPagesLinked%{epoch} exists with contents #REDIRECT [[IDontExistRdirLinked%{epoch}]] # features/step_definitions/page_steps.rb:1 And a page named ILinkIRedirectToNonExistentPages%{epoch} exists with contents [[IRedirectToNonExistentPagesLinked%{epoch}]] # features/step_definitions/page_steps.rb:1 When wait 5 seconds for the index to get the page # features/step_definitions/general_steps.rb:1 And I api search for IDontExistRdir%{epoch} # features/step_definitions/search_steps.rb:30 And there are no api search results with [INVALID] words in the data # features/step_definitions/search_steps.rb:475 When a page named IDontExistRdirLinked%{epoch} exists # features/step_definitions/page_steps.rb:1 Then within 10 seconds api searching for IDontExistRdirLinked%{epoch} yields IDontExistRdirLinked%{epoch} as the first result # features/step_definitions/search_steps.rb:403 And there are no api search results with [INVALID] words in the data # features/step_definitions/search_steps.rb:475 @clean @api @redirect @update Feature: Updating a page from or to a redirect @expect_failure Scenario: Turning a page into a redirect removes it from the search index # features/update_redirect_api.feature:4 Given a page named RedirectTarget exists # features/step_definitions/page_steps.rb:1 When a page named ToBeRedirect%{epoch} exists # features/step_definitions/page_steps.rb:1 Then within 20 seconds api searching for ToBeRedirect%{epoch} yields ToBeRedirect%{epoch} as the first result # features/step_definitions/search_steps.rb:403 When a page named ToBeRedirect%{epoch} exists with contents #REDIRECT [[RedirectTarget]] # features/step_definitions/page_steps.rb:1 Then within 20 seconds api searching for ToBeRedirect%{epoch} yields RedirectTarget as the first result # features/step_definitions/search_steps.rb:403 And ToBeRedirect%{epoch} is not in the api search results # features/step_definitions/search_steps.rb:373 Scenario: Turning a page from a redirect to a regular page puts it in the index # features/update_redirect_api.feature:12 Given a page named RedirectTarget exists # features/step_definitions/page_steps.rb:1 When a page named StartsAsRedirect%{epoch} exists with contents #REDIRECT [[RedirectTarget]] # features/step_definitions/page_steps.rb:1 Then within 20 seconds api searching for StartsAsRedirect%{epoch} yields RedirectTarget as the first result # features/step_definitions/search_steps.rb:403 When a page named StartsAsRedirect%{epoch} exists # features/step_definitions/page_steps.rb:1 Then within 20 seconds api searching for StartsAsRedirect%{epoch} yields StartsAsRedirect%{epoch} as the first result # features/step_definitions/search_steps.rb:403 And RedirectTarget is not in the api search results # features/step_definitions/search_steps.rb:373 @clean @phantomjs @update @redirect_loop Feature: Search backend updates containing redirect loops Scenario: Pages that redirect to themself don't throw errors # features/update_redirect_loop.feature:3 Then a page named IAmABad RedirectSelf%{epoch} exists with contents #REDIRECT [[IAmABad RedirectSelf%{epoch}]] # features/step_definitions/page_steps.rb:1 # The actual creation of the pages will fails if redirect loops fails Scenario: Pages that form a redirect chain don't throw errors # features/update_redirect_loop.feature:7 When a page named IAmABad RedirectChain%{epoch} A exists with contents #REDIRECT [[IAmABad RedirectChain%{epoch} B]] # features/step_definitions/page_steps.rb:1 And a page named IAmABad RedirectChain%{epoch} B exists with contents #REDIRECT [[IAmABad RedirectChain%{epoch} C]] # features/step_definitions/page_steps.rb:1 And a page named IAmABad RedirectChain%{epoch} C exists with contents #REDIRECT [[IAmABad RedirectChain%{epoch} D]] # features/step_definitions/page_steps.rb:1 Then a page named IAmABad RedirectChain%{epoch} D exists with contents #REDIRECT [[IAmABad RedirectChain%{epoch} A]] # features/step_definitions/page_steps.rb:1 And a page named IAmABad RedirectChain%{epoch} B exists with contents #REDIRECT [[IAmABad RedirectChain%{epoch} D]] # features/step_definitions/page_steps.rb:1 @clean @api @update @weight Feature: Page updates trigger appropriate weight updates in newly linked and unlinked articles # Note that these tests can be a bit flakey if you don't use Redis and checkDelay because they count using # Elasticsearch which delays all updates for around a second. So if the jobs run too fast they won't work. # Redis and checkDelay fix this by forcing a delay. Scenario: Pages weights are updated when new pages link to them # features/update_weight_api.feature:6 Given a page named WeightedLink%{epoch} 1 exists # features/step_definitions/page_steps.rb:1 And a page named WeightedLink%{epoch} 2/1 exists with contents [[WeightedLink%{epoch} 2]] # features/step_definitions/page_steps.rb:1 And a page named WeightedLink%{epoch} 2 exists # features/step_definitions/page_steps.rb:1 Then within 20 seconds api searching for WeightedLink%{epoch} yields WeightedLink%{epoch} 2 as the first result # features/step_definitions/search_steps.rb:403 When a page named WeightedLink%{epoch} 1/1 exists with contents [[WeightedLink%{epoch} 1]] # features/step_definitions/page_steps.rb:1 And a page named WeightedLink%{epoch} 1/2 exists with contents [[WeightedLink%{epoch} 1]] # features/step_definitions/page_steps.rb:1 Then within 20 seconds api searching for WeightedLink%{epoch} yields WeightedLink%{epoch} 1 as the first result # features/step_definitions/search_steps.rb:403 Scenario: Pages weights are updated when links are removed from them # features/update_weight_api.feature:15 Given a page named WeightedLinkRemoveUpdate%{epoch} 1/1 exists with contents [[WeightedLinkRemoveUpdate%{epoch} 1]] # features/step_definitions/page_steps.rb:1 And a page named WeightedLinkRemoveUpdate%{epoch} 1/2 exists with contents [[WeightedLinkRemoveUpdate%{epoch} 1]] # features/step_definitions/page_steps.rb:1 And a page named WeightedLinkRemoveUpdate%{epoch} 1 exists # features/step_definitions/page_steps.rb:1 And a page named WeightedLinkRemoveUpdate%{epoch} 2/1 exists with contents [[WeightedLinkRemoveUpdate%{epoch} 2]] # features/step_definitions/page_steps.rb:1 And a page named WeightedLinkRemoveUpdate%{epoch} 2 exists # features/step_definitions/page_steps.rb:1 Then within 20 seconds api searching for WeightedLinkRemoveUpdate%{epoch} yields WeightedLinkRemoveUpdate%{epoch} 1 as the first result # features/step_definitions/search_steps.rb:403 When a page named WeightedLinkRemoveUpdate%{epoch} 1/1 exists with contents [[Junk]] # features/step_definitions/page_steps.rb:1 And a page named WeightedLinkRemoveUpdate%{epoch} 1/2 exists with contents [[Junk]] # features/step_definitions/page_steps.rb:1 Then within 20 seconds api searching for WeightedLinkRemoveUpdate%{epoch} yields WeightedLinkRemoveUpdate%{epoch} 2 as the first result # features/step_definitions/search_steps.rb:403 Scenario: Pages weights are updated when new pages link to their redirects # features/update_weight_api.feature:26 Given a page named WeightedLinkRdir%{epoch} 1/Redirect exists with contents #REDIRECT [[WeightedLinkRdir%{epoch} 1]] # features/step_definitions/page_steps.rb:1 And a page named WeightedLinkRdir%{epoch} 1 exists # features/step_definitions/page_steps.rb:1 And a page named WeightedLinkRdir%{epoch} 2/Redirect exists with contents #REDIRECT [[WeightedLinkRdir%{epoch} 2]] # features/step_definitions/page_steps.rb:1 And a page named WeightedLinkRdir%{epoch} 2/1 exists with contents [[WeightedLinkRdir%{epoch} 2/Redirect]] # features/step_definitions/page_steps.rb:1 And a page named WeightedLinkRdir%{epoch} 2 exists # features/step_definitions/page_steps.rb:1 Then within 20 seconds api searching for WeightedLinkRdir%{epoch} yields WeightedLinkRdir%{epoch} 2 as the first result # features/step_definitions/search_steps.rb:403 When a page named WeightedLinkRdir%{epoch} 1/1 exists with contents [[WeightedLinkRdir%{epoch} 1/Redirect]] # features/step_definitions/page_steps.rb:1 And a page named WeightedLinkRdir%{epoch} 1/2 exists with contents [[WeightedLinkRdir%{epoch} 1/Redirect]] # features/step_definitions/page_steps.rb:1 Then within 20 seconds api searching for WeightedLinkRdir%{epoch} yields WeightedLinkRdir%{epoch} 1 as the first result # features/step_definitions/search_steps.rb:403 Scenario: Pages weights are updated when links are removed from their redirects # features/update_weight_api.feature:37 Given a page named WLRURdir%{epoch} 1/1 exists with contents [[WLRURdir%{epoch} 1/Redirect]] # features/step_definitions/page_steps.rb:1 And a page named WLRURdir%{epoch} 1/2 exists with contents [[WLRURdir%{epoch} 1/Redirect]] # features/step_definitions/page_steps.rb:1 And a page named WLRURdir%{epoch} 1/Redirect exists with contents #REDIRECT [[WLRURdir%{epoch} 1]] # features/step_definitions/page_steps.rb:1 And a page named WLRURdir%{epoch} 1 exists # features/step_definitions/page_steps.rb:1 And a page named WLRURdir%{epoch} 2/Redirect exists with contents #REDIRECT [[WLRURdir%{epoch} 2]] # features/step_definitions/page_steps.rb:1 And a page named WLRURdir%{epoch} 2/1 exists with contents [[WLRURdir%{epoch} 2/Redirect]] # features/step_definitions/page_steps.rb:1 And a page named WLRURdir%{epoch} 2 exists # features/step_definitions/page_steps.rb:1 Then within 20 seconds api searching for WLRURdir%{epoch} yields WLRURdir%{epoch} 1 as the first result # features/step_definitions/search_steps.rb:403 When a page named WLRURdir%{epoch} 1/1 exists with contents [[Junk]] # features/step_definitions/page_steps.rb:1 And a page named WLRURdir%{epoch} 1/2 exists with contents [[Junk]] # features/step_definitions/page_steps.rb:1 Then within 20 seconds api searching for WLRURdir%{epoch} yields WLRURdir%{epoch} 2 as the first result # features/step_definitions/search_steps.rb:403 Scenario: Redirects to redirects don't count in the score # features/update_weight_api.feature:50 Given a page named WLDoubleRdir%{epoch} 1/Redirect exists with contents #REDIRECT [[WLDoubleRdir%{epoch} 1]] # features/step_definitions/page_steps.rb:1 And a page named WLDoubleRdir%{epoch} 1/Redirect Redirect exists with contents #REDIRECT [[WLDoubleRdir%{epoch} 1/Redirect]] # features/step_definitions/page_steps.rb:1 And a page named WLDoubleRdir%{epoch} 1/1 exists with contents [[WLDoubleRdir%{epoch} 1/Redirect Redirect]] # features/step_definitions/page_steps.rb:1 And a page named WLDoubleRdir%{epoch} 1/2 exists with contents [[WLDoubleRdir%{epoch} 1/Redirect Redirect]] # features/step_definitions/page_steps.rb:1 And a page named WLDoubleRdir%{epoch} 1 exists # features/step_definitions/page_steps.rb:1 And a page named WLDoubleRdir%{epoch} 2/Redirect exists with contents #REDIRECT [[WLDoubleRdir%{epoch} 2]] # features/step_definitions/page_steps.rb:1 And a page named WLDoubleRdir%{epoch} 2/1 exists with contents [[WLDoubleRdir%{epoch} 2/Redirect]] # features/step_definitions/page_steps.rb:1 And a page named WLDoubleRdir%{epoch} 2/2 exists with contents [[WLDoubleRdir%{epoch} 2/Redirect]] # features/step_definitions/page_steps.rb:1 And a page named WLDoubleRdir%{epoch} 2 exists # features/step_definitions/page_steps.rb:1 Then within 20 seconds api searching for WLDoubleRdir%{epoch} yields WLDoubleRdir%{epoch} 2 as the first result # features/step_definitions/search_steps.rb:403 @clean @api @wildcard Feature: Searches that contain wildcard matches Scenario Outline: Wildcards match plain matches # features/wildcard_api.feature:3 When I api search for pi<wildcard>les # features/step_definitions/search_steps.rb:30 Then Two Words is the first api search result # features/step_definitions/search_steps.rb:304 Examples: | wildcard | | * | | ?k | | c? | Scenario Outline: Wildcards don't match stemmed matches # features/wildcard_api.feature:12 When I api search for pi<wildcard>kle # features/step_definitions/search_steps.rb:30 Then there are no api search results # features/step_definitions/search_steps.rb:388 Examples: | wildcard | | * | | ?k | Scenario Outline: Wildcards in leading intitle: terms match # features/wildcard_api.feature:20 When I api search for intitle:functiona<wildcard> intitle:programming # features/step_definitions/search_steps.rb:30 Then Functional programming is the first api search result # features/step_definitions/search_steps.rb:304 Examples: | wildcard | | * | | ? | Scenario Outline: Wildcard suffixes in trailing intitle: terms match stemmed matches # features/wildcard_api.feature:28 When I api search for intitle:functional intitle:programmin<wildcard> # features/step_definitions/search_steps.rb:30 Then Functional programming is the first api search result # features/step_definitions/search_steps.rb:304 Examples: | wildcard | | * | | ? | Scenario Outline: Wildcards within trailing intitle: terms match stemmed matches # features/wildcard_api.feature:36 When I api search for intitle:functional intitle:prog<wildcard>amming # features/step_definitions/search_steps.rb:30 Then Functional programming is the first api search result # features/step_definitions/search_steps.rb:304 Examples: | wildcard | | * | | ? | Scenario Outline: Searching with a single wildcard finds expected results # features/wildcard_api.feature:44 When I api search for catapu<wildcard> # features/step_definitions/search_steps.rb:30 Then Catapult is in the api search results # features/step_definitions/search_steps.rb:373 Examples: | wildcard | | * | | ?t | | l? | Scenario: Searching with a complex wildcard query fails # features/wildcard_api.feature:53 When I api search for d*e*a*d*l*y*w*i*l*d*c*a*r*d*d*e*a*d*l*y*w*i*l*d*c*a*r*d*d*e*a*d*l*y*w*i*l*d*c*a*r*d*d*e*a*d*w*i*l*d*c*a*r*d* # features/step_definitions/search_steps.rb:30 Then this error is reported by api: Regular expression is too complex. Learn more about simplifying it [[mw:Special:MyLanguage/Help:CirrusSearch/RegexTooComplex|here]]. # features/step_definitions/search_steps.rb:459 Failing Scenarios: cucumber features/commonterms_api.feature:24 # Scenario: The aggressive recall profile will display results even if some words are missing cucumber features/full_text_browser.feature:7 # Scenario: Query string search cucumber features/prefer_recent_api.feature:4 # Scenario: Recently updated articles are prefered if prefer-recent: is specified cucumber features/prefer_recent_api.feature:4 # Scenario: Recently updated articles are prefered if prefer-recent: is specified cucumber features/prefer_recent_api.feature:4 # Scenario: Recently updated articles are prefered if prefer-recent: is specified cucumber features/prefix_search_api.feature:3 # Scenario: Suggestions don't appear when you search for a string that is too long 577 scenarios (6 failed, 571 passed) 1834 steps (6 failed, 4 skipped, 1824 passed) 16m38.611s ~/Documents/gerrit/mediawiki/vagrant/mediawiki/extensions/CirrusSearch/tests/browser$