mirror of
https://github.com/zoriya/react-native-web.git
synced 2026-06-03 10:46:19 +00:00
Add to Image tests
This commit is contained in:
+15
-4
@@ -132,6 +132,17 @@ exports[`components/Image prop "draggable" 1`] = `
|
||||
</div>
|
||||
`;
|
||||
|
||||
exports[`components/Image prop "nativeID" 1`] = `
|
||||
<div
|
||||
class="css-view-1dbjc4n r-flexBasis-1mlwlqe r-overflow-1udh08x r-zIndex-417010"
|
||||
id="nativeID"
|
||||
>
|
||||
<div
|
||||
class="css-view-1dbjc4n r-backgroundColor-1niwhzg r-backgroundPosition-vvn4in r-backgroundRepeat-u6sd8q r-backgroundSize-4gszlv r-bottom-1p0dtai r-height-1pi2tsx r-left-1d2f490 r-position-u8s1d r-right-zchlnj r-top-ipm5af r-width-13qz1uu r-zIndex-1wyyakw"
|
||||
/>
|
||||
</div>
|
||||
`;
|
||||
|
||||
exports[`components/Image prop "resizeMode" value "contain" 1`] = `
|
||||
<div
|
||||
class="css-view-1dbjc4n r-flexBasis-1mlwlqe r-overflow-1udh08x r-zIndex-417010"
|
||||
@@ -317,14 +328,14 @@ exports[`components/Image prop "style" removes other unsupported View styles 1`]
|
||||
>
|
||||
<div
|
||||
class="css-view-1dbjc4n r-backgroundColor-1niwhzg r-backgroundPosition-vvn4in r-backgroundRepeat-u6sd8q r-backgroundSize-4gszlv r-bottom-1p0dtai r-height-1pi2tsx r-left-1d2f490 r-position-u8s1d r-right-zchlnj r-top-ipm5af r-width-13qz1uu r-zIndex-1wyyakw"
|
||||
style="filter: url(#tint-53);"
|
||||
style="filter: url(#tint-54);"
|
||||
/>
|
||||
<svg
|
||||
style="position: absolute; height: 0px; visibility: hidden; width: 0px;"
|
||||
>
|
||||
<defs>
|
||||
<filter
|
||||
id="tint-53"
|
||||
id="tint-54"
|
||||
>
|
||||
<feflood
|
||||
flood-color="blue"
|
||||
@@ -366,7 +377,7 @@ exports[`components/Image prop "style" supports "tintcolor" property (convert to
|
||||
>
|
||||
<div
|
||||
class="css-view-1dbjc4n r-backgroundColor-1niwhzg r-backgroundPosition-vvn4in r-backgroundRepeat-u6sd8q r-backgroundSize-4gszlv r-bottom-1p0dtai r-height-1pi2tsx r-left-1d2f490 r-position-u8s1d r-right-zchlnj r-top-ipm5af r-width-13qz1uu r-zIndex-1wyyakw"
|
||||
style="background-image: url(https://google.com/favicon.ico); filter: url(#tint-52);"
|
||||
style="background-image: url(https://google.com/favicon.ico); filter: url(#tint-53);"
|
||||
/>
|
||||
<img
|
||||
alt=""
|
||||
@@ -379,7 +390,7 @@ exports[`components/Image prop "style" supports "tintcolor" property (convert to
|
||||
>
|
||||
<defs>
|
||||
<filter
|
||||
id="tint-52"
|
||||
id="tint-53"
|
||||
>
|
||||
<feflood
|
||||
flood-color="red"
|
||||
|
||||
@@ -83,6 +83,11 @@ describe('components/Image', () => {
|
||||
expect(container.firstChild).toMatchSnapshot();
|
||||
});
|
||||
|
||||
test('prop "nativeID"', () => {
|
||||
const { container } = render(<Image nativeID="nativeID" />);
|
||||
expect(container.firstChild).toMatchSnapshot();
|
||||
});
|
||||
|
||||
describe('prop "onLoad"', () => {
|
||||
test('is called after image is loaded from network', () => {
|
||||
jest.useFakeTimers();
|
||||
|
||||
Reference in New Issue
Block a user