mirror of
https://github.com/zhigang1992/react-native-web.git
synced 2026-04-29 04:44:52 +08:00
Shallow render ActivityIndicator tests
These snapshots should be improved by flattening the React Native style object.
This commit is contained in:
@@ -1,18 +1,30 @@
|
|||||||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||||
|
|
||||||
exports[`components/ActivityIndicator prop "animating" is "false" 1`] = `
|
exports[`components/ActivityIndicator prop "animating" is "false" 1`] = `
|
||||||
<div
|
<View
|
||||||
|
accessibilityRole="progressbar"
|
||||||
aria-valuemax="1"
|
aria-valuemax="1"
|
||||||
aria-valuemin="0"
|
aria-valuemin="0"
|
||||||
class="rn-alignItems-1awozwy rn-borderTopStyle-1efd50x rn-borderRightStyle-14skgim rn-borderBottomStyle-rull8r rn-borderLeftStyle-mm0ijv rn-borderTopWidth-13yce4e rn-borderRightWidth-fnigne rn-borderBottomWidth-ndvcnb rn-borderLeftWidth-gxnn5r rn-boxSizing-deolkf rn-display-6koalj rn-flexShrink-1qe8dj5 rn-flexBasis-1mlwlqe rn-flexDirection-eqz5dr rn-justifyContent-1777fci rn-marginTop-1mnahxq rn-marginRight-61z16t rn-marginBottom-p1pxzi rn-marginLeft-11wrixw rn-minHeight-ifefl9 rn-minWidth-bcqeeo rn-paddingTop-wk8lta rn-paddingRight-9aemit rn-paddingBottom-1mdbw0j rn-paddingLeft-gy4na3 rn-position-bnwqim"
|
style={
|
||||||
role="progressbar"
|
Array [
|
||||||
|
15,
|
||||||
|
undefined,
|
||||||
|
]
|
||||||
|
}
|
||||||
>
|
>
|
||||||
<div
|
<View
|
||||||
class="rn-alignItems-1oszu61 rn-animationDuration-17bb2tj rn-animationIterationCount-1muvv40 rn-animationName-dozj4v rn-animationPlayState-1abnn5w rn-animationTimingFunction-1ldzwu0 rn-borderTopStyle-1efd50x rn-borderRightStyle-14skgim rn-borderBottomStyle-rull8r rn-borderLeftStyle-mm0ijv rn-borderTopWidth-13yce4e rn-borderRightWidth-fnigne rn-borderBottomWidth-ndvcnb rn-borderLeftWidth-gxnn5r rn-boxSizing-deolkf rn-display-6koalj rn-flexShrink-1qe8dj5 rn-flexBasis-1mlwlqe rn-flexDirection-eqz5dr rn-height-z80fyv rn-marginTop-1mnahxq rn-marginRight-61z16t rn-marginBottom-p1pxzi rn-marginLeft-11wrixw rn-minHeight-ifefl9 rn-minWidth-bcqeeo rn-paddingTop-wk8lta rn-paddingRight-9aemit rn-paddingBottom-1mdbw0j rn-paddingLeft-gy4na3 rn-position-bnwqim rn-visibility-11j9u27 rn-width-19wmn03"
|
style={
|
||||||
|
Array [
|
||||||
|
19,
|
||||||
|
17,
|
||||||
|
18,
|
||||||
|
16,
|
||||||
|
]
|
||||||
|
}
|
||||||
>
|
>
|
||||||
<svg
|
<svg
|
||||||
height="100%"
|
height="100%"
|
||||||
viewbox="0 0 32 32"
|
viewBox="0 0 32 32"
|
||||||
width="100%"
|
width="100%"
|
||||||
>
|
>
|
||||||
<circle
|
<circle
|
||||||
@@ -20,35 +32,58 @@ exports[`components/ActivityIndicator prop "animating" is "false" 1`] = `
|
|||||||
cy="16"
|
cy="16"
|
||||||
fill="none"
|
fill="none"
|
||||||
r="14"
|
r="14"
|
||||||
stroke-width="4"
|
strokeWidth="4"
|
||||||
style="stroke:#1976D2;opacity:0.2;"
|
style={
|
||||||
|
Object {
|
||||||
|
"opacity": 0.2,
|
||||||
|
"stroke": "#1976D2",
|
||||||
|
}
|
||||||
|
}
|
||||||
/>
|
/>
|
||||||
<circle
|
<circle
|
||||||
cx="16"
|
cx="16"
|
||||||
cy="16"
|
cy="16"
|
||||||
fill="none"
|
fill="none"
|
||||||
r="14"
|
r="14"
|
||||||
stroke-width="4"
|
strokeWidth="4"
|
||||||
style="stroke:#1976D2;stroke-dasharray:80;stroke-dashoffset:60;"
|
style={
|
||||||
|
Object {
|
||||||
|
"stroke": "#1976D2",
|
||||||
|
"strokeDasharray": 80,
|
||||||
|
"strokeDashoffset": 60,
|
||||||
|
}
|
||||||
|
}
|
||||||
/>
|
/>
|
||||||
</svg>
|
</svg>
|
||||||
</div>
|
</View>
|
||||||
</div>
|
</View>
|
||||||
`;
|
`;
|
||||||
|
|
||||||
exports[`components/ActivityIndicator prop "animating" is "true" 1`] = `
|
exports[`components/ActivityIndicator prop "animating" is "true" 1`] = `
|
||||||
<div
|
<View
|
||||||
|
accessibilityRole="progressbar"
|
||||||
aria-valuemax="1"
|
aria-valuemax="1"
|
||||||
aria-valuemin="0"
|
aria-valuemin="0"
|
||||||
class="rn-alignItems-1awozwy rn-borderTopStyle-1efd50x rn-borderRightStyle-14skgim rn-borderBottomStyle-rull8r rn-borderLeftStyle-mm0ijv rn-borderTopWidth-13yce4e rn-borderRightWidth-fnigne rn-borderBottomWidth-ndvcnb rn-borderLeftWidth-gxnn5r rn-boxSizing-deolkf rn-display-6koalj rn-flexShrink-1qe8dj5 rn-flexBasis-1mlwlqe rn-flexDirection-eqz5dr rn-justifyContent-1777fci rn-marginTop-1mnahxq rn-marginRight-61z16t rn-marginBottom-p1pxzi rn-marginLeft-11wrixw rn-minHeight-ifefl9 rn-minWidth-bcqeeo rn-paddingTop-wk8lta rn-paddingRight-9aemit rn-paddingBottom-1mdbw0j rn-paddingLeft-gy4na3 rn-position-bnwqim"
|
style={
|
||||||
role="progressbar"
|
Array [
|
||||||
|
15,
|
||||||
|
undefined,
|
||||||
|
]
|
||||||
|
}
|
||||||
>
|
>
|
||||||
<div
|
<View
|
||||||
class="rn-alignItems-1oszu61 rn-animationDuration-17bb2tj rn-animationIterationCount-1muvv40 rn-animationName-dozj4v rn-animationTimingFunction-1ldzwu0 rn-borderTopStyle-1efd50x rn-borderRightStyle-14skgim rn-borderBottomStyle-rull8r rn-borderLeftStyle-mm0ijv rn-borderTopWidth-13yce4e rn-borderRightWidth-fnigne rn-borderBottomWidth-ndvcnb rn-borderLeftWidth-gxnn5r rn-boxSizing-deolkf rn-display-6koalj rn-flexShrink-1qe8dj5 rn-flexBasis-1mlwlqe rn-flexDirection-eqz5dr rn-height-z80fyv rn-marginTop-1mnahxq rn-marginRight-61z16t rn-marginBottom-p1pxzi rn-marginLeft-11wrixw rn-minHeight-ifefl9 rn-minWidth-bcqeeo rn-paddingTop-wk8lta rn-paddingRight-9aemit rn-paddingBottom-1mdbw0j rn-paddingLeft-gy4na3 rn-position-bnwqim rn-width-19wmn03"
|
style={
|
||||||
|
Array [
|
||||||
|
19,
|
||||||
|
17,
|
||||||
|
false,
|
||||||
|
false,
|
||||||
|
]
|
||||||
|
}
|
||||||
>
|
>
|
||||||
<svg
|
<svg
|
||||||
height="100%"
|
height="100%"
|
||||||
viewbox="0 0 32 32"
|
viewBox="0 0 32 32"
|
||||||
width="100%"
|
width="100%"
|
||||||
>
|
>
|
||||||
<circle
|
<circle
|
||||||
@@ -56,71 +91,94 @@ exports[`components/ActivityIndicator prop "animating" is "true" 1`] = `
|
|||||||
cy="16"
|
cy="16"
|
||||||
fill="none"
|
fill="none"
|
||||||
r="14"
|
r="14"
|
||||||
stroke-width="4"
|
strokeWidth="4"
|
||||||
style="stroke:#1976D2;opacity:0.2;"
|
style={
|
||||||
|
Object {
|
||||||
|
"opacity": 0.2,
|
||||||
|
"stroke": "#1976D2",
|
||||||
|
}
|
||||||
|
}
|
||||||
/>
|
/>
|
||||||
<circle
|
<circle
|
||||||
cx="16"
|
cx="16"
|
||||||
cy="16"
|
cy="16"
|
||||||
fill="none"
|
fill="none"
|
||||||
r="14"
|
r="14"
|
||||||
stroke-width="4"
|
strokeWidth="4"
|
||||||
style="stroke:#1976D2;stroke-dasharray:80;stroke-dashoffset:60;"
|
style={
|
||||||
|
Object {
|
||||||
|
"stroke": "#1976D2",
|
||||||
|
"strokeDasharray": 80,
|
||||||
|
"strokeDashoffset": 60,
|
||||||
|
}
|
||||||
|
}
|
||||||
/>
|
/>
|
||||||
</svg>
|
</svg>
|
||||||
</div>
|
</View>
|
||||||
</div>
|
</View>
|
||||||
`;
|
`;
|
||||||
|
|
||||||
exports[`components/ActivityIndicator prop "color" 1`] = `
|
exports[`components/ActivityIndicator prop "color" 1`] = `
|
||||||
<div
|
<svg
|
||||||
aria-valuemax="1"
|
height="100%"
|
||||||
aria-valuemin="0"
|
viewBox="0 0 32 32"
|
||||||
class="rn-alignItems-1awozwy rn-borderTopStyle-1efd50x rn-borderRightStyle-14skgim rn-borderBottomStyle-rull8r rn-borderLeftStyle-mm0ijv rn-borderTopWidth-13yce4e rn-borderRightWidth-fnigne rn-borderBottomWidth-ndvcnb rn-borderLeftWidth-gxnn5r rn-boxSizing-deolkf rn-display-6koalj rn-flexShrink-1qe8dj5 rn-flexBasis-1mlwlqe rn-flexDirection-eqz5dr rn-justifyContent-1777fci rn-marginTop-1mnahxq rn-marginRight-61z16t rn-marginBottom-p1pxzi rn-marginLeft-11wrixw rn-minHeight-ifefl9 rn-minWidth-bcqeeo rn-paddingTop-wk8lta rn-paddingRight-9aemit rn-paddingBottom-1mdbw0j rn-paddingLeft-gy4na3 rn-position-bnwqim"
|
width="100%"
|
||||||
role="progressbar"
|
|
||||||
>
|
>
|
||||||
<div
|
<circle
|
||||||
class="rn-alignItems-1oszu61 rn-animationDuration-17bb2tj rn-animationIterationCount-1muvv40 rn-animationName-dozj4v rn-animationTimingFunction-1ldzwu0 rn-borderTopStyle-1efd50x rn-borderRightStyle-14skgim rn-borderBottomStyle-rull8r rn-borderLeftStyle-mm0ijv rn-borderTopWidth-13yce4e rn-borderRightWidth-fnigne rn-borderBottomWidth-ndvcnb rn-borderLeftWidth-gxnn5r rn-boxSizing-deolkf rn-display-6koalj rn-flexShrink-1qe8dj5 rn-flexBasis-1mlwlqe rn-flexDirection-eqz5dr rn-height-z80fyv rn-marginTop-1mnahxq rn-marginRight-61z16t rn-marginBottom-p1pxzi rn-marginLeft-11wrixw rn-minHeight-ifefl9 rn-minWidth-bcqeeo rn-paddingTop-wk8lta rn-paddingRight-9aemit rn-paddingBottom-1mdbw0j rn-paddingLeft-gy4na3 rn-position-bnwqim rn-width-19wmn03"
|
cx="16"
|
||||||
>
|
cy="16"
|
||||||
<svg
|
fill="none"
|
||||||
height="100%"
|
r="14"
|
||||||
viewbox="0 0 32 32"
|
strokeWidth="4"
|
||||||
width="100%"
|
style={
|
||||||
>
|
Object {
|
||||||
<circle
|
"opacity": 0.2,
|
||||||
cx="16"
|
"stroke": "red",
|
||||||
cy="16"
|
}
|
||||||
fill="none"
|
}
|
||||||
r="14"
|
/>
|
||||||
stroke-width="4"
|
<circle
|
||||||
style="stroke:red;opacity:0.2;"
|
cx="16"
|
||||||
/>
|
cy="16"
|
||||||
<circle
|
fill="none"
|
||||||
cx="16"
|
r="14"
|
||||||
cy="16"
|
strokeWidth="4"
|
||||||
fill="none"
|
style={
|
||||||
r="14"
|
Object {
|
||||||
stroke-width="4"
|
"stroke": "red",
|
||||||
style="stroke:red;stroke-dasharray:80;stroke-dashoffset:60;"
|
"strokeDasharray": 80,
|
||||||
/>
|
"strokeDashoffset": 60,
|
||||||
</svg>
|
}
|
||||||
</div>
|
}
|
||||||
</div>
|
/>
|
||||||
|
</svg>
|
||||||
`;
|
`;
|
||||||
|
|
||||||
exports[`components/ActivityIndicator prop "hidesWhenStopped" is "false" 1`] = `
|
exports[`components/ActivityIndicator prop "hidesWhenStopped" is "false" 1`] = `
|
||||||
<div
|
<View
|
||||||
|
accessibilityRole="progressbar"
|
||||||
aria-valuemax="1"
|
aria-valuemax="1"
|
||||||
aria-valuemin="0"
|
aria-valuemin="0"
|
||||||
class="rn-alignItems-1awozwy rn-borderTopStyle-1efd50x rn-borderRightStyle-14skgim rn-borderBottomStyle-rull8r rn-borderLeftStyle-mm0ijv rn-borderTopWidth-13yce4e rn-borderRightWidth-fnigne rn-borderBottomWidth-ndvcnb rn-borderLeftWidth-gxnn5r rn-boxSizing-deolkf rn-display-6koalj rn-flexShrink-1qe8dj5 rn-flexBasis-1mlwlqe rn-flexDirection-eqz5dr rn-justifyContent-1777fci rn-marginTop-1mnahxq rn-marginRight-61z16t rn-marginBottom-p1pxzi rn-marginLeft-11wrixw rn-minHeight-ifefl9 rn-minWidth-bcqeeo rn-paddingTop-wk8lta rn-paddingRight-9aemit rn-paddingBottom-1mdbw0j rn-paddingLeft-gy4na3 rn-position-bnwqim"
|
style={
|
||||||
role="progressbar"
|
Array [
|
||||||
|
15,
|
||||||
|
undefined,
|
||||||
|
]
|
||||||
|
}
|
||||||
>
|
>
|
||||||
<div
|
<View
|
||||||
class="rn-alignItems-1oszu61 rn-animationDuration-17bb2tj rn-animationIterationCount-1muvv40 rn-animationName-dozj4v rn-animationPlayState-1abnn5w rn-animationTimingFunction-1ldzwu0 rn-borderTopStyle-1efd50x rn-borderRightStyle-14skgim rn-borderBottomStyle-rull8r rn-borderLeftStyle-mm0ijv rn-borderTopWidth-13yce4e rn-borderRightWidth-fnigne rn-borderBottomWidth-ndvcnb rn-borderLeftWidth-gxnn5r rn-boxSizing-deolkf rn-display-6koalj rn-flexShrink-1qe8dj5 rn-flexBasis-1mlwlqe rn-flexDirection-eqz5dr rn-height-z80fyv rn-marginTop-1mnahxq rn-marginRight-61z16t rn-marginBottom-p1pxzi rn-marginLeft-11wrixw rn-minHeight-ifefl9 rn-minWidth-bcqeeo rn-paddingTop-wk8lta rn-paddingRight-9aemit rn-paddingBottom-1mdbw0j rn-paddingLeft-gy4na3 rn-position-bnwqim rn-width-19wmn03"
|
style={
|
||||||
|
Array [
|
||||||
|
19,
|
||||||
|
17,
|
||||||
|
18,
|
||||||
|
false,
|
||||||
|
]
|
||||||
|
}
|
||||||
>
|
>
|
||||||
<svg
|
<svg
|
||||||
height="100%"
|
height="100%"
|
||||||
viewbox="0 0 32 32"
|
viewBox="0 0 32 32"
|
||||||
width="100%"
|
width="100%"
|
||||||
>
|
>
|
||||||
<circle
|
<circle
|
||||||
@@ -128,35 +186,58 @@ exports[`components/ActivityIndicator prop "hidesWhenStopped" is "false" 1`] = `
|
|||||||
cy="16"
|
cy="16"
|
||||||
fill="none"
|
fill="none"
|
||||||
r="14"
|
r="14"
|
||||||
stroke-width="4"
|
strokeWidth="4"
|
||||||
style="stroke:#1976D2;opacity:0.2;"
|
style={
|
||||||
|
Object {
|
||||||
|
"opacity": 0.2,
|
||||||
|
"stroke": "#1976D2",
|
||||||
|
}
|
||||||
|
}
|
||||||
/>
|
/>
|
||||||
<circle
|
<circle
|
||||||
cx="16"
|
cx="16"
|
||||||
cy="16"
|
cy="16"
|
||||||
fill="none"
|
fill="none"
|
||||||
r="14"
|
r="14"
|
||||||
stroke-width="4"
|
strokeWidth="4"
|
||||||
style="stroke:#1976D2;stroke-dasharray:80;stroke-dashoffset:60;"
|
style={
|
||||||
|
Object {
|
||||||
|
"stroke": "#1976D2",
|
||||||
|
"strokeDasharray": 80,
|
||||||
|
"strokeDashoffset": 60,
|
||||||
|
}
|
||||||
|
}
|
||||||
/>
|
/>
|
||||||
</svg>
|
</svg>
|
||||||
</div>
|
</View>
|
||||||
</div>
|
</View>
|
||||||
`;
|
`;
|
||||||
|
|
||||||
exports[`components/ActivityIndicator prop "hidesWhenStopped" is "true" 1`] = `
|
exports[`components/ActivityIndicator prop "hidesWhenStopped" is "true" 1`] = `
|
||||||
<div
|
<View
|
||||||
|
accessibilityRole="progressbar"
|
||||||
aria-valuemax="1"
|
aria-valuemax="1"
|
||||||
aria-valuemin="0"
|
aria-valuemin="0"
|
||||||
class="rn-alignItems-1awozwy rn-borderTopStyle-1efd50x rn-borderRightStyle-14skgim rn-borderBottomStyle-rull8r rn-borderLeftStyle-mm0ijv rn-borderTopWidth-13yce4e rn-borderRightWidth-fnigne rn-borderBottomWidth-ndvcnb rn-borderLeftWidth-gxnn5r rn-boxSizing-deolkf rn-display-6koalj rn-flexShrink-1qe8dj5 rn-flexBasis-1mlwlqe rn-flexDirection-eqz5dr rn-justifyContent-1777fci rn-marginTop-1mnahxq rn-marginRight-61z16t rn-marginBottom-p1pxzi rn-marginLeft-11wrixw rn-minHeight-ifefl9 rn-minWidth-bcqeeo rn-paddingTop-wk8lta rn-paddingRight-9aemit rn-paddingBottom-1mdbw0j rn-paddingLeft-gy4na3 rn-position-bnwqim"
|
style={
|
||||||
role="progressbar"
|
Array [
|
||||||
|
15,
|
||||||
|
undefined,
|
||||||
|
]
|
||||||
|
}
|
||||||
>
|
>
|
||||||
<div
|
<View
|
||||||
class="rn-alignItems-1oszu61 rn-animationDuration-17bb2tj rn-animationIterationCount-1muvv40 rn-animationName-dozj4v rn-animationPlayState-1abnn5w rn-animationTimingFunction-1ldzwu0 rn-borderTopStyle-1efd50x rn-borderRightStyle-14skgim rn-borderBottomStyle-rull8r rn-borderLeftStyle-mm0ijv rn-borderTopWidth-13yce4e rn-borderRightWidth-fnigne rn-borderBottomWidth-ndvcnb rn-borderLeftWidth-gxnn5r rn-boxSizing-deolkf rn-display-6koalj rn-flexShrink-1qe8dj5 rn-flexBasis-1mlwlqe rn-flexDirection-eqz5dr rn-height-z80fyv rn-marginTop-1mnahxq rn-marginRight-61z16t rn-marginBottom-p1pxzi rn-marginLeft-11wrixw rn-minHeight-ifefl9 rn-minWidth-bcqeeo rn-paddingTop-wk8lta rn-paddingRight-9aemit rn-paddingBottom-1mdbw0j rn-paddingLeft-gy4na3 rn-position-bnwqim rn-visibility-11j9u27 rn-width-19wmn03"
|
style={
|
||||||
|
Array [
|
||||||
|
19,
|
||||||
|
17,
|
||||||
|
18,
|
||||||
|
16,
|
||||||
|
]
|
||||||
|
}
|
||||||
>
|
>
|
||||||
<svg
|
<svg
|
||||||
height="100%"
|
height="100%"
|
||||||
viewbox="0 0 32 32"
|
viewBox="0 0 32 32"
|
||||||
width="100%"
|
width="100%"
|
||||||
>
|
>
|
||||||
<circle
|
<circle
|
||||||
@@ -164,35 +245,58 @@ exports[`components/ActivityIndicator prop "hidesWhenStopped" is "true" 1`] = `
|
|||||||
cy="16"
|
cy="16"
|
||||||
fill="none"
|
fill="none"
|
||||||
r="14"
|
r="14"
|
||||||
stroke-width="4"
|
strokeWidth="4"
|
||||||
style="stroke:#1976D2;opacity:0.2;"
|
style={
|
||||||
|
Object {
|
||||||
|
"opacity": 0.2,
|
||||||
|
"stroke": "#1976D2",
|
||||||
|
}
|
||||||
|
}
|
||||||
/>
|
/>
|
||||||
<circle
|
<circle
|
||||||
cx="16"
|
cx="16"
|
||||||
cy="16"
|
cy="16"
|
||||||
fill="none"
|
fill="none"
|
||||||
r="14"
|
r="14"
|
||||||
stroke-width="4"
|
strokeWidth="4"
|
||||||
style="stroke:#1976D2;stroke-dasharray:80;stroke-dashoffset:60;"
|
style={
|
||||||
|
Object {
|
||||||
|
"stroke": "#1976D2",
|
||||||
|
"strokeDasharray": 80,
|
||||||
|
"strokeDashoffset": 60,
|
||||||
|
}
|
||||||
|
}
|
||||||
/>
|
/>
|
||||||
</svg>
|
</svg>
|
||||||
</div>
|
</View>
|
||||||
</div>
|
</View>
|
||||||
`;
|
`;
|
||||||
|
|
||||||
exports[`components/ActivityIndicator prop "size" is "large" 1`] = `
|
exports[`components/ActivityIndicator prop "size" is "large" 1`] = `
|
||||||
<div
|
<View
|
||||||
|
accessibilityRole="progressbar"
|
||||||
aria-valuemax="1"
|
aria-valuemax="1"
|
||||||
aria-valuemin="0"
|
aria-valuemin="0"
|
||||||
class="rn-alignItems-1awozwy rn-borderTopStyle-1efd50x rn-borderRightStyle-14skgim rn-borderBottomStyle-rull8r rn-borderLeftStyle-mm0ijv rn-borderTopWidth-13yce4e rn-borderRightWidth-fnigne rn-borderBottomWidth-ndvcnb rn-borderLeftWidth-gxnn5r rn-boxSizing-deolkf rn-display-6koalj rn-flexShrink-1qe8dj5 rn-flexBasis-1mlwlqe rn-flexDirection-eqz5dr rn-justifyContent-1777fci rn-marginTop-1mnahxq rn-marginRight-61z16t rn-marginBottom-p1pxzi rn-marginLeft-11wrixw rn-minHeight-ifefl9 rn-minWidth-bcqeeo rn-paddingTop-wk8lta rn-paddingRight-9aemit rn-paddingBottom-1mdbw0j rn-paddingLeft-gy4na3 rn-position-bnwqim"
|
style={
|
||||||
role="progressbar"
|
Array [
|
||||||
|
15,
|
||||||
|
undefined,
|
||||||
|
]
|
||||||
|
}
|
||||||
>
|
>
|
||||||
<div
|
<View
|
||||||
class="rn-alignItems-1oszu61 rn-animationDuration-17bb2tj rn-animationIterationCount-1muvv40 rn-animationName-dozj4v rn-animationTimingFunction-1ldzwu0 rn-borderTopStyle-1efd50x rn-borderRightStyle-14skgim rn-borderBottomStyle-rull8r rn-borderLeftStyle-mm0ijv rn-borderTopWidth-13yce4e rn-borderRightWidth-fnigne rn-borderBottomWidth-ndvcnb rn-borderLeftWidth-gxnn5r rn-boxSizing-deolkf rn-display-6koalj rn-flexShrink-1qe8dj5 rn-flexBasis-1mlwlqe rn-flexDirection-eqz5dr rn-height-1r8g8re rn-marginTop-1mnahxq rn-marginRight-61z16t rn-marginBottom-p1pxzi rn-marginLeft-11wrixw rn-minHeight-ifefl9 rn-minWidth-bcqeeo rn-paddingTop-wk8lta rn-paddingRight-9aemit rn-paddingBottom-1mdbw0j rn-paddingLeft-gy4na3 rn-position-bnwqim rn-width-1acpoxo"
|
style={
|
||||||
|
Array [
|
||||||
|
20,
|
||||||
|
17,
|
||||||
|
false,
|
||||||
|
false,
|
||||||
|
]
|
||||||
|
}
|
||||||
>
|
>
|
||||||
<svg
|
<svg
|
||||||
height="100%"
|
height="100%"
|
||||||
viewbox="0 0 32 32"
|
viewBox="0 0 32 32"
|
||||||
width="100%"
|
width="100%"
|
||||||
>
|
>
|
||||||
<circle
|
<circle
|
||||||
@@ -200,36 +304,61 @@ exports[`components/ActivityIndicator prop "size" is "large" 1`] = `
|
|||||||
cy="16"
|
cy="16"
|
||||||
fill="none"
|
fill="none"
|
||||||
r="14"
|
r="14"
|
||||||
stroke-width="4"
|
strokeWidth="4"
|
||||||
style="stroke:#1976D2;opacity:0.2;"
|
style={
|
||||||
|
Object {
|
||||||
|
"opacity": 0.2,
|
||||||
|
"stroke": "#1976D2",
|
||||||
|
}
|
||||||
|
}
|
||||||
/>
|
/>
|
||||||
<circle
|
<circle
|
||||||
cx="16"
|
cx="16"
|
||||||
cy="16"
|
cy="16"
|
||||||
fill="none"
|
fill="none"
|
||||||
r="14"
|
r="14"
|
||||||
stroke-width="4"
|
strokeWidth="4"
|
||||||
style="stroke:#1976D2;stroke-dasharray:80;stroke-dashoffset:60;"
|
style={
|
||||||
|
Object {
|
||||||
|
"stroke": "#1976D2",
|
||||||
|
"strokeDasharray": 80,
|
||||||
|
"strokeDashoffset": 60,
|
||||||
|
}
|
||||||
|
}
|
||||||
/>
|
/>
|
||||||
</svg>
|
</svg>
|
||||||
</div>
|
</View>
|
||||||
</div>
|
</View>
|
||||||
`;
|
`;
|
||||||
|
|
||||||
exports[`components/ActivityIndicator prop "size" is a number 1`] = `
|
exports[`components/ActivityIndicator prop "size" is a number 1`] = `
|
||||||
<div
|
<View
|
||||||
|
accessibilityRole="progressbar"
|
||||||
aria-valuemax="1"
|
aria-valuemax="1"
|
||||||
aria-valuemin="0"
|
aria-valuemin="0"
|
||||||
class="rn-alignItems-1awozwy rn-borderTopStyle-1efd50x rn-borderRightStyle-14skgim rn-borderBottomStyle-rull8r rn-borderLeftStyle-mm0ijv rn-borderTopWidth-13yce4e rn-borderRightWidth-fnigne rn-borderBottomWidth-ndvcnb rn-borderLeftWidth-gxnn5r rn-boxSizing-deolkf rn-display-6koalj rn-flexShrink-1qe8dj5 rn-flexBasis-1mlwlqe rn-flexDirection-eqz5dr rn-justifyContent-1777fci rn-marginTop-1mnahxq rn-marginRight-61z16t rn-marginBottom-p1pxzi rn-marginLeft-11wrixw rn-minHeight-ifefl9 rn-minWidth-bcqeeo rn-paddingTop-wk8lta rn-paddingRight-9aemit rn-paddingBottom-1mdbw0j rn-paddingLeft-gy4na3 rn-position-bnwqim"
|
style={
|
||||||
role="progressbar"
|
Array [
|
||||||
|
15,
|
||||||
|
undefined,
|
||||||
|
]
|
||||||
|
}
|
||||||
>
|
>
|
||||||
<div
|
<View
|
||||||
class="rn-alignItems-1oszu61 rn-animationDuration-17bb2tj rn-animationIterationCount-1muvv40 rn-animationName-dozj4v rn-animationTimingFunction-1ldzwu0 rn-borderTopStyle-1efd50x rn-borderRightStyle-14skgim rn-borderBottomStyle-rull8r rn-borderLeftStyle-mm0ijv rn-borderTopWidth-13yce4e rn-borderRightWidth-fnigne rn-borderBottomWidth-ndvcnb rn-borderLeftWidth-gxnn5r rn-boxSizing-deolkf rn-display-6koalj rn-flexShrink-1qe8dj5 rn-flexBasis-1mlwlqe rn-flexDirection-eqz5dr rn-marginTop-1mnahxq rn-marginRight-61z16t rn-marginBottom-p1pxzi rn-marginLeft-11wrixw rn-minHeight-ifefl9 rn-minWidth-bcqeeo rn-paddingTop-wk8lta rn-paddingRight-9aemit rn-paddingBottom-1mdbw0j rn-paddingLeft-gy4na3 rn-position-bnwqim"
|
style={
|
||||||
style="height:30px;width:30px;"
|
Array [
|
||||||
|
Object {
|
||||||
|
"height": 30,
|
||||||
|
"width": 30,
|
||||||
|
},
|
||||||
|
17,
|
||||||
|
false,
|
||||||
|
false,
|
||||||
|
]
|
||||||
|
}
|
||||||
>
|
>
|
||||||
<svg
|
<svg
|
||||||
height="100%"
|
height="100%"
|
||||||
viewbox="0 0 32 32"
|
viewBox="0 0 32 32"
|
||||||
width="100%"
|
width="100%"
|
||||||
>
|
>
|
||||||
<circle
|
<circle
|
||||||
@@ -237,18 +366,29 @@ exports[`components/ActivityIndicator prop "size" is a number 1`] = `
|
|||||||
cy="16"
|
cy="16"
|
||||||
fill="none"
|
fill="none"
|
||||||
r="14"
|
r="14"
|
||||||
stroke-width="4"
|
strokeWidth="4"
|
||||||
style="stroke:#1976D2;opacity:0.2;"
|
style={
|
||||||
|
Object {
|
||||||
|
"opacity": 0.2,
|
||||||
|
"stroke": "#1976D2",
|
||||||
|
}
|
||||||
|
}
|
||||||
/>
|
/>
|
||||||
<circle
|
<circle
|
||||||
cx="16"
|
cx="16"
|
||||||
cy="16"
|
cy="16"
|
||||||
fill="none"
|
fill="none"
|
||||||
r="14"
|
r="14"
|
||||||
stroke-width="4"
|
strokeWidth="4"
|
||||||
style="stroke:#1976D2;stroke-dasharray:80;stroke-dashoffset:60;"
|
style={
|
||||||
|
Object {
|
||||||
|
"stroke": "#1976D2",
|
||||||
|
"strokeDasharray": 80,
|
||||||
|
"strokeDashoffset": 60,
|
||||||
|
}
|
||||||
|
}
|
||||||
/>
|
/>
|
||||||
</svg>
|
</svg>
|
||||||
</div>
|
</View>
|
||||||
</div>
|
</View>
|
||||||
`;
|
`;
|
||||||
|
|||||||
@@ -2,46 +2,46 @@
|
|||||||
|
|
||||||
import ActivityIndicator from '..';
|
import ActivityIndicator from '..';
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { render } from 'enzyme';
|
import { shallow } from 'enzyme';
|
||||||
|
|
||||||
describe('components/ActivityIndicator', () => {
|
describe('components/ActivityIndicator', () => {
|
||||||
describe('prop "animating"', () => {
|
describe('prop "animating"', () => {
|
||||||
test('is "true"', () => {
|
test('is "true"', () => {
|
||||||
const component = render(<ActivityIndicator animating={true} />);
|
const component = shallow(<ActivityIndicator animating={true} />);
|
||||||
expect(component).toMatchSnapshot();
|
expect(component).toMatchSnapshot();
|
||||||
});
|
});
|
||||||
|
|
||||||
test('is "false"', () => {
|
test('is "false"', () => {
|
||||||
const component = render(<ActivityIndicator animating={false} />);
|
const component = shallow(<ActivityIndicator animating={false} />);
|
||||||
expect(component).toMatchSnapshot();
|
expect(component).toMatchSnapshot();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
test('prop "color"', () => {
|
test('prop "color"', () => {
|
||||||
const component = render(<ActivityIndicator color="red" />);
|
const component = shallow(<ActivityIndicator color="red" />).find('svg');
|
||||||
expect(component).toMatchSnapshot();
|
expect(component).toMatchSnapshot();
|
||||||
});
|
});
|
||||||
|
|
||||||
describe('prop "hidesWhenStopped"', () => {
|
describe('prop "hidesWhenStopped"', () => {
|
||||||
test('is "true"', () => {
|
test('is "true"', () => {
|
||||||
const component = render(<ActivityIndicator animating={false} hidesWhenStopped={true} />);
|
const component = shallow(<ActivityIndicator animating={false} hidesWhenStopped={true} />);
|
||||||
expect(component).toMatchSnapshot();
|
expect(component).toMatchSnapshot();
|
||||||
});
|
});
|
||||||
|
|
||||||
test('is "false"', () => {
|
test('is "false"', () => {
|
||||||
const component = render(<ActivityIndicator animating={false} hidesWhenStopped={false} />);
|
const component = shallow(<ActivityIndicator animating={false} hidesWhenStopped={false} />);
|
||||||
expect(component).toMatchSnapshot();
|
expect(component).toMatchSnapshot();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
describe('prop "size"', () => {
|
describe('prop "size"', () => {
|
||||||
test('is "large"', () => {
|
test('is "large"', () => {
|
||||||
const component = render(<ActivityIndicator size="large" />);
|
const component = shallow(<ActivityIndicator size="large" />);
|
||||||
expect(component).toMatchSnapshot();
|
expect(component).toMatchSnapshot();
|
||||||
});
|
});
|
||||||
|
|
||||||
test('is a number', () => {
|
test('is a number', () => {
|
||||||
const component = render(<ActivityIndicator size={30} />);
|
const component = shallow(<ActivityIndicator size={30} />);
|
||||||
expect(component).toMatchSnapshot();
|
expect(component).toMatchSnapshot();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user