From 3dd7842b0b4ab96d1898ebc8f522b405b162134a Mon Sep 17 00:00:00 2001 From: Alexandre Hajjar Date: Sat, 5 Jun 2021 21:50:52 +0200 Subject: [PATCH] =?UTF-8?q?=E2=9C=85=20Run=20e2e=20tests=20with=20external?= =?UTF-8?q?=20API=20calls=20in=20cron?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/test-external-integrations.yaml | 12 ++++++++++++ .../cypress/integration/mon-entreprise/gérer.js | 4 +++- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test-external-integrations.yaml b/.github/workflows/test-external-integrations.yaml index 74b11ea84..73fbfdfc1 100644 --- a/.github/workflows/test-external-integrations.yaml +++ b/.github/workflows/test-external-integrations.yaml @@ -31,3 +31,15 @@ jobs: record: true tag: external-integration config: integrationFolder=cypress/integration/external,baseUrl=https://mon-entreprise.fr + + - name: e2e tests with external API calls + uses: cypress-io/github-action@v2 + with: + install: false + working-directory: mon-entreprise + # List here all the specs that are making external API calls: + spec: cypress/integration/mon-entreprise/gérer.js + record: true + tag: external-integration + config: integrationFolder=cypress/integration/mon-entreprise,baseUrl=https://mon-entreprise.fr + env: record_http= # prevent stubbing diff --git a/mon-entreprise/cypress/integration/mon-entreprise/gérer.js b/mon-entreprise/cypress/integration/mon-entreprise/gérer.js index 74ee277cb..b8601b74f 100644 --- a/mon-entreprise/cypress/integration/mon-entreprise/gérer.js +++ b/mon-entreprise/cypress/integration/mon-entreprise/gérer.js @@ -44,7 +44,9 @@ const waitResponses = (responses) => { } } -describe('Manage page test', function () { +describe(`Manage page test (${ + writeFixtures ? 'record mode' : 'stubbed mode' +})`, function () { let responses = {} const hostnamesToRecord = ['entreprise.data.gouv.fr', 'geo.api.gouv.fr'] beforeEach(() => {