The following tests are intended to provide a very quick check of core functionality. Use the Purge cache link on this page to clear the server cache and then test the following.
Provided that the above tests pass, visit several talk pages and verify they look good as well. Verify that the links default to the correct domain and that the domain override works.
For those pages, use the URL pattern below to clear the server cache:
The opt-out makes no sense, unless it's opted in before you opt it out. But opt-in is not the default in Template space, so we add param |demospace=1 to simulate the correct namespace so it would be included, then use the opt-out params to hide it again.
Find sources – control 1: no params (except demospace=1) shows find sources
Template:Cot
These are external tests that rely on using Template:Tl transcluding the "Find sources" wrapper template (Template:Tl to choose the right domain-specific "find sources" template from among medical, video game, or general sources (and possibly others). 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.
Template:CotTemplate:Anchor
The test cases can be performed either at Special:ExpandTemplates, or in situ at the Talk pages of actual articles which have the appropriate WikiProject listings already present, in Preview Mode. The easier method is probably to use ExpandTemplates.
3. Expected result: because this article is a member of WP:WikiProject Video games and not a member of project Medicine, the links displayed match those of Template:Tl.
Testing in situ
The other method is an in situ test. All of the 'tests in this section may be performed in situ in the following way:
edit the Talk page of an article belonging to one or more WikiProjects detected by the template
find the transclusion of template Template:Tlc (normally at the top of the Talk page; or add one)
change it to Template:Tlc (+ optional params; see individual test cases below)
click "Preview" button and observe the "find sources" links that are generated in the Talk header
if the observed links match the "expected result" given in the test case, it's a "pass", otherwise, "fail".
Any article Talk page with the correct header and projects may be used for this; the lists in the Test cases defined below contains some suggested Talk pages with the correct WikiProjects on them to perform 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.
Template:Cob
Note: the articles above only test the autodection feature for articles which transclude the wikiproject under its original name 'WikiProject Medicine' and without using a redirect. Complete testing of this feature requires testing some Talk pages of articles that incorporate a redirect to project Medicine. See test E-2a below for a selection of these.
For an additional list of sample articles employing redirects to project Medicine to use for testing, please see test B-2 here.
E-2a Articles using redirects to WikiProject Medicine
There are 15 redirects to WikiProject Medicine. Not all of them are in use on article Talk pages. A couple that are, include Template:Tl (hundreds of transclusions),
This test may be performed using ExpandTemplates or in situ testing. (see Methodology)
These tests verify that the correct set of find sources links are displayed, for articles belonging to more than one project.
Use Template:Tl
Expected result: these should display links matching the Template:Tlc template corresponding to the search domain of the highest priority project on the page.
As of 1 Nov 2021, the priority sequence is: 1. medical, 2. video games, 3. general (legacy links). (Other domains like biographical and military are on the list for possible expansion of the template.) Further examples can be found using Petscan.
As in that section, because the tests below depend on overriding the WikiProjects listed in the Talk header template at the top of an article page, they cannot be fully tested in the normal way. These tests may be performed in two ways: in situ, or via Special:ExpandTemplates. Where tests in this section differ from the test cases in the previous section, is that in these tests, we include a Template:Para param to override the WikiProject(s) detected by the template.
Here is an example of testing with ExpandTemplates, to override a video game Talk page with medical source links in the Talk header:
3. Expected result: although this is not a member of project Medicine, the links displayed match Template:Tl.
The other way to execute a test case, is in situ: add a Talk header with a Template:Para 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 Template:Tlc (normally at the top of the page)
change it to (or add:) Template:Tlc, hit Preview, and take note of the "find sources" links that are generated
execute a set of domain override tests on this page:
observe that the find sources links in the Talk header change to those of the default set: Template:Tl
Any article Talk page may be used for these tests; for suggested articles, see the list in test section #E. WikiProject detection above, which contains some suggested Talk pages with the correct WikiProjects on it to autodetect a project, and to override it using the Template:Para 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.
Template:Cob
G. Namespace detection
Find sources links should only be emitted in the Talk header, when the template is placed on article talk pages (ns:1) or Draft talk pages (ns:119). In any other namespace, no find sources are emitted.
paste one of the suggested 'Draft talk:' pages into 'Context Title'
paste the following text the input wikitext box: Template:Tlc
Expected result: the Talk header template displayed by ExpandTemplates should show find sources links which search for the Context title
The other way to execute a test case, is in situ:
find a Draft talk page and open it for editing
find the transclusion of Template:Tlc (normally at the top of the page)
change it to (or add one if it doesn't have it:) Template:Tlc, and hit Preview
Expected result: "find sources" links are found in the Talk header box for the page
Any Draft talk page may be used for these tests. 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.
Template:Cob