Verified Commit faf5955a authored by Sébastiaan Versteeg's avatar Sébastiaan Versteeg
Browse files

Remove obsolete tests

parent c6d1ef2f
import React from 'react';
import renderer from 'react-test-renderer';
import AlbumListItem from '../../../../app/ui/screens/photos/AlbumListItem';
describe('AlbumListItem component', () => {
const photo = {
file: {
small: 'http://test.local/small.png',
medium: 'http://test.local/medium.png',
large: 'http://test.local/large.png',
full: 'http://test.local/full.png',
},
album: 0,
pk: 0,
size: 10,
};
const album = {
pk: 1,
title: 'Title',
date: '01-01-2017',
cover: photo,
};
it('renders correctly', () => {
const tree = renderer
.create(<AlbumListItem openAlbum={() => {}} album={album} size={20} />)
.toJSON();
expect(tree).toMatchSnapshot();
});
});
import React from 'react';
import renderer from 'react-test-renderer';
import PhotoListItem from '../../../../app/ui/screens/photos/PhotoListItem';
describe('PhotoView component', () => {
const photo = {
file: {
small: 'http://test.local/small.png',
medium: 'http://test.local/medium.png',
large: 'http://test.local/large.png',
full: 'http://test.local/full.png',
},
album: 0,
pk: 0,
size: 10,
};
it('renders correctly', () => {
const tree = renderer
.create(<PhotoListItem onPress={() => {}} photo={photo} size={20} token="token" />)
.toJSON();
expect(tree).toMatchSnapshot();
});
});
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`AlbumListItem component renders correctly 1`] = `
<View
style={
Array [
Object {},
Object {
"height": 20,
"width": 20,
},
]
}
>
<View
accessibilityComponentType={undefined}
accessibilityLabel={undefined}
accessibilityTraits={undefined}
accessible={true}
hasTVPreferredFocus={undefined}
hitSlop={undefined}
isTVSelectable={true}
nativeID={undefined}
onLayout={undefined}
onResponderGrant={[Function]}
onResponderMove={[Function]}
onResponderRelease={[Function]}
onResponderTerminate={[Function]}
onResponderTerminationRequest={[Function]}
onStartShouldSetResponder={[Function]}
style={
Object {
"flex": 1,
}
}
testID={undefined}
tvParallaxProperties={undefined}
>
<View
style={
Object {
"flex": 1,
}
}
>
<Image
source={
Object {
"uri": "http://test.local/small.png",
}
}
style={
Array [
Object {
"bottom": 0,
"left": 0,
"position": "absolute",
"right": 0,
"top": 0,
},
Object {
"height": undefined,
"width": undefined,
},
undefined,
]
}
/>
<BVLinearGradient
colors={
Array [
5570560,
4278190080,
]
}
endPoint={undefined}
locations={null}
startPoint={undefined}
style={
Object {
"bottom": 0,
"left": 0,
"opacity": 0.6,
"position": "absolute",
"right": 0,
"top": "50%",
}
}
/>
<View
style={
Object {
"bottom": 4,
"left": 6,
"position": "absolute",
"right": 6,
}
}
>
<Text
accessible={true}
allowFontScaling={true}
ellipsizeMode="tail"
style={
Object {
"backgroundColor": "transparent",
"color": "#FFFFFF",
"fontSize": 12,
}
}
>
Title
</Text>
<Text
accessible={true}
allowFontScaling={true}
ellipsizeMode="tail"
style={
Object {
"backgroundColor": "transparent",
"color": "#FFFFFF",
"fontSize": 10,
}
}
>
01-01-17
</Text>
</View>
</View>
</View>
</View>
`;
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`PhotoView component renders correctly 1`] = `
<View
accessibilityComponentType={undefined}
accessibilityLabel={undefined}
accessibilityTraits={undefined}
accessible={true}
hasTVPreferredFocus={undefined}
hitSlop={undefined}
isTVSelectable={true}
nativeID={undefined}
onLayout={undefined}
onResponderGrant={[Function]}
onResponderMove={[Function]}
onResponderRelease={[Function]}
onResponderTerminate={[Function]}
onResponderTerminationRequest={[Function]}
onStartShouldSetResponder={[Function]}
style={Object {}}
testID={undefined}
tvParallaxProperties={undefined}
>
<View
style={
Array [
Object {},
Object {
"height": 20,
"width": 20,
},
]
}
>
<Image
source={
Object {
"headers": Object {
"Authorization": "Token token",
},
"uri": "http://test.local/small.png",
}
}
style={
Array [
Object {},
Object {
"height": 20,
"width": 20,
},
]
}
/>
</View>
</View>
`;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment