Module talk:Template test case: Difference between revisions

Content deleted Content added
Sandbox2, Test case2, and wrapperConfig: It looks to me like there's a possibility of passing a config file; but how does one use it?
Line 89:
:There was an invisible character (a [[Left-to-right mark]]) on your testcases example page. I copied the whole page to a text editor, told it to show the invisible characters, and deleted it. – [[User:Jonesey95|Jonesey95]] ([[User talk:Jonesey95|talk]]) 16:51, 31 December 2020 (UTC)
:: Thanks, I must have wasted five hours of my time finding that one. I now have a good way to test it in the future. --[[User:Muhandes|Muhandes]] ([[User talk:Muhandes|talk]]) 19:36, 31 December 2020 (UTC)
 
== Sandbox2, Test case2, and wrapperConfig ==
 
I'd like the ability to use a second sandbox, say, 'sandbox2', to enable simultaneous testing of different sets of changes in parallel tracks for the same template. Having browsed [[Module:Template test case]], I believe a better method is available than the obvious brute force method of duplicating template FOO to FOO2, then FOO2/sandbox, and testcases to FOO2/testcases. Afaict the key seems to have something to do with {{var|wrapperConfig}} unless I'm mistaken, only I don't see how to use it, and the /doc doesn't have much to say about it.
 
This use case comes up occasionally in RL on complex templates that may need extended testing of some feature, while someone else desires to test another feature, or where different scenarios are being tried out. (For a RW case of the former type see [[Template talk:Find sources#Missing redirect detection bug]].) I get the feeling I can just create [[Template:Find sources/sandbox2]] with my changes, and then create a "wrapper config" somewhere, and set it as param2 to the invoke.
 
For example, can I just duplicate [[Module:Template test case/config]] to Template:Find general sources/MySandbox2Config, edit it to set <code>sandboxSubpage = 'sandbox2',</code> and then in Template:Find general sources/sandbox2 invoke like this: {{tlc|#invoke:Find sources|Find general sources, MySandbox2Config}}? Or am I misconstruing how this is supposed to work, and I should go back to the brute force method? Or something else? Pinging {{ping|Mr. Stradivarius|Trialpears}}.
 
Either way, param2 of the module appears to be a config of some kind, so whether my assumptions above are right or wrong, it would be nice if someone could add a <code><nowiki>== Params ==</nowiki></code> section to [[Module:Template test case/doc]] to describe what this param is and how to use it. {{pme}} [[User:Mathglot|Mathglot]] ([[User talk:Mathglot|talk]]) 22:28, 25 December 2021 (UTC)