From 3c06b2d7e462a98770e12be314532c5a0f44c815 Mon Sep 17 00:00:00 2001 From: Juho Haapakoski Date: Tue, 29 Oct 2024 10:59:16 +0200 Subject: [PATCH] AE-2316: Fix e2e tests in GHA --- .../e2e/vanhentuneiden-tuhoaminen/todistusten-tuhoaminen.cy.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/e2e-tests/cypress/cypress/e2e/vanhentuneiden-tuhoaminen/todistusten-tuhoaminen.cy.js b/e2e-tests/cypress/cypress/e2e/vanhentuneiden-tuhoaminen/todistusten-tuhoaminen.cy.js index 7ced53470..c5dee284a 100644 --- a/e2e-tests/cypress/cypress/e2e/vanhentuneiden-tuhoaminen/todistusten-tuhoaminen.cy.js +++ b/e2e-tests/cypress/cypress/e2e/vanhentuneiden-tuhoaminen/todistusten-tuhoaminen.cy.js @@ -56,6 +56,7 @@ context('Laatija', () => { "update etp.energiatodistus set voimassaolo_paattymisaika = now() - interval '2 days' where id = 1;"; cy.task('executeQuery', { query, applicationName }).then(() => { + cy.wait(1000); cy.request( 'POST', `${backendUrl}/api/internal/energiatodistukset/anonymize-and-delete-expired` @@ -140,6 +141,7 @@ context('Paakayttaja', () => { const query = "update etp.energiatodistus set voimassaolo_paattymisaika = now() - interval '2 days' where id = 1;"; cy.task('executeQuery', { query, applicationName }).then(() => { + cy.wait(1000); cy.request( 'POST', `${backendUrl}/api/internal/energiatodistukset/anonymize-and-delete-expired` @@ -223,6 +225,7 @@ context('Public', () => { const query = "update etp.energiatodistus set voimassaolo_paattymisaika = now() - interval '2 days' where id = 1;"; cy.task('executeQuery', { query, applicationName }).then(() => { + cy.wait(1000); cy.request( 'POST', `${backendUrl}/api/internal/energiatodistukset/anonymize-and-delete-expired`