From 040154502e822b1b09558e3c57f193625ae134a3 Mon Sep 17 00:00:00 2001 From: "Patrik J. Braun" Date: Wed, 6 Sep 2023 21:50:33 +0200 Subject: [PATCH] Waiting for directory scanning before testing faces E2E --- test/cypress/e2e/faces.cy.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/test/cypress/e2e/faces.cy.ts b/test/cypress/e2e/faces.cy.ts index 029e432e..a3461720 100644 --- a/test/cypress/e2e/faces.cy.ts +++ b/test/cypress/e2e/faces.cy.ts @@ -7,11 +7,17 @@ describe('Faces', () => { cy.get('#username').type('admin'); cy.get('#password').clear(); cy.get('#password').type('admin'); + cy.intercept({ + method: 'Get', + url: '/pgapi/gallery/content/', + }).as('getContent'); cy.intercept({ method: 'Get', url: '/pgapi/person', }).as('getPerson'); cy.get('.col-sm-12 > .btn').click(); + // make sure that the dir is parsed before navigating to faces + cy.wait('@getContent'); cy.get('nav .nav-item .nav-link').contains('Faces').click({force: true}); }); it('Show faces', () => {