diff --git a/test/e2e-test-application/e2e/tests/1-angular/microfrontends.spec.js b/test/e2e-test-application/e2e/tests/1-angular/microfrontends.spec.js index ac792d0dcc..078a7625e4 100644 --- a/test/e2e-test-application/e2e/tests/1-angular/microfrontends.spec.js +++ b/test/e2e-test-application/e2e/tests/1-angular/microfrontends.spec.js @@ -50,9 +50,9 @@ describe('Modal Microfrontend', () => { .get('[data-testid=modal-mf]') .should('be.visible'); - cy.get('[data-testid=modal-mf] iframe').then(ifr => { - cy.wrap(ifr[0].contentDocument) - .its('body') + cy.getIframeBody({}, 0, '.iframeModalCtn._modal').then(result => { + $iframeBody = result; + cy.wrap($iframeBody) .contains('Close modal') .click();