From 55ceb76e3356ab0c50980e41dd7c477306d67adb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Iv=C3=A1n=20Ovejero?= Date: Wed, 28 Aug 2024 09:29:54 +0200 Subject: [PATCH 1/3] ci: Mock self-install request in all e2e tests (no-changelog) Follow-up to #10331 --- cypress/support/e2e.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/cypress/support/e2e.ts b/cypress/support/e2e.ts index 4d5d7a7f9af75..25f63ee5190f7 100644 --- a/cypress/support/e2e.ts +++ b/cypress/support/e2e.ts @@ -39,6 +39,7 @@ beforeEach(() => { cy.intercept('POST', '/rest/license/renew', {}); + cy.intercept('GET', 'https://n8n.io/self-install', (req) => req.reply(200)).as('iframeRequest'); cy.intercept({ pathname: '/api/health' }, { status: 'OK' }).as('healthCheck'); cy.intercept({ pathname: '/api/versions/*' }, [ { From 636458056393c81241833c0e200efb86d75dbd16 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Iv=C3=A1n=20Ovejero?= Date: Wed, 28 Aug 2024 09:55:56 +0200 Subject: [PATCH 2/3] Remove mock from individual test --- cypress/e2e/46-n8n.io-iframe.cy.ts | 2 -- 1 file changed, 2 deletions(-) diff --git a/cypress/e2e/46-n8n.io-iframe.cy.ts b/cypress/e2e/46-n8n.io-iframe.cy.ts index 8d31fb251e7c1..fee5dfd9c3780 100644 --- a/cypress/e2e/46-n8n.io-iframe.cy.ts +++ b/cypress/e2e/46-n8n.io-iframe.cy.ts @@ -23,8 +23,6 @@ describe('n8n.io iframe', () => { const iframeUrl = `https://n8n.io/self-install?instanceId=${testInstanceId}&userId=${testUserId}`; - cy.intercept(iframeUrl, (req) => req.reply(200)).as('iframeRequest'); - cy.visit(workflowsPage.url); cy.get('iframe').should('exist').and('have.attr', 'src', iframeUrl); From 14d83ed705ae7a1be8b50221a1b38d1052335f42 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Iv=C3=A1n=20Ovejero?= Date: Wed, 28 Aug 2024 10:22:33 +0200 Subject: [PATCH 3/3] Revert "Remove mock from individual test" This reverts commit 636458056393c81241833c0e200efb86d75dbd16. --- cypress/e2e/46-n8n.io-iframe.cy.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cypress/e2e/46-n8n.io-iframe.cy.ts b/cypress/e2e/46-n8n.io-iframe.cy.ts index fee5dfd9c3780..8d31fb251e7c1 100644 --- a/cypress/e2e/46-n8n.io-iframe.cy.ts +++ b/cypress/e2e/46-n8n.io-iframe.cy.ts @@ -23,6 +23,8 @@ describe('n8n.io iframe', () => { const iframeUrl = `https://n8n.io/self-install?instanceId=${testInstanceId}&userId=${testUserId}`; + cy.intercept(iframeUrl, (req) => req.reply(200)).as('iframeRequest'); + cy.visit(workflowsPage.url); cy.get('iframe').should('exist').and('have.attr', 'src', iframeUrl);