From ae1309b01152b9807c44caaee8da467a19e37267 Mon Sep 17 00:00:00 2001 From: gras Date: Sun, 31 Mar 2024 16:15:45 +0200 Subject: [PATCH] moved some tests, that seemed to influence indexing tests --- .../assets/{ => title_caption}/description.json | 0 .../assets/{ => title_caption}/description.png | Bin test/backend/assets/{ => title_caption}/digikam.jpg | Bin .../backend/assets/{ => title_caption}/digikam.json | 0 .../unit/model/threading/DiskManagerWorker.spec.ts | 2 +- .../unit/model/threading/MetaDataLoader.spec.ts | 8 ++++---- 6 files changed, 5 insertions(+), 5 deletions(-) rename test/backend/assets/{ => title_caption}/description.json (100%) rename test/backend/assets/{ => title_caption}/description.png (100%) rename test/backend/assets/{ => title_caption}/digikam.jpg (100%) rename test/backend/assets/{ => title_caption}/digikam.json (100%) diff --git a/test/backend/assets/description.json b/test/backend/assets/title_caption/description.json similarity index 100% rename from test/backend/assets/description.json rename to test/backend/assets/title_caption/description.json diff --git a/test/backend/assets/description.png b/test/backend/assets/title_caption/description.png similarity index 100% rename from test/backend/assets/description.png rename to test/backend/assets/title_caption/description.png diff --git a/test/backend/assets/digikam.jpg b/test/backend/assets/title_caption/digikam.jpg similarity index 100% rename from test/backend/assets/digikam.jpg rename to test/backend/assets/title_caption/digikam.jpg diff --git a/test/backend/assets/digikam.json b/test/backend/assets/title_caption/digikam.json similarity index 100% rename from test/backend/assets/digikam.json rename to test/backend/assets/title_caption/digikam.json diff --git a/test/backend/unit/model/threading/DiskManagerWorker.spec.ts b/test/backend/unit/model/threading/DiskManagerWorker.spec.ts index 2b163d58..a04ee32f 100644 --- a/test/backend/unit/model/threading/DiskManagerWorker.spec.ts +++ b/test/backend/unit/model/threading/DiskManagerWorker.spec.ts @@ -24,7 +24,7 @@ describe('DiskMangerWorker', () => { ProjectPath.ImageFolder = path.join(__dirname, '/../../../assets'); const dir = await DiskManager.scanDirectory('/'); // should match the number of media (photo/video) files in the assets folder - expect(dir.media.length).to.be.equals(17); + expect(dir.media.length).to.be.equals(15); // eslint-disable-next-line @typescript-eslint/no-var-requires const expected = require(path.join(__dirname, '/../../../assets/test image öüóőúéáű-.,.json')); const i = dir.media.findIndex(m => m.name === 'test image öüóőúéáű-.,.jpg'); diff --git a/test/backend/unit/model/threading/MetaDataLoader.spec.ts b/test/backend/unit/model/threading/MetaDataLoader.spec.ts index 4e21c25d..d52ccd1d 100644 --- a/test/backend/unit/model/threading/MetaDataLoader.spec.ts +++ b/test/backend/unit/model/threading/MetaDataLoader.spec.ts @@ -36,8 +36,8 @@ describe('MetadataLoader', () => { }); it('should load png with description', async () => { - const data = await MetadataLoader.loadPhotoMetadata(path.join(__dirname, '/../../../assets/description.png')); - const expected = require(path.join(__dirname, '/../../../assets/description.json')); + const data = await MetadataLoader.loadPhotoMetadata(path.join(__dirname, '/../../../assets/title_caption/description.png')); + const expected = require(path.join(__dirname, '/../../../assets/title_caption/description.json')); expect(Utils.clone(data)).to.be.deep.equal(expected); }); @@ -186,8 +186,8 @@ describe('MetadataLoader', () => { expect(Utils.clone(data)).to.be.deep.equal(expected); }); it('should load image with metadata saved by digikam', async () => { - const data = await MetadataLoader.loadPhotoMetadata(path.join(__dirname, '/../../../assets/digikam.jpg')); - const expected = require(path.join(__dirname, '/../../../assets/digikam.json')); + const data = await MetadataLoader.loadPhotoMetadata(path.join(__dirname, '/../../../assets/title_caption/digikam.jpg')); + const expected = require(path.join(__dirname, '/../../../assets/title_caption/digikam.json')); expect(Utils.clone(data)).to.be.deep.equal(expected); });