Skip to content

Commit

Permalink
chore: add test:snap-update (#1706)
Browse files Browse the repository at this point in the history
  • Loading branch information
anlyyao authored Mar 2, 2023
1 parent bd6a0e9 commit b57419e
Show file tree
Hide file tree
Showing 12 changed files with 100 additions and 134 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
"cover": "jest --coverage",
"test": "jest && jest -c jest.virtualHost.config.js && jest -c jest.e2e.config.js",
"test:virtualHost": "jest -c jest.virtualHost.config.js",
"test:snap-update": "npm run test:virtualHost -- -u && npm run test:unit -- -u",
"test:demo": "node gen-demo-test.js",
"test:unit": "jest",
"test:e2e": "jest -c jest.e2e.config.js",
Expand Down
12 changes: 6 additions & 6 deletions src/button/__test__/__virtualHostSnapshot__/demo.test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -182,9 +182,9 @@ exports[`Button Button icon-btn demo works fine 1`] = `
加载中
</t-button>
<t-button
ariaLabel="返回"
ariaLabel="搜索"
class="margin"
icon="chevron-left"
icon="search"
shape="square"
size="large"
theme="primary"
Expand All @@ -205,8 +205,8 @@ exports[`Button Button shape demo works fine 1`] = `
填充按钮
</t-button>
<t-button
ariaLabel="返回"
icon="chevron-left"
ariaLabel="搜索"
icon="search"
shape="square"
size="large"
theme="primary"
Expand All @@ -219,8 +219,8 @@ exports[`Button Button shape demo works fine 1`] = `
填充按钮
</t-button>
<t-button
ariaLabel="返回"
icon="chevron-left"
ariaLabel="搜索"
icon="search"
shape="circle"
size="large"
theme="primary"
Expand Down
4 changes: 2 additions & 2 deletions src/cell/__test__/__virtualHostSnapshot__/index.test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ exports[`cell :base 1`] = `
class="t-cell__left t-class-left"
/>
<wx-view
class="t-cell__title t-class-title"
class="t-cell__title"
>
<wx-view
class="t-cell__title-text"
class="t-cell__title-text t-class-title"
/>
<wx-view
class="t-cell__description t-class-description"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,10 @@ exports[`collapse :defaultExpandAll 1`] = `
class="t-cell__left t-class-left"
/>
<wx-view
class="t-cell__title t-class-title"
class="t-cell__title"
>
<wx-view
class="t-cell__title-text"
class="t-cell__title-text t-class-title"
>
first
</wx-view>
Expand Down Expand Up @@ -125,10 +125,10 @@ exports[`collapse :defaultExpandAll 1`] = `
class="t-cell__left t-class-left"
/>
<wx-view
class="t-cell__title t-class-title"
class="t-cell__title"
>
<wx-view
class="t-cell__title-text"
class="t-cell__title-text t-class-title"
>
second
</wx-view>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ exports[`date-time-picker :base 1`] = `
class="class t-class t-date-time-picker"
bind:cancel="onCancel"
bind:change="onConfirm"
bind:close="onClose"
bind:pick="onColumnChange"
bind:visible-change="onVisibleChange"
>
Expand Down
135 changes: 60 additions & 75 deletions src/image-viewer/__test__/__virtualHostSnapshot__/index.test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -17,38 +17,33 @@ exports[`image-viewer :base 1`] = `
tClassText="t-image--loading-text"
>
<wx-view
class="class t-class"
style="width: 44rpx; height: 44rpx;"
class="class t-class t-loading t-loading--horizontal"
style="width: 44rpx; height: 44rpx; color: inherit"
>
<wx-view
class="t-loading t-loading--horizontal"
style=""
ariaLabel="加载中"
ariaRole="img"
class="t-class-indicator t-loading__spinner t-loading__spinner--dots "
style="width: 44rpx; height: 44rpx; color: inherit ; animation-duration: 0.8s; animation-play-state: running;"
>
<wx-view
ariaLabel="加载中"
ariaRole="img"
class="t-class-indicator t-loading__spinner t-loading__spinner--dots "
style="width: 44rpx; height: 44rpx; color: inherit ; animation-duration: 0.8s; animation-play-state: running;"
>
<wx-view
class="t-loading__dot"
style="animation-duration: 0.8s; animation-delay:0s; animation-play-state: running;"
/>
<wx-view
class="t-loading__dot"
style="animation-duration: 0.8s; animation-delay:0.26666666666666666s; animation-play-state: running;"
/>
<wx-view
class="t-loading__dot"
style="animation-duration: 0.8s; animation-delay:0.5333333333333333s; animation-play-state: running;"
/>
</wx-view>
class="t-loading__dot"
style="animation-duration: 0.8s; animation-delay:0s; animation-play-state: running;"
/>
<wx-view
class="t-loading__dot"
style="animation-duration: 0.8s; animation-delay:0.26666666666666666s; animation-play-state: running;"
/>
<wx-view
ariaHidden="{{true}}"
ariaLabel=""
class="t-loading__text t-loading__text--horizontal t-class-text"
class="t-loading__dot"
style="animation-duration: 0.8s; animation-delay:0.5333333333333333s; animation-play-state: running;"
/>
</wx-view>
<wx-view
ariaHidden="{{true}}"
ariaLabel=""
class="t-loading__text t-loading__text--horizontal t-class-text"
/>
</wx-view>
</t-loading>
</wx-view>
Expand Down Expand Up @@ -87,38 +82,33 @@ exports[`image-viewer :base 2`] = `
tClassText="t-image--loading-text"
>
<wx-view
class="class t-class"
style="width: 44rpx; height: 44rpx;"
class="class t-class t-loading t-loading--horizontal"
style="width: 44rpx; height: 44rpx; color: inherit"
>
<wx-view
class="t-loading t-loading--horizontal"
style=""
ariaLabel="加载中"
ariaRole="img"
class="t-class-indicator t-loading__spinner t-loading__spinner--dots "
style="width: 44rpx; height: 44rpx; color: inherit ; animation-duration: 0.8s; animation-play-state: running;"
>
<wx-view
ariaLabel="加载中"
ariaRole="img"
class="t-class-indicator t-loading__spinner t-loading__spinner--dots "
style="width: 44rpx; height: 44rpx; color: inherit ; animation-duration: 0.8s; animation-play-state: running;"
>
<wx-view
class="t-loading__dot"
style="animation-duration: 0.8s; animation-delay:0s; animation-play-state: running;"
/>
<wx-view
class="t-loading__dot"
style="animation-duration: 0.8s; animation-delay:0.26666666666666666s; animation-play-state: running;"
/>
<wx-view
class="t-loading__dot"
style="animation-duration: 0.8s; animation-delay:0.5333333333333333s; animation-play-state: running;"
/>
</wx-view>
class="t-loading__dot"
style="animation-duration: 0.8s; animation-delay:0s; animation-play-state: running;"
/>
<wx-view
class="t-loading__dot"
style="animation-duration: 0.8s; animation-delay:0.26666666666666666s; animation-play-state: running;"
/>
<wx-view
ariaHidden="{{true}}"
ariaLabel=""
class="t-loading__text t-loading__text--horizontal t-class-text"
class="t-loading__dot"
style="animation-duration: 0.8s; animation-delay:0.5333333333333333s; animation-play-state: running;"
/>
</wx-view>
<wx-view
ariaHidden="{{true}}"
ariaLabel=""
class="t-loading__text t-loading__text--horizontal t-class-text"
/>
</wx-view>
</t-loading>
</wx-view>
Expand Down Expand Up @@ -157,38 +147,33 @@ exports[`image-viewer :base 3`] = `
tClassText="t-image--loading-text"
>
<wx-view
class="class t-class"
style="width: 44rpx; height: 44rpx;"
class="class t-class t-loading t-loading--horizontal"
style="width: 44rpx; height: 44rpx; color: inherit"
>
<wx-view
class="t-loading t-loading--horizontal"
style=""
ariaLabel="加载中"
ariaRole="img"
class="t-class-indicator t-loading__spinner t-loading__spinner--dots "
style="width: 44rpx; height: 44rpx; color: inherit ; animation-duration: 0.8s; animation-play-state: running;"
>
<wx-view
ariaLabel="加载中"
ariaRole="img"
class="t-class-indicator t-loading__spinner t-loading__spinner--dots "
style="width: 44rpx; height: 44rpx; color: inherit ; animation-duration: 0.8s; animation-play-state: running;"
>
<wx-view
class="t-loading__dot"
style="animation-duration: 0.8s; animation-delay:0s; animation-play-state: running;"
/>
<wx-view
class="t-loading__dot"
style="animation-duration: 0.8s; animation-delay:0.26666666666666666s; animation-play-state: running;"
/>
<wx-view
class="t-loading__dot"
style="animation-duration: 0.8s; animation-delay:0.5333333333333333s; animation-play-state: running;"
/>
</wx-view>
class="t-loading__dot"
style="animation-duration: 0.8s; animation-delay:0s; animation-play-state: running;"
/>
<wx-view
class="t-loading__dot"
style="animation-duration: 0.8s; animation-delay:0.26666666666666666s; animation-play-state: running;"
/>
<wx-view
ariaHidden="{{true}}"
ariaLabel=""
class="t-loading__text t-loading__text--horizontal t-class-text"
class="t-loading__dot"
style="animation-duration: 0.8s; animation-delay:0.5333333333333333s; animation-play-state: running;"
/>
</wx-view>
<wx-view
ariaHidden="{{true}}"
ariaLabel=""
class="t-loading__text t-loading__text--horizontal t-class-text"
/>
</wx-view>
</t-loading>
</wx-view>
Expand Down
32 changes: 16 additions & 16 deletions src/input/__test__/__snapshots__/index.test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,7 @@ exports[`input props : clearable && label && suffix 1`] = `
style=""
>
<wx-view
class="t-input__icon--prefix"
/>
<wx-view
ariaHidden="{{true}}"
class="t-input__label"
class="t-input__wrap--prefix"
>
<wx-view
class="t-input__icon--prefix"
Expand All @@ -23,8 +19,12 @@ exports[`input props : clearable && label && suffix 1`] = `
ariaHidden="{{true}}"
class="t-input__label"
>
tdesign
</wx-text>
<wx-text
class="t-class-label"
>
tdesign
</wx-text>
</wx-view>
</wx-view>
<wx-view
class="t-input__wrap"
Expand Down Expand Up @@ -137,11 +137,7 @@ exports[`input slots : label 1`] = `
style=""
>
<wx-view
class="t-input__icon--prefix"
/>
<wx-view
ariaHidden="{{true}}"
class="t-input__label"
class="t-input__wrap--prefix"
>
<wx-view
class="t-input__icon--prefix"
Expand All @@ -150,13 +146,17 @@ exports[`input slots : label 1`] = `
ariaHidden="{{true}}"
class="t-input__label"
>
标签文字
<wx-text
style="color: #e34d59"
slot="label"
>
*
标签文字
<wx-text
style="color: #e34d59"
>
*
</wx-text>
</wx-text>
</wx-text>
</wx-view>
</wx-view>
<wx-view
class="t-input__wrap"
Expand Down
19 changes: 0 additions & 19 deletions src/loading/__test__/__virtualHostSnapshot__/demo.test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -48,15 +48,6 @@ exports[`Loading Loading duration demo works fine 1`] = `
</duration>
`;

exports[`Loading Loading error demo works fine 1`] = `
<error>
<t-loading
theme="error"
bind:reload="reloadPage"
/>
</error>
`;

exports[`Loading Loading horizontal demo works fine 1`] = `
<horizontal>
<wx-view
Expand All @@ -79,16 +70,6 @@ exports[`Loading Loading horizontal demo works fine 1`] = `
</horizontal>
`;

exports[`Loading Loading loadingProgress demo works fine 1`] = `
<loadingProgress>
<t-loading
loading="{{false}}"
progress="{{100}}"
theme="bar"
/>
</loadingProgress>
`;

exports[`Loading Loading size demo works fine 1`] = `
<size>
<wx-view
Expand Down
2 changes: 2 additions & 0 deletions src/navbar/__test__/__virtualHostSnapshot__/demo.test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,15 @@ exports[`Navbar Navbar back-home demo works fine 1`] = `
class="custom-capsule__icon"
name="chevron-left"
size="20"
bind:tap="onBack"
/>
<t-icon
ariaLabel="首页"
ariaRole="button"
class="custom-capsule__icon"
name="home"
size="20"
bind:tap="onGoHome"
/>
</wx-view>
</t-navbar>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ exports[`Radio Radio align demo works fine 1`] = `
class="block"
/>
<t-radio
align="right"
defaultChecked="{{true}}"
label="单选"
placement="right"
value="radio2"
/>
</align>
Expand Down
Loading

0 comments on commit b57419e

Please sign in to comment.