1
0
mirror of https://github.com/xuthus83/pigallery2.git synced 2024-11-03 21:04:03 +08:00

Fixing missing faces, also adding E2E tests to test them #704, fixes #713

This commit is contained in:
Patrik J. Braun 2023-09-06 21:09:13 +02:00
parent 1299b5d2bd
commit d34015f1ef
2 changed files with 30 additions and 2 deletions

View File

@ -7,10 +7,10 @@
[style.height.px]="size"> [style.height.px]="size">
<div class="photo" <div class="photo"
*ngIf="thumbnail && thumbnail.Available && false" *ngIf="thumbnail && thumbnail.Available"
[style.background-image]="getSanitizedThUrl()"></div> [style.background-image]="getSanitizedThUrl()"></div>
<ng-icon *ngIf="!thumbnail || !thumbnail.Available || true" <ng-icon *ngIf="!thumbnail || !thumbnail.Available"
class="no-image" name="ionPersonOutline"></ng-icon> class="no-image" name="ionPersonOutline"></ng-icon>
</div> </div>

View File

@ -0,0 +1,28 @@
describe('Faces', () => {
beforeEach(() => {
cy.visit('/');
cy.get('.card-body');
cy.get('.col-sm-12').contains('Login');
/* ==== Generated with Cypress Studio ==== */
cy.get('#username').type('admin');
cy.get('#password').clear();
cy.get('#password').type('admin');
cy.intercept({
method: 'Get',
url: '/pgapi/person',
}).as('getPerson');
cy.get('.col-sm-12 > .btn').click();
cy.get('nav .nav-item .nav-link').contains('Faces').click();
});
it('Show faces', () => {
cy.wait('@getPerson', {timeout: 10000});
// contains a folder
cy.get('app-face a > .info').contains('Alvin the Squirrel').should('exist');
});
it('Faces should have photos', () => {
cy.wait('@getPerson', {timeout: 10000});
// should have a photo
cy.get('app-face .photo-container .photo', {timeout: 10000}).should('exist');
});
});