Template:TEMPLATE NAME/testcases
Appearance
This page contains test cases and usage examples for Template:TEMPLATE NAME on test.wikipedia. It is based on typical Articles for creation (AfC) draft workflows.
Basic substitution test
[edit]The most basic test ensures that the AfC draft template can be substituted correctly with a sample username parameter:
{{subst:AFC draft|Tanbiruzzaman}}
Test
{{subst:Drafts moved from mainspace}}
When the above wikitext is saved, it should expand into the standard AfC draft header and a note indicating that the draft has been moved from the mainspace, if applicable. The username Tanbiruzzaman is used here purely as an example and can be replaced with any other valid parameter.
Test sections
[edit]1. AfC draft header substitution
[edit]- Input
{{subst:AFC draft|ExampleUser}}
This is a sample draft article.
- Expected behaviour
- The template generates a draft header at the top of the page.
- It places the draft in the appropriate AfC maintenance categories.
- It may include internal links such as Wikipedia:Articles for creation and/or links to help pages for new editors.[1]
2. Drafts moved from mainspace notice
[edit]- Input
{{subst:Drafts moved from mainspace}}
- Expected behaviour
- A notice is added explaining that the draft originated from the main article space.
- This notice typically includes internal links to relevant policies such as Wikipedia:Drafts and Wikipedia:Deletion policy, helping reviewers understand the page history.[2]
3. Combined test (template chain)
[edit]- Input
{{subst:AFC draft|SampleUser}}
Test
{{subst:Drafts moved from mainspace}}
- Expected behaviour
- The AfC draft header appears at the top of the page.
- The word
Testremains as plain body content under the header. - The “Drafts moved from mainspace” notice appears below, with appropriate categories and internal links.
- The resulting page structure resembles that of a typical AfC submission that has been moved from article space to draft space for further improvement.[3]
Usage notes
[edit]- The
subst:prefix causes the template code to be permanently expanded when the page is saved, which is standard practice for AfC draft headers. - These testcases are intended for the test wiki environment and should not be interpreted as real AfC submissions.
- Additional parameters for Template:TEMPLATE NAME can be added below as they are introduced, with a new “Input / Expected behaviour” pair for each.
See also
[edit]References
[edit]- ↑ "Wikipedia:Articles for creation". Wikipedia.
- ↑ "Wikipedia:Drafts". Wikipedia.
- ↑ "Wikipedia:User sandbox and draft space". Wikipedia.