diff --git a/frontend/cypress/integration/import/import.spec.ts b/frontend/cypress/integration/import/import.spec.ts index cf8233e936..8f0f774772 100644 --- a/frontend/cypress/integration/import/import.spec.ts +++ b/frontend/cypress/integration/import/import.spec.ts @@ -101,6 +101,10 @@ describe('imports', () => { cy.get("[data-testid='VALIDATE_BUTTON']").should('be.disabled'); + cy.intercept('POST', '/api/admin/features-batch/import').as( + 'featureImported', + ); + // cypress can only work with input@file that is visible cy.get('input[type=file]') .invoke('attr', 'style', 'display: block') @@ -111,9 +115,9 @@ describe('imports', () => { }); cy.get("[data-testid='VALIDATE_BUTTON']").click(); cy.get("[data-testid='IMPORT_CONFIGURATION_BUTTON']").click(); - // cy.contains('Import completed'); - cy.wait(1500); + cy.wait('@featureImported'); + cy.contains('Import completed'); cy.request({ url: `/api/admin/projects/default/features/${randomFeatureName}`,