test: update snapshot

This commit is contained in:
zombiej 2022-03-30 11:54:22 +08:00
parent ceba0d5c23
commit c89e33d0b6
6 changed files with 53 additions and 91 deletions

View File

@ -18734,7 +18734,7 @@ exports[`ConfigProvider components Progress configProvider 1`] = `
> >
<div <div
class="config-progress-bg" class="config-progress-bg"
style="width:0%;height:8px;border-radius:" style="width:0%;height:8px"
/> />
</div> </div>
</div> </div>
@ -18759,7 +18759,7 @@ exports[`ConfigProvider components Progress configProvider componentSize large 1
> >
<div <div
class="config-progress-bg" class="config-progress-bg"
style="width:0%;height:8px;border-radius:" style="width:0%;height:8px"
/> />
</div> </div>
</div> </div>
@ -18784,7 +18784,7 @@ exports[`ConfigProvider components Progress configProvider componentSize middle
> >
<div <div
class="config-progress-bg" class="config-progress-bg"
style="width:0%;height:8px;border-radius:" style="width:0%;height:8px"
/> />
</div> </div>
</div> </div>
@ -18809,7 +18809,7 @@ exports[`ConfigProvider components Progress configProvider virtual and dropdownM
> >
<div <div
class="ant-progress-bg" class="ant-progress-bg"
style="width:0%;height:8px;border-radius:" style="width:0%;height:8px"
/> />
</div> </div>
</div> </div>
@ -18834,7 +18834,7 @@ exports[`ConfigProvider components Progress normal 1`] = `
> >
<div <div
class="ant-progress-bg" class="ant-progress-bg"
style="width:0%;height:8px;border-radius:" style="width:0%;height:8px"
/> />
</div> </div>
</div> </div>
@ -18859,7 +18859,7 @@ exports[`ConfigProvider components Progress prefixCls 1`] = `
> >
<div <div
class="prefix-Progress-bg" class="prefix-Progress-bg"
style="width:0%;height:8px;border-radius:" style="width:0%;height:8px"
/> />
</div> </div>
</div> </div>

View File

@ -92,7 +92,7 @@ const Line: React.FC<LineProps> = props => {
const percentStyle = { const percentStyle = {
width: `${validProgress(percent)}%`, width: `${validProgress(percent)}%`,
height: strokeWidth || (size === 'small' ? 6 : 8), height: strokeWidth || (size === 'small' ? 6 : 8),
borderRadius: strokeLinecap === 'square' ? 0 : '', borderRadius: strokeLinecap === 'square' ? 0 : undefined,
...backgroundProps, ...backgroundProps,
} as React.CSSProperties; } as React.CSSProperties;
@ -101,7 +101,7 @@ const Line: React.FC<LineProps> = props => {
const successPercentStyle = { const successPercentStyle = {
width: `${validProgress(successPercent)}%`, width: `${validProgress(successPercent)}%`,
height: strokeWidth || (size === 'small' ? 6 : 8), height: strokeWidth || (size === 'small' ? 6 : 8),
borderRadius: strokeLinecap === 'square' ? 0 : '', borderRadius: strokeLinecap === 'square' ? 0 : undefined,
backgroundColor: success?.strokeColor, backgroundColor: success?.strokeColor,
} as React.CSSProperties; } as React.CSSProperties;

View File

@ -643,7 +643,7 @@ Array [
> >
<div <div
class="ant-progress-bg" class="ant-progress-bg"
style="width:0%;height:8px;border-radius:" style="width:0%;height:8px"
/> />
</div> </div>
</div> </div>
@ -839,7 +839,7 @@ Array [
> >
<div <div
class="ant-progress-bg" class="ant-progress-bg"
style="width:99.9%;height:8px;border-radius:;background-image:linear-gradient(to right, #108ee9 0%, #87d068 100%)" style="width:99.9%;height:8px;background-image:linear-gradient(to right, #108ee9 0%, #87d068 100%)"
/> />
</div> </div>
</div> </div>
@ -861,7 +861,7 @@ Array [
> >
<div <div
class="ant-progress-bg" class="ant-progress-bg"
style="width:99.9%;height:8px;border-radius:;background-image:linear-gradient(to right, #108ee9, #87d068)" style="width:99.9%;height:8px;background-image:linear-gradient(to right, #108ee9, #87d068)"
/> />
</div> </div>
</div> </div>
@ -1049,7 +1049,7 @@ Array [
> >
<div <div
class="ant-progress-bg" class="ant-progress-bg"
style="width:30%;height:8px;border-radius:" style="width:30%;height:8px"
/> />
</div> </div>
</div> </div>
@ -1071,7 +1071,7 @@ Array [
> >
<div <div
class="ant-progress-bg" class="ant-progress-bg"
style="width:50%;height:8px;border-radius:" style="width:50%;height:8px"
/> />
</div> </div>
</div> </div>
@ -1093,7 +1093,7 @@ Array [
> >
<div <div
class="ant-progress-bg" class="ant-progress-bg"
style="width:70%;height:8px;border-radius:" style="width:70%;height:8px"
/> />
</div> </div>
</div> </div>
@ -1132,7 +1132,7 @@ Array [
> >
<div <div
class="ant-progress-bg" class="ant-progress-bg"
style="width:100%;height:8px;border-radius:" style="width:100%;height:8px"
/> />
</div> </div>
</div> </div>
@ -1171,7 +1171,7 @@ Array [
> >
<div <div
class="ant-progress-bg" class="ant-progress-bg"
style="width:50%;height:8px;border-radius:" style="width:50%;height:8px"
/> />
</div> </div>
</div> </div>
@ -1194,7 +1194,7 @@ exports[`renders ./components/progress/demo/line-mini.md extend context correctl
> >
<div <div
class="ant-progress-bg" class="ant-progress-bg"
style="width:30%;height:6px;border-radius:" style="width:30%;height:6px"
/> />
</div> </div>
</div> </div>
@ -1216,7 +1216,7 @@ exports[`renders ./components/progress/demo/line-mini.md extend context correctl
> >
<div <div
class="ant-progress-bg" class="ant-progress-bg"
style="width:50%;height:6px;border-radius:" style="width:50%;height:6px"
/> />
</div> </div>
</div> </div>
@ -1238,7 +1238,7 @@ exports[`renders ./components/progress/demo/line-mini.md extend context correctl
> >
<div <div
class="ant-progress-bg" class="ant-progress-bg"
style="width:70%;height:6px;border-radius:" style="width:70%;height:6px"
/> />
</div> </div>
</div> </div>
@ -1277,7 +1277,7 @@ exports[`renders ./components/progress/demo/line-mini.md extend context correctl
> >
<div <div
class="ant-progress-bg" class="ant-progress-bg"
style="width:100%;height:6px;border-radius:" style="width:100%;height:6px"
/> />
</div> </div>
</div> </div>
@ -1456,11 +1456,11 @@ Array [
> >
<div <div
class="ant-progress-bg" class="ant-progress-bg"
style="width:60%;height:8px;border-radius:" style="width:60%;height:8px"
/> />
<div <div
class="ant-progress-success-bg" class="ant-progress-success-bg"
style="width:30%;height:8px;border-radius:" style="width:30%;height:8px"
/> />
</div> </div>
</div> </div>

View File

@ -643,7 +643,7 @@ Array [
> >
<div <div
class="ant-progress-bg" class="ant-progress-bg"
style="width:0%;height:8px;border-radius:" style="width:0%;height:8px"
/> />
</div> </div>
</div> </div>
@ -839,7 +839,7 @@ Array [
> >
<div <div
class="ant-progress-bg" class="ant-progress-bg"
style="width:99.9%;height:8px;border-radius:;background-image:linear-gradient(to right, #108ee9 0%, #87d068 100%)" style="width:99.9%;height:8px;background-image:linear-gradient(to right, #108ee9 0%, #87d068 100%)"
/> />
</div> </div>
</div> </div>
@ -861,7 +861,7 @@ Array [
> >
<div <div
class="ant-progress-bg" class="ant-progress-bg"
style="width:99.9%;height:8px;border-radius:;background-image:linear-gradient(to right, #108ee9, #87d068)" style="width:99.9%;height:8px;background-image:linear-gradient(to right, #108ee9, #87d068)"
/> />
</div> </div>
</div> </div>
@ -1049,7 +1049,7 @@ Array [
> >
<div <div
class="ant-progress-bg" class="ant-progress-bg"
style="width:30%;height:8px;border-radius:" style="width:30%;height:8px"
/> />
</div> </div>
</div> </div>
@ -1071,7 +1071,7 @@ Array [
> >
<div <div
class="ant-progress-bg" class="ant-progress-bg"
style="width:50%;height:8px;border-radius:" style="width:50%;height:8px"
/> />
</div> </div>
</div> </div>
@ -1093,7 +1093,7 @@ Array [
> >
<div <div
class="ant-progress-bg" class="ant-progress-bg"
style="width:70%;height:8px;border-radius:" style="width:70%;height:8px"
/> />
</div> </div>
</div> </div>
@ -1132,7 +1132,7 @@ Array [
> >
<div <div
class="ant-progress-bg" class="ant-progress-bg"
style="width:100%;height:8px;border-radius:" style="width:100%;height:8px"
/> />
</div> </div>
</div> </div>
@ -1171,7 +1171,7 @@ Array [
> >
<div <div
class="ant-progress-bg" class="ant-progress-bg"
style="width:50%;height:8px;border-radius:" style="width:50%;height:8px"
/> />
</div> </div>
</div> </div>
@ -1194,7 +1194,7 @@ exports[`renders ./components/progress/demo/line-mini.md correctly 1`] = `
> >
<div <div
class="ant-progress-bg" class="ant-progress-bg"
style="width:30%;height:6px;border-radius:" style="width:30%;height:6px"
/> />
</div> </div>
</div> </div>
@ -1216,7 +1216,7 @@ exports[`renders ./components/progress/demo/line-mini.md correctly 1`] = `
> >
<div <div
class="ant-progress-bg" class="ant-progress-bg"
style="width:50%;height:6px;border-radius:" style="width:50%;height:6px"
/> />
</div> </div>
</div> </div>
@ -1238,7 +1238,7 @@ exports[`renders ./components/progress/demo/line-mini.md correctly 1`] = `
> >
<div <div
class="ant-progress-bg" class="ant-progress-bg"
style="width:70%;height:6px;border-radius:" style="width:70%;height:6px"
/> />
</div> </div>
</div> </div>
@ -1277,7 +1277,7 @@ exports[`renders ./components/progress/demo/line-mini.md correctly 1`] = `
> >
<div <div
class="ant-progress-bg" class="ant-progress-bg"
style="width:100%;height:6px;border-radius:" style="width:100%;height:6px"
/> />
</div> </div>
</div> </div>
@ -1456,11 +1456,11 @@ Array [
> >
<div <div
class="ant-progress-bg" class="ant-progress-bg"
style="width:60%;height:8px;border-radius:" style="width:60%;height:8px"
/> />
<div <div
class="ant-progress-success-bg" class="ant-progress-success-bg"
style="width:30%;height:8px;border-radius:" style="width:30%;height:8px"
/> />
</div> </div>
</div> </div>

View File

@ -421,66 +421,28 @@ exports[`Progress render strokeColor 1`] = `
`; `;
exports[`Progress render strokeColor 2`] = ` exports[`Progress render strokeColor 2`] = `
<Progress <div
percent={50} class="ant-progress ant-progress-line ant-progress-status-normal ant-progress-show-info ant-progress-default"
showInfo={true}
size="default"
strokeColor={
Object {
"from": "#108ee9",
"to": "#87d068",
}
}
strokeLinecap="round"
trailColor={null}
type="line"
> >
<div <div
className="ant-progress ant-progress-line ant-progress-status-normal ant-progress-show-info ant-progress-default" class="ant-progress-outer"
> >
<Line <div
percent={50} class="ant-progress-inner"
prefixCls="ant-progress"
showInfo={true}
size="default"
strokeColor={
Object {
"from": "#108ee9",
"to": "#87d068",
}
}
strokeLinecap="round"
trailColor={null}
type="line"
> >
<div <div
className="ant-progress-outer" class="ant-progress-bg"
> style="width: 50%; height: 8px;"
<div />
className="ant-progress-inner" </div>
>
<div
className="ant-progress-bg"
style={
Object {
"backgroundImage": "linear-gradient(to right, #108ee9, #87d068)",
"borderRadius": "",
"height": 8,
"width": "50%",
}
}
/>
</div>
</div>
<span
className="ant-progress-text"
title="50%"
>
50%
</span>
</Line>
</div> </div>
</Progress> <span
class="ant-progress-text"
title="50%"
>
50%
</span>
</div>
`; `;
exports[`Progress render strokeColor 3`] = ` exports[`Progress render strokeColor 3`] = `

View File

@ -62,7 +62,7 @@ describe('Progress', () => {
}, },
type: 'line', type: 'line',
}); });
expect(wrapper).toMatchSnapshot(); expect(wrapper.render()).toMatchSnapshot();
wrapper.setProps({ wrapper.setProps({
strokeColor: { strokeColor: {
'0%': '#108ee9', '0%': '#108ee9',