Template:Find sources/testcases

Group 2 – Using search term to change the default search
By default, the pagename is used as the argument to find sources. This can be altered with the use of a search term after the first pipe.

Group 3 – param 'domain'
Article on medical topics get a different set of links generated by find medical sources rather than the regular template.

Group 4 – WikiProject autodetection
These tests rely on using Talk header/sandbox transcluding the "Find sources" wrapper template (Find sources/sandbox to choose the right domain-specific "find sources" template. Because these tests depend on using the WikiProjects listed in the Talk header template at the top of an article page, they cannot be tested in the normal way. You can either add a Talk header to the top of *this* page, and test in Preview mode, or test in Preview mode at the Talk pages of actual articles which have the appropriate Talk page headers and WikiProject listings. In the latter case, edit the Talk page header, find the transclusion of  (normally at the top of the page) and change it to, and observe the "find sources" links that are generated in each case. (If the page you're testing doesn't have a header, then just add  at the top of the page, and Preview it.)

Any article Talk page with the correct header and projects may be used for this; the list below contains some suggested Talk pages with the correct WikiProjects on it to validate the test case. After viewing the test case result in Preview mode on the page, it's best to cancel out and not save the altered page.


 * Articles including project Video games

⟶ Expected result: these should employ find video games sources in Preview mode, after you've made the change described above:


 * Talk:Darkwing Duck (Capcom video game)
 * Talk:Illyriad
 * Talk:Microsoft Flight Simulator (2020 video game)


 * Articles including project Medicine

⟶ Expected result: these should employ find medical sources in Preview mode, after you've made the change described above:


 * Talk:Giardiasis
 * Talk:Myelodysplastic syndrome
 * Talk:Amoxicillin
 * Talk:Major depressive disorder


 * Articles including project Biography

⟶ Expected result: these should employ find biographical sources in Preview mode, after you've made the change described above:


 * Talk:Edgar Poe
 * Talk:Anne Brontë
 * Talk:Charlotte Brontë


 * Articles that include combinations of projects – medical & biographical:

Currently, pages linking both medical and biographical WikiProjects will show only medical source links by default.


 * Talk:Álvaro Luiz Maior de Aquino


 * Other articles not including any of the projects above

⟶ Expected result: these should default to the standard find sources list in Preview mode, after you've made the change described above; in other words, the same set of links will be present before and after the change:

(chosen from Special:Random)


 * Talk:Great Fransham
 * Talk:Internal energy
 * Talk:Chocó woodpecker

Group 5 – WikiProject override
As in group 4 (WikiProject autodetection) above, These tests rely on using Talk header/sandbox transcluding the "Find sources" wrapper template (Find sources/sandbox to choose the right domain-specific "find sources" template. Where it differs from group 4, is that in these tests, we include a domain param to override the WikiProject detected by the template. Read the instructions for Group 4 first, to understand how they are set up.

Because these tests depend on using the WikiProjects listed in the Talk header template at the top of an article page, they cannot be tested in the normal way. The best way to test this, is to add a Talk header with a domain param to the Talk pages of actual articles which have the appropriate Talk page headers and WikiProject listings (without saving):
 * edit the Talk page header of an article belonging to, say, WikiProject medicine
 * find the transclusion of (normally at the top of the page)
 * change it to (or add:), hit Preview, and → take note of the "find sources" links that are generated
 * execute a set of domain override tests on this page:
 * change the header to (or  or ) and Preview
 * ⟶ verify that the find sources links change to match those of find video game sources
 * change the header to (or  and Preview
 * ⟶ verify that the find sources links change to match those of the default set: find general sources

Any article Talk page may be used for these tests; the list below contains some suggested Talk pages with the correct WikiProjects on it to autodetect a project, and to override it using the domain param, and observe the results. After viewing the test case result in Preview mode on the page, it's best to just cancel out and not save the Previewed page.

Articles including project Video games

Expected result: unless the article also includes WikiProject Medicine, the header should employ find video games sources in Preview mode with project autodetection. Adding general or medical should override that and provide general or medical source links instead:


 * Talk:Darkwing Duck (Capcom video game)
 * Talk:Illyriad
 * Talk:Microsoft Flight Simulator (2020 video game)

Articles including project Medicine

Expected result: → these should employ find medical sources in Preview mode with project autodetection, and adding general or video should override that and provide general or video game source links instead:


 * Talk:Giardiasis
 * Talk:Myelodysplastic syndrome
 * Talk:Amoxicillin
 * Talk:Major depressive disorder

These articles don't belong to a WikiProject recognized for special handling by this template (they are chosen from Special:Random).

Expected result: these should default to the standard find general sources list in Preview mode with project autodetection, and adding medical or video should override that and provide medical or video game source links instead:


 * Talk:Great Fransham
 * Talk:Internal energy
 * Talk:Chocó woodpecker

Group 6 – complex titles and param 'title'

 * Subpages with parent pages should search just the last part after the (last) slash
 * Slashes in article space are allowed, e.g. HIV/AIDS in Africa should search "HIV/AIDS in Africa".


 * Pages with prefixes: namespace prefixes should be dropped (Wikpedia:, Talk:, etc)


 * Pages with parenthetical disambiguation: in article space, add parendis as searchterm2; everywhere else, drop it
 * Article: for Talk:John Smith (dentist), search "John Smith"+dentist+-wikipedia
 * Talk:John Smith (anatomist and chemist), search "John Smith" +anatomist+and+chemist+-wikipedia


 * Pages with parent and parenthetical disambiguation: use subpage only, add parendis as searchterm2 for articles only


 * Pages with Prefix, parent, and parenthetical disambiguation: e.g.,
 * Articles for deletion/House Hippo (2nd nomination) search for "House Hippo"


 * Test cases with title, for example:
 * Retry with Contexttitle set to pages with combos of namespace prefix, subpage names, and parendis, such as 'Wikipedia:Articles for deletion/House Hippo (2nd nomination)'