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

Change subject: Chore: add slash page test to wiki and summary tests
......................................................................

Chore: add slash page test to wiki and summary tests

Add tests for the slash article. RESTBase itself does not support this
specific page when used with a revision except through its redirect
which doesn't seem worth special casing.

Unsupported by RESTBase (the last case is supported by Marvin):

  https://en.wikipedia.org/api/rest_v1/page/mobile-sections///803604755
  https://en.wikipedia.org/api/rest_v1/page/mobile-sections/%2f/803604755
  https://en.wikipedia.org/api/rest_v1/page/mobile-sections//

Supported by RESTBase and Marvin:

  
https://en.wikipedia.org/api/rest_v1/page/mobile-sections/Slash_(punctuation)/803604755
  https://en.wikipedia.org/api/rest_v1/page/mobile-sections/Slash_(punctuation)
  https://en.wikipedia.org/api/rest_v1/page/mobile-sections/%2f

Bug: T177870
Change-Id: Ia63927569a946fe8f524d5135c107f1e519f0844
---
M src/common/routers/api.test.ts
1 file changed, 18 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/marvin refs/changes/09/384109/1

diff --git a/src/common/routers/api.test.ts b/src/common/routers/api.test.ts
index a1023b0..1af1f34 100644
--- a/src/common/routers/api.test.ts
+++ b/src/common/routers/api.test.ts
@@ -109,6 +109,18 @@
         params: { title: "title/text", revision: "123456789" }
       },
       {
+        name: "wiki (title is a slash)",
+        route: wiki,
+        path: "/wiki//",
+        params: { title: "/", revision: undefined }
+      },
+      {
+        name: "wiki (title is a slash, revision)",
+        route: wiki,
+        path: "/wiki///123456789/",
+        params: { title: "/", revision: "123456789" }
+      },
+      {
         name: "wiki (title with every supported character class)",
         route: wiki,
         path: "/wiki/ %!\"$&'()*,-./0:;=?@A\\^_`a~\x80+",
@@ -145,6 +157,12 @@
         params: { title: "title" }
       },
       {
+        name: "summary (title is a slash)",
+        route: summary,
+        path: "/page/summary//",
+        params: { title: "/" }
+      },
+      {
         name: "summary (title with slash and trailing slash)",
         route: summary,
         path: "/page/summary/title/text/",

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia63927569a946fe8f524d5135c107f1e519f0844
Gerrit-PatchSet: 1
Gerrit-Project: marvin
Gerrit-Branch: master
Gerrit-Owner: Niedzielski <sniedziel...@wikimedia.org>
Gerrit-Reviewer: Sniedzielski <sniedziel...@wikimedia.org>

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

Reply via email to