Manybubbles has uploaded a new change for review.

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


Change subject: Tests for redirect scoring.
......................................................................

Tests for redirect scoring.

Some tests are disabled due to a bug they found.

Written for Bug: 54784

Change-Id: I6abc4229090ef82927cab40c7380a539197155ba
---
M tests/browser/features/updates.feature
1 file changed, 44 insertions(+), 5 deletions(-)


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

diff --git a/tests/browser/features/updates.feature 
b/tests/browser/features/updates.feature
index e25a148..4844bff 100644
--- a/tests/browser/features/updates.feature
+++ b/tests/browser/features/updates.feature
@@ -38,7 +38,7 @@
     Then I am on a page titled IAmABad RedirectSelf%{epoch}
 
   @redirect_loop
-  Scenario: Pages that redirect to themself don't throw errors
+  Scenario: Pages that form a redirect chain don't throw errors
     When a page named IAmABad RedirectChain%{epoch} A exists with contents 
#REDIRECT [[IAmABad RedirectChain%{epoch} B]]
     And a page named IAmABad RedirectChain%{epoch} B exists with contents 
#REDIRECT [[IAmABad RedirectChain%{epoch} C]]
     And a page named IAmABad RedirectChain%{epoch} C exists with contents 
#REDIRECT [[IAmABad RedirectChain%{epoch} D]]
@@ -55,8 +55,20 @@
     And WeightedLink%{epoch} 2 is the first search result
     When a page named WeightedLink%{epoch} 1/1 exists with contents 
[[WeightedLink%{epoch} 1]]
     And a page named WeightedLink%{epoch} 1/2 exists with contents 
[[WeightedLink%{epoch} 1]]
-    And I search for WeightedLink%{epoch}
-    Then WeightedLink%{epoch} 1 is the first search result
+    Then within 75 seconds searching for WeightedLink%{epoch} yields 
WeightedLink%{epoch} 1 as the first result
+
+  #Bug 54793
+  # Scenario: Pages weights are updated when links are removed from them
+  #   Given a page named WeightedLinkRemoveUpdate%{epoch} 1/1 exists with 
contents [[WeightedLinkRemoveUpdate%{epoch} 1]]
+  #   And a page named WeightedLinkRemoveUpdate%{epoch} 1/2 exists with 
contents [[WeightedLinkRemoveUpdate%{epoch} 1]]
+  #   And a page named WeightedLinkRemoveUpdate%{epoch} 1 exists
+  #   And a page named WeightedLinkRemoveUpdate%{epoch} 2/1 exists with 
contents [[WeightedLinkRemoveUpdate%{epoch} 2]]
+  #   And a page named WeightedLinkRemoveUpdate%{epoch} 2 exists
+  #   And I search for WeightedLinkRemoveUpdate%{epoch}
+  #   And WeightedLinkRemoveUpdate%{epoch} 1 is the first search result
+  #   When a page named WeightedLinkRemoveUpdate%{epoch} 1/1 exists with 
contents [[Junk]]
+  #   And a page named WeightedLinkRemoveUpdate%{epoch} 1/2 exists with 
contents [[Junk]]
+  #   Then within 75 seconds searching for WeightedLinkRemoveUpdate%{epoch} 
yields WeightedLinkRemoveUpdate%{epoch} 2 as the first result
 
   Scenario: Pages weights are updated when new pages link to their redirects
     Given a page named WeightedLinkRdir%{epoch} 1/Redirect exists with 
contents #REDIRECT [[WeightedLinkRdir%{epoch} 1]]
@@ -68,5 +80,32 @@
     And WeightedLinkRdir%{epoch} 2 is the first search result
     When a page named WeightedLinkRdir%{epoch} 1/1 exists with contents 
[[WeightedLinkRdir%{epoch} 1/Redirect]]
     And a page named WeightedLinkRdir%{epoch} 1/2 exists with contents 
[[WeightedLinkRdir%{epoch} 1/Redirect]]
-    And I search for WeightedLinkRdir%{epoch}
-    Then WeightedLinkRdir%{epoch} 1 is the first search result
+    Then within 75 seconds searching for WeightedLinkRdir%{epoch} yields 
WeightedLinkRdir%{epoch} 1 as the first result
+
+  #Bug 54793
+  # Scenario: Pages weights are updated when links are removed from their 
redirects
+  #   Given a page named WLRURdir%{epoch} 1/1 exists with contents 
[[WLRURdir%{epoch} 1/Redirect]]
+  #   And a page named WLRURdir%{epoch} 1/2 exists with contents 
[[WLRURdir%{epoch} 1/Redirect]]
+  #   And a page named WLRURdir%{epoch} 1/Redirect exists with contents 
#REDIRECT [[WLRURdir%{epoch} 1]]
+  #   And a page named WLRURdir%{epoch} 1 exists
+  #   And a page named WLRURdir%{epoch} 2/Redirect exists with contents 
#REDIRECT [[WLRURdir%{epoch} 2]]
+  #   And a page named WLRURdir%{epoch} 2/1 exists with contents 
[[WLRURdir%{epoch} 2/Redirect]]
+  #   And a page named WLRURdir%{epoch} 2 exists
+  #   And I search for WLRURdir%{epoch}
+  #   And WLRURdir%{epoch} 1 is the first search result
+  #   When a page named WLRURdir%{epoch} 1/1 exists with contents [[Junk]]
+  #   And a page named WLRURdir%{epoch} 1/2 exists with contents [[Junk]]
+  #   Then within 75 seconds searching for WLRURdir%{epoch} yields 
WLRURdir%{epoch} 2 as the first result
+
+  Scenario: Redirects to redirects don't count in the score
+    Given a page named WLDoubleRdir%{epoch} 1/Redirect exists with contents 
#REDIRECT [[WLDoubleRdir%{epoch} 1]]
+    And a page named WLDoubleRdir%{epoch} 1/Redirect Redirect exists with 
contents #REDIRECT [[WLDoubleRdir%{epoch} 1/Redirect]]
+    And a page named WLDoubleRdir%{epoch} 1/1 exists with contents 
[[WLDoubleRdir%{epoch} 1/Redirect Redirect]]
+    And a page named WLDoubleRdir%{epoch} 1/2 exists with contents 
[[WLDoubleRdir%{epoch} 1/Redirect Redirect]]
+    And a page named WLDoubleRdir%{epoch} 1 exists
+    And a page named WLDoubleRdir%{epoch} 2/Redirect exists with contents 
#REDIRECT [[WLDoubleRdir%{epoch} 2]]
+    And a page named WLDoubleRdir%{epoch} 2/1 exists with contents 
[[WLDoubleRdir%{epoch} 2/Redirect]]
+    And a page named WLDoubleRdir%{epoch} 2/2 exists with contents 
[[WLDoubleRdir%{epoch} 2/Redirect]]
+    And a page named WLDoubleRdir%{epoch} 2 exists
+    When I search for WLDoubleRdir%{epoch}
+    Then WLDoubleRdir%{epoch} 2 is the first search result

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

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

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

Reply via email to