Skip to content

Commit

Permalink
remove image snapshot tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Jeremy Hamilton committed Sep 22, 2020
1 parent 0274afb commit 90121af
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 165 deletions.
27 changes: 0 additions & 27 deletions src/image/__tests__/Image.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,33 +15,6 @@ describe('Image Component', () => {
global.console.warn = () => null;
});

it('should render on ios', () => {
const component = shallow(
<Image source={{ uri: 'https://i.imgur.com/0y8Ftya.jpg' }} />
);

component.find({ testID: 'RNE__Image' }).prop('onLoad')();
jest.runOnlyPendingTimers();

expect(component.length).toBe(1);
expect(toJson(component)).toMatchSnapshot();
});

it('should render on android', () => {
Platform.OS = 'android';
Platform.Version = 25;

const component = shallow(
<Image source={{ uri: 'https://i.imgur.com/0y8Ftya.jpg' }} />
);

component.find({ testID: 'RNE__Image' }).prop('onLoad')();
jest.runOnlyPendingTimers();

expect(component.length).toBe(1);
expect(toJson(component)).toMatchSnapshot();
});

it('should render the appropriate testId when one is passed.', () => {
const component = shallow(
<Image
Expand Down
138 changes: 0 additions & 138 deletions src/image/__tests__/__snapshots__/Image.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -198,144 +198,6 @@ exports[`Image Component should apply values from theme 1`] = `
</View>
`;

exports[`Image Component should render on android 1`] = `
<View
accessibilityIgnoresInvertColors={true}
style={
Object {
"backgroundColor": "transparent",
"overflow": "hidden",
"position": "relative",
}
}
>
<Image
onLoad={[Function]}
source={
Object {
"uri": "https://i.imgur.com/0y8Ftya.jpg",
}
}
style={
Object {
"bottom": 0,
"height": undefined,
"left": 0,
"position": "absolute",
"right": 0,
"top": 0,
"width": undefined,
}
}
testID="RNE__Image"
transition={true}
transitionDuration={360}
/>
<ForwardRef(AnimatedComponentWrapper)
accessibilityElementsHidden={true}
importantForAccessibility="no-hide-descendants"
pointerEvents="none"
style={
Array [
Object {
"bottom": 0,
"left": 0,
"position": "absolute",
"right": 0,
"top": 0,
},
Object {
"opacity": 0.9999710210009842,
},
]
}
>
<View
style={
Object {
"alignItems": "center",
"backgroundColor": "#bdbdbd",
"justifyContent": "center",
}
}
testID="RNE__Image__placeholder"
/>
</ForwardRef(AnimatedComponentWrapper)>
<View
style={Object {}}
/>
</View>
`;

exports[`Image Component should render on ios 1`] = `
<View
accessibilityIgnoresInvertColors={true}
style={
Object {
"backgroundColor": "transparent",
"overflow": "hidden",
"position": "relative",
}
}
>
<Image
onLoad={[Function]}
source={
Object {
"uri": "https://i.imgur.com/0y8Ftya.jpg",
}
}
style={
Object {
"bottom": 0,
"height": undefined,
"left": 0,
"position": "absolute",
"right": 0,
"top": 0,
"width": undefined,
}
}
testID="RNE__Image"
transition={true}
transitionDuration={360}
/>
<ForwardRef(AnimatedComponentWrapper)
accessibilityElementsHidden={true}
importantForAccessibility="no-hide-descendants"
pointerEvents="none"
style={
Array [
Object {
"bottom": 0,
"left": 0,
"position": "absolute",
"right": 0,
"top": 0,
},
Object {
"opacity": 0.9999710210009842,
},
]
}
>
<View
style={
Object {
"alignItems": "center",
"backgroundColor": "#bdbdbd",
"justifyContent": "center",
}
}
testID="RNE__Image__placeholder"
/>
</ForwardRef(AnimatedComponentWrapper)>
<View
style={Object {}}
/>
</View>
`;

exports[`Image Component should render without the transition 1`] = `
<View
accessibilityIgnoresInvertColors={true}
Expand Down

0 comments on commit 90121af

Please sign in to comment.