Skip to content

Commit

Permalink
✅ test: fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
arvinxx committed Nov 28, 2021
1 parent d24a23c commit 20629c2
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 28 deletions.
16 changes: 4 additions & 12 deletions packages/user-panel/src/login/__snapshots__/index.test.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ exports[`Login 组件 获取验证码 1`] = `
class="avx-user-panel-login-container"
>
<form
autocomplete="off"
class="ant-form ant-form-vertical"
>
<input
Expand Down Expand Up @@ -56,7 +57,6 @@ exports[`Login 组件 获取验证码 1`] = `
</div>
<div
class="ant-tabs-ink-bar ant-tabs-ink-bar-animated"
style="left: 0px; width: 0px;"
/>
</div>
</div>
Expand Down Expand Up @@ -124,7 +124,7 @@ exports[`Login 组件 获取验证码 1`] = `
</div>
</div>
<div
class="ant-row ant-form-item ant-form-item-with-help ant-form-item-has-error"
class="ant-row ant-form-item ant-form-item-is-validating"
>
<div
class="ant-col ant-form-item-control"
Expand Down Expand Up @@ -195,15 +195,6 @@ exports[`Login 组件 获取验证码 1`] = `
</span>
</div>
</div>
<div
class="ant-form-item-explain ant-form-item-explain-error"
>
<div
role="alert"
>
手机号是必填项!
</div>
</div>
</div>
</div>
<div
Expand Down Expand Up @@ -257,7 +248,7 @@ exports[`Login 组件 获取验证码 1`] = `
/>
</span>
<button
ant-click-animating-without-extra-node="true"
ant-click-animating-without-extra-node="false"
class="ant-btn ant-btn-lg"
style="display: block;"
type="button"
Expand Down Expand Up @@ -316,6 +307,7 @@ exports[`Login 组件 默认状态 1`] = `
class="avx-user-panel-login-container"
>
<form
autocomplete="off"
class="ant-form ant-form-vertical"
>
<input
Expand Down
3 changes: 1 addition & 2 deletions packages/user-panel/src/login/index.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,7 @@ describe('Login 组件', () => {
fireEvent.click(btn);
const captcha = await findByText('获取验证码');
await fireEvent.click(captcha);
expect(container).toMatchSnapshot();
});

expect(container).toMatchSnapshot();
});
});
15 changes: 3 additions & 12 deletions packages/user-panel/tests/__snapshots__/index.test.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ exports[`UserPanel 登录面板 1`] = `
class="avx-user-panel-login-container"
>
<form
autocomplete="off"
class="ant-form ant-form-vertical"
>
<input
Expand Down Expand Up @@ -69,7 +70,6 @@ exports[`UserPanel 登录面板 1`] = `
</div>
<div
class="ant-tabs-ink-bar ant-tabs-ink-bar-animated"
style="left: 0px; width: 0px;"
/>
</div>
</div>
Expand Down Expand Up @@ -137,7 +137,7 @@ exports[`UserPanel 登录面板 1`] = `
</div>
</div>
<div
class="ant-row ant-form-item ant-form-item-with-help ant-form-item-has-error"
class="ant-row ant-form-item ant-form-item-is-validating"
>
<div
class="ant-col ant-form-item-control"
Expand Down Expand Up @@ -208,15 +208,6 @@ exports[`UserPanel 登录面板 1`] = `
</span>
</div>
</div>
<div
class="ant-form-item-explain ant-form-item-explain-error"
>
<div
role="alert"
>
手机号是必填项!
</div>
</div>
</div>
</div>
<div
Expand Down Expand Up @@ -270,7 +261,7 @@ exports[`UserPanel 登录面板 1`] = `
/>
</span>
<button
ant-click-animating-without-extra-node="true"
ant-click-animating-without-extra-node="false"
class="ant-btn ant-btn-lg"
style="display: block;"
type="button"
Expand Down
3 changes: 1 addition & 2 deletions packages/user-panel/tests/index.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,7 @@ describe('UserPanel', () => {
fireEvent.click(btn);
const captcha = await findByText('获取验证码');
await fireEvent.click(captcha);
expect(container).toMatchSnapshot();
});

expect(container).toMatchSnapshot();
});
});

0 comments on commit 20629c2

Please sign in to comment.