Redigerer
Mal:Test case/dok
(avsnitt)
Hopp til navigering
Hopp til søk
Advarsel:
Du er ikke innlogget. IP-adressen din vil bli vist offentlig om du redigerer. Hvis du
logger inn
eller
oppretter en konto
vil redigeringene dine tilskrives brukernavnet ditt, og du vil få flere andre fordeler.
Antispamsjekk.
Ikke
fyll inn dette feltet!
== <div id="Collapsible test cases" ></div>Collapsible test cases == If <code>_collapsible</code> is set to "y" or "yes", the test case is made collapsible. The test case is collapsed and given a green heading if all the template outputs are the same. If any of the template outputs differ, the test case is expanded and given a yellow heading. It has the following extra parameters: {| class="wikitable" |- ! Parameter !! Description |- | <code>_title</code> || Use {{para|_title}} to display a custom title for collapsible test cases. |- | <code>_titlecode</code> || Use {{para|_titlecode|yes}} to display the template's code as the title of a collapsible test case. |- | <code>_notcollapsed</code> || If set to <code>y</code> or <code>yes</code>, the test case will always be expanded upon loading the page. If set to <code>n</code> or <code>no</code>, it will always be collapsed upon loading the page. This setting overrides the default functionality in which the test case is collapsed unless two or more outputs do not match. |} '''Examples''' === Default title === {{test case|_template1=ombox|_collapsible=yes|text=Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.}} === With _title === {{test case|_template1=ombox|_collapsible=yes|_format=columns|_title=Using the columns format|text=Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.}} {{test case|_template1=ombox|_collapsible=yes|_format=rows|_title=Using the rows format|text=Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.}} {{test case|_template1=ombox|_template2=tmbox|_collapsible=yes|_title=Example of differing output|text=Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.}} === With _titlecode=yes === This is useful for templates with a small number of parameters. It displays the template code in the title, eliminating the need for both '''{{para|_title}}''' and '''{{para|_showcode|yes}}'''. For actual tests implemented with '''{{para|_titlecode|yes}}''', see [[Template:URL/testcases]]. {{test case|_collapsible=yes|_titlecode=yes|_format=tablerows|_output=nowiki+|_template1=URL|www.example.com}} === With _notcollapsed=yes === If '''{{para|_notcollapsed|yes}}''', the test case will always be expanded upon loading the page. This setting overrides the default functionality in which the test case is collapsed unless two or more outputs do not match. The following example would normally be collapsed, as indicated by green background of title: {{test case|_template1=ombox|_template2=ombox|_collapsible=yes|_notcollapsed=yes|_title=Example of same output|text=Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.}} === With _notcollapsed=no === If '''{{para|_notcollapsed|no}}''', the test case will always be collapsed upon loading the page. This setting overrides the default functionality in which the test case is collapsed unless two or more outputs do not match. The following would normally be expanded, as indicated by yellow background of title: {{test case|_template1=ombox|_template2=tmbox|_collapsible=yes|_notcollapsed=no|_title=Example of differing output|text=Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.}}
Redigeringsforklaring:
Merk at alle bidrag til Wikisida.no anses som frigitt under Creative Commons Navngivelse-DelPåSammeVilkår (se
Wikisida.no:Opphavsrett
for detaljer). Om du ikke vil at ditt materiale skal kunne redigeres og distribueres fritt må du ikke lagre det her.
Du lover oss også at du har skrevet teksten selv, eller kopiert den fra en kilde i offentlig eie eller en annen fri ressurs.
Ikke lagre opphavsrettsbeskyttet materiale uten tillatelse!
Avbryt
Redigeringshjelp
(åpnes i et nytt vindu)
Forhåndsvis en side som bruker denne malen
Denne siden er medlem av 1 skjult kategori:
Kategori:Sider hvor ekspansjonsdybden er overskredet
Navigasjonsmeny
Personlige verktøy
Ikke logget inn
Brukerdiskusjon
Bidrag
Opprett konto
Logg inn
Navnerom
Mal
Diskusjon
norsk bokmål
Visninger
Les
Rediger kilde
Vis historikk
Mer
Navigasjon
Forside
Siste endringer
Tilfeldig side
Hjelp til MediaWiki
Verktøy
Lenker hit
Relaterte endringer
Spesialsider
Sideinformasjon