mirror of
https://github.com/bpatrik/pigallery2.git
synced 2024-12-23 01:27:14 +02:00
29 lines
923 B
TypeScript
29 lines
923 B
TypeScript
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({force: true});
|
|
});
|
|
it('Show faces', () => {
|
|
cy.wait('@getPerson', {timeout: 10000});
|
|
// contains a folder
|
|
cy.get('app-face a > .info', {timeout: 10000}).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');
|
|
});
|
|
|
|
});
|