You've already forked pigallery2
mirror of
https://github.com/bpatrik/pigallery2.git
synced 2025-12-13 23:56:56 +02:00
Enforcing faces support in metadata loader tests
This commit is contained in:
@@ -253,7 +253,7 @@ export class MetadataLoader {
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
/* Adobe Lightroom based face region structure*/
|
/* Adobe Lightroom based face region structure */
|
||||||
if (regionRoot.value &&
|
if (regionRoot.value &&
|
||||||
regionRoot.value['rdf:Description'] &&
|
regionRoot.value['rdf:Description'] &&
|
||||||
regionRoot.value['rdf:Description'].value &&
|
regionRoot.value['rdf:Description'].value &&
|
||||||
|
|||||||
@@ -4,10 +4,19 @@ import * as path from 'path';
|
|||||||
import {Config} from '../../../../../src/common/config/private/Config';
|
import {Config} from '../../../../../src/common/config/private/Config';
|
||||||
import {ProjectPath} from '../../../../../src/backend/ProjectPath';
|
import {ProjectPath} from '../../../../../src/backend/ProjectPath';
|
||||||
import {Utils} from '../../../../../src/common/Utils';
|
import {Utils} from '../../../../../src/common/Utils';
|
||||||
|
import {DatabaseType} from '../../../../../src/common/config/private/PrivateConfig';
|
||||||
|
|
||||||
|
declare const before: any;
|
||||||
|
|
||||||
describe('DiskMangerWorker', () => {
|
describe('DiskMangerWorker', () => {
|
||||||
// loading default settings (this might have been changed by other tests
|
// loading default settings (this might have been changed by other tests)
|
||||||
Config.loadSync();
|
before(() => {
|
||||||
|
Config.loadSync();
|
||||||
|
Config.Server.Database.type = DatabaseType.sqlite;
|
||||||
|
Config.Client.Faces.enabled = true;
|
||||||
|
Config.Client.Faces.keywordsToPersons = true;
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
it('should parse metadata', async () => {
|
it('should parse metadata', async () => {
|
||||||
Config.Server.Media.folder = path.join(__dirname, '/../../../assets');
|
Config.Server.Media.folder = path.join(__dirname, '/../../../assets');
|
||||||
|
|||||||
@@ -5,10 +5,20 @@ import * as path from 'path';
|
|||||||
import * as fs from 'fs';
|
import * as fs from 'fs';
|
||||||
import {PhotoProcessing} from '../../../../../src/backend/model/fileprocessing/PhotoProcessing';
|
import {PhotoProcessing} from '../../../../../src/backend/model/fileprocessing/PhotoProcessing';
|
||||||
import {Config} from '../../../../../src/common/config/private/Config';
|
import {Config} from '../../../../../src/common/config/private/Config';
|
||||||
|
import {DatabaseType} from '../../../../../src/common/config/private/PrivateConfig';
|
||||||
|
|
||||||
|
declare const before: any;
|
||||||
|
|
||||||
describe('MetadataLoader', () => {
|
describe('MetadataLoader', () => {
|
||||||
// loading default settings (this might have been changed by other tests
|
// loading default settings (this might have been changed by other tests)
|
||||||
Config.loadSync();
|
|
||||||
|
before(() => {
|
||||||
|
Config.loadSync();
|
||||||
|
Config.Server.Database.type = DatabaseType.sqlite;
|
||||||
|
Config.Client.Faces.enabled = true;
|
||||||
|
Config.Client.Faces.keywordsToPersons = true;
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
it('should load png', async () => {
|
it('should load png', async () => {
|
||||||
const data = await MetadataLoader.loadPhotoMetadata(path.join(__dirname, '/../../../assets/test_png.png'));
|
const data = await MetadataLoader.loadPhotoMetadata(path.join(__dirname, '/../../../assets/test_png.png'));
|
||||||
|
|||||||
Reference in New Issue
Block a user