This means that you can edit the sandbox template, but preview pages as if you were actually editing the main template. To make this feature even more powerful, you can install User:Jackmcbarn/advancedtemplatesandbox.js, which makes it usable in any namespace, and lets you specify the title of the template as well as the page to preview it on. For these kinds of tests, you can use the "Preview page with this template" feature that you can see underneath the edit window on template pages. For example, a template may only output certain text when in the main namespace, or it may output different things when it is used on a base page and when it is used on a subpage. Some template features can't be tested on /testcases pages. Tests that can't be made on /testcases pages For detailed documentation, see the individual template pages. Note that all of these templates can produce collapsible test cases, but Template:Collapsible test case has this feature turned on by default. Template:Collapsible test case, to collapse test cases when the main and sandbox templates produce the same result.Template:Test case nowiki, for templates with complex invocations.Template:Inline test case, for long and thin templates such as infoboxes.Template:Testcase table, for long and thin templates such as infoboxes.Template:Test case, for general-purpose test cases.This avoids the problem of errors in test case parameters, and makes it easier to maintain test case pages. With these templates, parameters and values are only entered once, but are still tested for both the main template and the sandbox templates. There are various templates that help you to format test cases automatically. Create a subpage with the name Template:X/sandbox. Suppose your template is named Template:X. Use "create" and "mirror" links at the bottom of documentation box to create /sandbox and /testcases subpages automatically.
0 Comments
Leave a Reply. |