-
Notifications
You must be signed in to change notification settings - Fork 28
/
photo.spec-helper.ts
56 lines (46 loc) · 1.63 KB
/
photo.spec-helper.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
import { Photo } from '../models/photo';
import { PhotosStateSlice } from '../reducers/photos-state-slice';
export const photo1: Photo = {
id: '50179462511',
title: 'Blauflügel-Prachtlibelle (Calopteryx virgo) (1)',
url_q: 'https://live.staticflickr.com/65535/50179462511_0752249fba_q.jpg',
url_m: 'https://live.staticflickr.com/65535/50179462511_0752249fba_m.jpg',
datetaken: '2020-06-21T15:16:07-08:00',
owner: '12639178@N07',
ownername: 'naturgucker.de',
tags: 'ngidn2020772215 calopteryxvirgo blauflügelprachtlibelle',
};
export const photo1Link = `https://www.flickr.com/photos/${photo1.owner}/${photo1.id}`;
export const photo2: Photo = {
id: '50178927498',
title: 'Blauflügel-Prachtlibelle (Calopteryx virgo) (2)',
url_q: 'https://live.staticflickr.com/65535/50178927498_44162cb1a0_q.jpg',
url_m: 'https://live.staticflickr.com/65535/50178927498_44162cb1a0_m.jpg',
datetaken: '2020-06-21T15:16:17-08:00',
owner: '12639178@N07',
ownername: 'naturgucker.de',
tags: 'ngid657236235 calopteryxvirgo blauflügelprachtlibelle',
};
export const photo2Link = `https://www.flickr.com/photos/${photo1.owner}/${photo1.id}`;
export const photos: Photo[] = [photo1, photo2];
export const searchTerm = 'calopteryx';
export const initialState: PhotosStateSlice = {
searchTerm: '',
photos: [],
currentPhoto: null,
};
export const stateWithSearchTerm: PhotosStateSlice = {
searchTerm,
photos: [],
currentPhoto: null,
};
export const stateWithPhotos: PhotosStateSlice = {
searchTerm,
photos,
currentPhoto: null,
};
export const stateWithCurrentPhoto: PhotosStateSlice = {
searchTerm,
photos,
currentPhoto: photo1,
};