Skip to content

Commit

Permalink
test(tabs): add test cases (#822)
Browse files Browse the repository at this point in the history
  • Loading branch information
ChaneyZhao authored Jun 15, 2023
1 parent eb4b5ac commit bf7c59f
Show file tree
Hide file tree
Showing 2 changed files with 384 additions and 58 deletions.
200 changes: 200 additions & 0 deletions src/tabs/__test__/__snapshots__/index.test.jsx.snap
Original file line number Diff line number Diff line change
@@ -0,0 +1,200 @@
// Vitest Snapshot v1

exports[`Tabs > props > : defaultValue 1`] = `
<div
class="t-tabs t-size-m"
>
<div
class="t-sticky"
style="height: 0px;"
>
<div
class="t-sticky__content"
style="z-index: 99;"
>
<div
class="t-tabs__nav"
>
<div
class="t-tabs__scroll t-tabs__scroll--top t-tabs__scroll--line"
>
<div
class="t-tabs__wrapper t-tabs__wrapper--line"
>
<div
class="t-tabs__track t-tabs__track--top"
style=""
/>
</div>
</div>
</div>
</div>
</div>
<div
class="t-tabs__content"
>
</div>
</div>
`;

exports[`Tabs > props > : sticky 1`] = `
<div
class="t-tabs t-size-m"
>
<div
class="t-sticky"
style="height: 0px;"
>
<div
class="t-sticky__content"
style="z-index: 99; position: fixed; top: 0px;"
>
<div
class="t-tabs__nav"
>
<div
class="t-tabs__scroll t-tabs__scroll--top t-tabs__scroll--line"
>
<div
class="t-tabs__wrapper t-tabs__wrapper--line"
>
<div
class="t-tabs__track t-tabs__track--top"
style=""
/>
</div>
</div>
</div>
</div>
</div>
<div
class="t-tabs__content"
>
</div>
</div>
`;

exports[`Tabs > props > : value 1`] = `
<div
class="t-tabs t-size-m"
>
<div
class="t-sticky"
style="height: 0px;"
>
<div
class="t-sticky__content"
style="z-index: 99;"
>
<div
class="t-tabs__nav"
>
<div
class="t-tabs__scroll t-tabs__scroll--top t-tabs__scroll--line"
>
<div
class="t-tabs__wrapper t-tabs__wrapper--line"
>
<div
class="t-tabs__track t-tabs__track--top"
style=""
/>
</div>
</div>
</div>
</div>
</div>
<div
class="t-tabs__content"
>
</div>
</div>
`;

exports[`Tabs > slots > : panel 1`] = `
<div
class="t-tabs t-size-m"
>
<div
class="t-sticky"
style="height: 0px;"
>
<div
class="t-sticky__content"
style="z-index: 99;"
>
<div
class="t-tabs__nav"
>
<div
class="t-tabs__scroll t-tabs__scroll--top t-tabs__scroll--line"
>
<div
class="t-tabs__wrapper t-tabs__wrapper--line"
>
<div
class="t-tabs__item t-tabs__item--top t-tabs__item--evenly t-tabs__item--active t-tabs__item--line"
>
<t-badge>
<div
class="t-tabs__item-inner t-tabs__item-inner--line"
>
<div>
标签一
</div>
</div>
</t-badge>
<!--v-if-->
<!--v-if-->
</div>
<div
class="t-tabs__track t-tabs__track--top"
style=""
/>
</div>
</div>
</div>
</div>
</div>
<div
class="t-tabs__content"
>
<div
class="t-tab-panel t-tabs__panel"
value="1"
>
<p>
标签一内容
</p>
</div>
</div>
</div>
`;
Loading

0 comments on commit bf7c59f

Please sign in to comment.