Template:Sidebar/testcases: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
(Created page with "{{testcase}} == Basic Tests == {|class="standard-table" | style="text-align:center; width:100%;" |- ! style="width:100%" |{{Dictionary/common|Desc}} ! {{Dictionary/common|Pre...")
 
mNo edit summary
 
(8 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{testcase}}
{{testcase}}__NOTOC__
 
== Basic tests ==
== Basic Tests ==
{|class="standard-table" | style="text-align:center; width:100%;"
{|class="standard-table" | style="text-align:center; width:100%;"
|-
|-
Line 9: Line 8:
| style="background:#282828; padding-inline:.5em;" | {{capsule|style=2|With no parameters}}
| style="background:#282828; padding-inline:.5em;" | {{capsule|style=2|With no parameters}}
| {{sidebar}}
| {{sidebar}}
|-
| style="background:#282828; padding-inline:.5em;" | {{capsule|style=2|With title parameter only}}
| {{sidebar|title=Lorem Ipsum}}
|-
|-
| style="background:#282828; padding-inline:.5em;" | {{capsule|style=2|With header parameter only}}
| style="background:#282828; padding-inline:.5em;" | {{capsule|style=2|With header parameter only}}
| {{sidebar|header=Lorem Ipsum}}
| {{sidebar|header=Header}}
|-
|-
| style="background:#282828; padding-inline:.5em;" | {{capsule|style=2|With content parameter only}}
| style="background:#282828; padding-inline:.5em;" | {{capsule|style=2|With content parameter only}}
| {{sidebar|content=Lorem Ipsum}}
| {{sidebar|content1=Content}}
|-
|-
| style="background:#282828; padding-inline:.5em;" | {{capsule|style=2|With footer parameter only}}
| style="background:#282828; padding-inline:.5em;" | {{capsule|style=2|With footer parameter only}}
| {{sidebar|footer=Lorem Ipsum}}
| {{sidebar|footer=Footer}}
|-
|-
|}
|}
Line 31: Line 27:
|-
|-
| style="background:#282828; padding-inline:.5em;" | {{capsule|style=2|With image parameter only}}
| style="background:#282828; padding-inline:.5em;" | {{capsule|style=2|With image parameter only}}
| style="padding-block:.5em;" | {{sidebar|image=Software Cover - The Lab}}
| style="padding-block:.5em;" | {{sidebar|image=Software Cover - The Lab.jpg}}
|-
| style="background:#282828; padding-inline:.5em;" | {{capsule|style=2|With image parameter and imagewidth parameter}}
| style="padding-block:.5em;" | {{sidebar|image=Missing entity icon.png|imagewidth=64px}}
|-
|}
 
== Section tests ==
{|class="standard-table" | style="text-align:center; width:100%;"
|-
! style="width:100%" |{{Dictionary/common|Desc}}
! {{Dictionary/common|Preview}}
|-
| style="background:#282828; padding-inline:.5em;" | {{capsule|style=2|With one section only}}
| style="padding-block:.5em;" | {{sidebar|section1=Section 1}}
|-
| style="background:#282828; padding-inline:.5em;" | {{capsule|style=2|With two sections only}}
| style="padding-block:.5em;" | {{sidebar|section1=Section 1|section2=Section 2}}
|-
| style="background:#282828; padding-inline:.5em;" | {{capsule|style=2|With two sections, with section 2 being skipped}}
| style="padding-block:.5em;" | {{sidebar|section1=Section 1|section3=Section 3}}
|-
| style="background:#282828; padding-inline:.5em;" | {{capsule|style=2|With two sections, a header and a footer}}
| style="padding-block:.5em;" | {{sidebar
                                | header  = Header
                                | section1 = Section 1
                                | section2 = Section 2
                                | footer  = Footer
                                }}
|}
 
== Content tests ==
{|class="standard-table" | style="text-align:center; width:100%;"
|-
! style="width:100%" |{{Dictionary/common|Desc}}
! {{Dictionary/common|Preview}}
|-
| style="background:#282828; padding-inline:.5em;" | {{capsule|style=2|With one content box only}}
| style="padding-block:.5em;" | {{sidebar|content1=Content 1}}
|-
| style="background:#282828; padding-inline:.5em;" | {{capsule|style=2|With two content boxes only}}
| style="padding-block:.5em;" | {{sidebar|content1=Content 1|content2=Content 2}}
|-
|-
| style="background:#282828; padding-inline:.5em;" | {{capsule|style=2|With image parameter, imageformat and imagewidth parameter}}
| style="background:#282828; padding-inline:.5em;" | {{capsule|style=2|With two content boxes, with content box 2 being skipped}}
| style="padding-block:.5em;" | {{sidebar|image=Missing entity icon|imageformat=png|imagewidth=64px}}
| style="padding-block:.5em;" | {{sidebar|content1=Content 1|content3=Content 3}}
|-
|-
| style="background:#282828; padding-inline:.5em;" | {{capsule|style=2|With two content boxes, a header and a footer}}
| style="padding-block:.5em;" | {{sidebar
                                | header  = Header
                                | content1 = Content 1
                                | content2 = Content 2
                                | footer  = Footer
                                }}
|}
|}

Latest revision as of 21:24, 29 May 2023

Gnome app science.png
This is the template test cases page for Template:Sidebar. Purge this page in order to update the examples, if the template itself was recently edited.
If there are too many examples of a complicated template, later transclusions of such template may break due to the limitations of the Mediawiki software, or can cause the page itself to load very slow; See the HTML comment "NewPP limit Report" on the rendered page.
You can also use Special:ExpandTemplates to examine the results of template use cases.


Basic tests

Description Preview
With no parameters
With header parameter only
Header
With content parameter only
Content
With footer parameter only
Footer

Image tests

Description Preview
With image parameter only
[[File:Software Cover - The Lab.jpg
300px]]
With image parameter and imagewidth parameter
[[File:Missing entity icon.png
64px]]

Section tests

Description Preview
With one section only
Section 1
With two sections only
Section 1
Section 2
With two sections, with section 2 being skipped
Section 1
Section 3
With two sections, a header and a footer
Header
Section 1
Section 2
Footer

Content tests

Description Preview
With one content box only
Content 1
With two content boxes only
Content 1
Content 2
With two content boxes, with content box 2 being skipped
Content 1
Content 3
With two content boxes, a header and a footer
Header
Content 1
Content 2
Footer