Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
mertalev committed Dec 19, 2024
1 parent 8e724c3 commit c6ee910
Show file tree
Hide file tree
Showing 47 changed files with 2,706 additions and 3,173 deletions.
45 changes: 13 additions & 32 deletions e2e/src/api/specs/asset.e2e-spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -538,7 +538,7 @@ describe('/asset', () => {
expect(body).toMatchObject({
id: user1Assets[0].id,
exifInfo: expect.objectContaining({
dateTimeOriginal: '2023-11-20T01:11:00.000Z',
dateTimeOriginal: '2023-11-20T01:11:00+00:00',
}),
});
expect(status).toEqual(200);
Expand Down Expand Up @@ -608,7 +608,7 @@ describe('/asset', () => {
await utils.waitForQueueFinish(admin.accessToken, 'metadataExtraction');

const assetInfo = await utils.getAssetInfo(user1.accessToken, id);
expect(assetInfo.exifInfo?.dateTimeOriginal).toBe('2024-07-11T10:32:52.000Z');
expect(assetInfo.exifInfo?.dateTimeOriginal).toBe('2024-07-11T10:32:52+00:00');

const { status, body } = await request(app)
.put(`/assets/${id}`)
Expand All @@ -618,7 +618,7 @@ describe('/asset', () => {
expect(body).toMatchObject({
id,
exifInfo: expect.objectContaining({
dateTimeOriginal: '2023-11-20T01:11:00.000Z',
dateTimeOriginal: '2023-11-20T01:11:00+00:00',
}),
});
expect(status).toEqual(200);
Expand Down Expand Up @@ -953,8 +953,6 @@ describe('/asset', () => {
exifImageHeight: 1080,
exifImageWidth: 1617,
fileSizeInByte: 862_424,
latitude: null,
longitude: null,
},
},
},
Expand All @@ -964,19 +962,16 @@ describe('/asset', () => {
type: AssetTypeEnum.Image,
originalFileName: 'el_torcal_rocks.jpg',
exifInfo: {
dateTimeOriginal: '2012-08-05T11:39:59.000Z',
dateTimeOriginal: '2012-08-05T11:39:59+00:00',
exifImageWidth: 512,
exifImageHeight: 341,
latitude: null,
longitude: null,
focalLength: 75,
iso: 200,
fNumber: 11,
exposureTime: '1/160',
fileSizeInByte: 53_493,
make: 'SONY',
model: 'DSLR-A550',
orientation: null,
description: 'SONY DSC',
},
},
Expand All @@ -991,8 +986,6 @@ describe('/asset', () => {
exifImageHeight: 1080,
exifImageWidth: 1440,
fileSizeInByte: 1_780_777,
latitude: null,
longitude: null,
},
},
},
Expand All @@ -1003,7 +996,7 @@ describe('/asset', () => {
originalFileName: 'IMG_2682.heic',
fileCreatedAt: '2019-03-21T16:04:22.348Z',
exifInfo: {
dateTimeOriginal: '2019-03-21T16:04:22.348Z',
dateTimeOriginal: '2019-03-21T16:04:22.348+00:00',
exifImageWidth: 4032,
exifImageHeight: 3024,
latitude: 41.2203,
Expand All @@ -1028,8 +1021,6 @@ describe('/asset', () => {
exifInfo: {
exifImageWidth: 800,
exifImageHeight: 800,
latitude: null,
longitude: null,
fileSizeInByte: 25_408,
},
},
Expand All @@ -1048,9 +1039,7 @@ describe('/asset', () => {
focalLength: 18,
iso: 100,
fileSizeInByte: 9_057_784,
dateTimeOriginal: '2010-07-20T17:27:12.000Z',
latitude: null,
longitude: null,
dateTimeOriginal: '2010-07-20T17:27:12+00:00',
orientation: '1',
},
},
Expand All @@ -1069,9 +1058,7 @@ describe('/asset', () => {
focalLength: 85,
iso: 200,
fileSizeInByte: 15_856_335,
dateTimeOriginal: '2016-09-22T21:10:29.060Z',
latitude: null,
longitude: null,
dateTimeOriginal: '2016-09-22T21:10:29.06+00:00',
orientation: '1',
timeZone: 'UTC-4',
},
Expand All @@ -1093,9 +1080,7 @@ describe('/asset', () => {
focalLength: 35,
iso: 400,
fileSizeInByte: 19_587_072,
dateTimeOriginal: '2018-05-10T08:42:37.842Z',
latitude: null,
longitude: null,
dateTimeOriginal: '2018-05-10T08:42:37.842+00:00',
orientation: '1',
},
},
Expand All @@ -1117,9 +1102,7 @@ describe('/asset', () => {
iso: 100,
lensModel: 'E PZ 18-105mm F4 G OSS',
fileSizeInByte: 25_001_984,
dateTimeOriginal: '2016-09-27T10:51:44.000Z',
latitude: null,
longitude: null,
dateTimeOriginal: '2016-09-27T10:51:44+00:00',
orientation: '1',
},
},
Expand All @@ -1141,9 +1124,7 @@ describe('/asset', () => {
iso: 100,
lensModel: 'E 25mm F2',
fileSizeInByte: 49_512_448,
dateTimeOriginal: '2016-01-08T14:08:01.000Z',
latitude: null,
longitude: null,
dateTimeOriginal: '2016-01-08T14:08:01+00:00',
orientation: '1',
},
},
Expand All @@ -1165,7 +1146,7 @@ describe('/asset', () => {
iso: 80,
lensModel: null,
fileSizeInByte: 11_113_617,
dateTimeOriginal: '2015-12-27T09:55:40.000Z',
dateTimeOriginal: '2015-12-27T09:55:40+00:00',
latitude: null,
longitude: null,
orientation: '1',
Expand All @@ -1189,7 +1170,7 @@ describe('/asset', () => {
iso: 160,
lensModel: null,
fileSizeInByte: 13_551_312,
dateTimeOriginal: '2024-10-12T21:01:01.000Z',
dateTimeOriginal: '2024-10-12T21:01:01+00:00',
latitude: null,
longitude: null,
orientation: '6',
Expand All @@ -1203,7 +1184,7 @@ describe('/asset', () => {
originalFileName: 'Ricoh_GR3-450.DNG',
fileCreatedAt: '2024-06-08T13:48:39.000Z',
exifInfo: {
dateTimeOriginal: '2024-06-08T13:48:39.000Z',
dateTimeOriginal: '2024-06-08T13:48:39+00:00',
exifImageHeight: 4064,
exifImageWidth: 6112,
exposureTime: '1/400',
Expand Down
6 changes: 3 additions & 3 deletions e2e/src/api/specs/timeline.e2e-spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ describe('/timeline', () => {
it('should require authentication', async () => {
const { status, body } = await request(app).get('/timeline/bucket').query({
size: TimeBucketSize.Month,
timeBucket: '1900-01-01T00:00:00.000Z',
timeBucket: '1900-01-01',
});

expect(status).toBe(401);
Expand All @@ -161,7 +161,7 @@ describe('/timeline', () => {
it('should handle 5 digit years', async () => {
const { status, body } = await request(app)
.get('/timeline/bucket')
.query({ size: TimeBucketSize.Month, timeBucket: '+012345-01-01T00:00:00.000Z' })
.query({ size: TimeBucketSize.Month, timeBucket: '012345-01-01' })
.set('Authorization', `Bearer ${timeBucketUser.accessToken}`);

expect(status).toBe(200);
Expand All @@ -183,7 +183,7 @@ describe('/timeline', () => {
const { status, body } = await request(app)
.get('/timeline/bucket')
.set('Authorization', `Bearer ${timeBucketUser.accessToken}`)
.query({ size: TimeBucketSize.Month, timeBucket: '1970-02-10T00:00:00.000Z' });
.query({ size: TimeBucketSize.Month, timeBucket: '1970-02-10' });

expect(status).toBe(200);
expect(body).toEqual([]);
Expand Down
1 change: 1 addition & 0 deletions open-api/immich-openapi-specs.json
Original file line number Diff line number Diff line change
Expand Up @@ -8377,6 +8377,7 @@
"type": "string"
},
"AssetOrder": {
"default": "desc",
"enum": [
"asc",
"desc"
Expand Down
Loading

0 comments on commit c6ee910

Please sign in to comment.