test: update snapshot (#44989)

* test: update snapshot

* test: update snapshot

* test: fix test logic
This commit is contained in:
二货爱吃白萝卜 2023-09-21 16:37:54 +08:00 committed by GitHub
parent 65564fccdc
commit ef03563334
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 9 additions and 4 deletions

View File

@ -42316,6 +42316,7 @@ exports[`ConfigProvider components Upload configProvider componentDisabled 1`] =
>
<input
accept=""
disabled=""
style="display: none;"
type="file"
/>

View File

@ -5464,6 +5464,7 @@ Array [
>
<input
accept=""
disabled=""
style="display: none;"
type="file"
/>

View File

@ -2899,6 +2899,7 @@ Array [
>
<input
accept=""
disabled=""
style="display:none"
type="file"
/>

View File

@ -940,6 +940,7 @@ exports[`Form form should support disabled 1`] = `
>
<input
accept=""
disabled=""
style="display: none;"
type="file"
/>

View File

@ -1715,20 +1715,21 @@ describe('Form', () => {
const App2 = () => <Form disabled>{renderComps()}</Form>;
const wrapper2 = render(<App2 />);
// 时间范围组件中会有两个 input 框,因此虽然上述只有 18 个组件,但,实际有 19 个 带有 disabled 属性的表单组件
expect(wrapper2.container.querySelectorAll('[disabled]').length).toBe(19);
// 时间范围组件中会有两个 input 框Upload 为叠加
// 因此虽然上述只有 18 个组件,但实际有 20 个 带有 disabled 属性的表单组件
expect(wrapper2.container.querySelectorAll('[disabled]').length).toBe(20);
const App3 = () => <Form disabled>{renderComps(true)}</Form>;
const wrapper3 = render(<App3 />);
expect(wrapper3.container.querySelectorAll('[disabled]').length).toBe(19);
expect(wrapper3.container.querySelectorAll('[disabled]').length).toBe(20);
const App4 = () => <Form>{renderComps(true)}</Form>;
const wrapper4 = render(<App4 />);
expect(wrapper4.container.querySelectorAll('[disabled]').length).toBe(19);
expect(wrapper4.container.querySelectorAll('[disabled]').length).toBe(20);
const App5 = () => <Form>{renderComps()}</Form>;