From 81d10bed0a3ff54ca9c01b750dce2314ab97a202 Mon Sep 17 00:00:00 2001 From: ajith-k-v Date: Tue, 21 Apr 2026 15:37:05 +0530 Subject: [PATCH] Update platform cypress workflow on develop --- .github/workflows/cypress-platform.yml | 26 +++++++++++-- cypress-tests/.gitignore | 4 +- cypress-tests/cypress-gitsync.config.js | 49 +++++++++++++++++++++++++ 3 files changed, 75 insertions(+), 4 deletions(-) create mode 100644 cypress-tests/cypress-gitsync.config.js diff --git a/.github/workflows/cypress-platform.yml b/.github/workflows/cypress-platform.yml index 3362f5641f..26e5a6fca5 100644 --- a/.github/workflows/cypress-platform.yml +++ b/.github/workflows/cypress-platform.yml @@ -24,7 +24,8 @@ jobs: if: contains(github.event.pull_request.labels.*.name, 'run-cypress') || contains(github.event.pull_request.labels.*.name, 'run-cypress-platform-ce') || contains(github.event.pull_request.labels.*.name, 'run-cypress-platform-ee') || - contains(github.event.pull_request.labels.*.name, 'run-cypress-ce') + contains(github.event.pull_request.labels.*.name, 'run-cypress-ce') || + contains(github.event.pull_request.labels.*.name, 'run-cypress-git-sync-ee') strategy: fail-fast: false @@ -34,8 +35,11 @@ jobs: (contains(github.event.pull_request.labels.*.name, 'run-cypress') || contains(github.event.pull_request.labels.*.name, 'run-cypress-platform-ce') || contains(github.event.pull_request.labels.*.name, 'run-cypress-ce')) && 'ce' || - contains(github.event.pull_request.labels.*.name, 'run-cypress-platform-ee') && 'ee' || '' + contains(github.event.pull_request.labels.*.name, 'run-cypress-platform-ee') && 'ee' || + contains(github.event.pull_request.labels.*.name, 'run-cypress-git-sync-ee') && 'ee' || '' }} + label: + - ${{ contains(github.event.pull_request.labels.*.name, 'run-cypress-git-sync-ee') && 'gitsync' || 'default' }} exclude: - edition: "" @@ -172,6 +176,10 @@ jobs: echo "TOOLJET_GLOBAL_CONSTANTS__production='{\"envConstant\":\"globalUI\",\"headerKey\":\"customHeader\",\"ui_url\":\"http://130.131.160.149:4000/production\",\"headerValue\":\"key=value\"}'" >> .env echo "TOOLJET_SECRET_CONSTANTS__production='{\"envSecret\":\"secret\",\"headerKey\":\"customHeader\",\"ui_url\":\"http://130.131.160.149:4000/production\",\"headerValue\":\"key=value\"}'" >> .env echo "SAML_SET_ENTITY_ID_REDIRECT_URL=true" >> .env + echo "ENABLE_AI_FEATURES=true" >> .env + echo "ANTHROPIC_API_KEY=${{ secrets.ANTHROPIC_API_KEY }}" >> .env + echo "TJ_AI_GATEWAY_URL=${{ secrets.TJ_AI_GATEWAY_URL }}" >> .env + echo "AI_SERVER_URL=${{ secrets.AI_SERVER_URL }}" >> .env - name: clean up old docker containers run: | @@ -390,7 +398,7 @@ jobs: browser: chrome working-directory: ./cypress-tests config: "baseUrl=http://localhost:3000" - config-file: ${{ matrix.edition == 'ee' && 'cypress-ee-platform.config.js' || 'cypress-platform.config.js' }} + config-file: ${{ matrix.label == 'gitsync' && 'cypress-gitsync.config.js' || matrix.edition == 'ee' && 'cypress-ee-platform.config.js' || 'cypress-platform.config.js' }} env: GITHUB_TOKEN: ${{ secrets.CYPRESS_RECORD_KEY }} CYPRESS_RECORD_KEY: "ca6a0d5f-b763-4be7-b554-3425a973104e" @@ -548,6 +556,10 @@ jobs: echo "TOOLJET_GLOBAL_CONSTANTS__production='{\"envConstant\":\"globalUI\",\"headerKey\":\"customHeader\",\"ui_url\":\"http://130.131.160.149:4000/production\",\"headerValue\":\"key=value\"}'" >> .env echo "TOOLJET_SECRET_CONSTANTS__production='{\"envSecret\":\"secret\",\"headerKey\":\"customHeader\",\"ui_url\":\"http://130.131.160.149:4000/production\",\"headerValue\":\"key=value\"}'" >> .env echo "SAML_SET_ENTITY_ID_REDIRECT_URL=true" >> .env + echo "ENABLE_AI_FEATURES=true" >> .env + echo "ANTHROPIC_API_KEY=${{ secrets.ANTHROPIC_API_KEY }}" >> .env + echo "TJ_AI_GATEWAY_URL=${{ secrets.TJ_AI_GATEWAY_URL }}" >> .env + echo "AI_SERVER_URL=${{ secrets.AI_SERVER_URL }}" >> .env - name: clean up old docker containers run: | @@ -942,6 +954,10 @@ jobs: echo "TOOLJET_GLOBAL_CONSTANTS__production='{\"envConstant\":\"globalUI\",\"headerKey\":\"customHeader\",\"ui_url\":\"http://130.131.160.149:4000/production\",\"headerValue\":\"key=value\"}'" >> .env echo "TOOLJET_SECRET_CONSTANTS__production='{\"envSecret\":\"secret\",\"headerKey\":\"customHeader\",\"ui_url\":\"http://130.131.160.149:4000/production\",\"headerValue\":\"key=value\"}'" >> .env echo "SAML_SET_ENTITY_ID_REDIRECT_URL=true" >> .env + echo "ENABLE_AI_FEATURES=true" >> .env + echo "ANTHROPIC_API_KEY=${{ secrets.ANTHROPIC_API_KEY }}" >> .env + echo "TJ_AI_GATEWAY_URL=${{ secrets.TJ_AI_GATEWAY_URL }}" >> .env + echo "AI_SERVER_URL=${{ secrets.AI_SERVER_URL }}" >> .env - name: clean up old docker containers run: | @@ -1351,6 +1367,10 @@ jobs: echo "TOOLJET_GLOBAL_CONSTANTS__production='{\"envConstant\":\"globalUI\",\"headerKey\":\"customHeader\",\"ui_url\":\"http://130.131.160.149:4000/production\",\"headerValue\":\"key=value\"}'" >> .env echo "TOOLJET_SECRET_CONSTANTS__production='{\"envSecret\":\"secret\",\"headerKey\":\"customHeader\",\"ui_url\":\"http://130.131.160.149:4000/production\",\"headerValue\":\"key=value\"}'" >> .env echo "SAML_SET_ENTITY_ID_REDIRECT_URL=true" >> .env + echo "ENABLE_AI_FEATURES=true" >> .env + echo "ANTHROPIC_API_KEY=${{ secrets.ANTHROPIC_API_KEY }}" >> .env + echo "TJ_AI_GATEWAY_URL=${{ secrets.TJ_AI_GATEWAY_URL }}" >> .env + echo "AI_SERVER_URL=${{ secrets.AI_SERVER_URL }}" >> .env - name: clean up old docker containers run: | diff --git a/cypress-tests/.gitignore b/cypress-tests/.gitignore index d229864bdf..9bdcecfa0c 100644 --- a/cypress-tests/.gitignore +++ b/cypress-tests/.gitignore @@ -5,4 +5,6 @@ /cypress/downloads /cypress/videos /coverage -/.nyc_output \ No newline at end of file +/.nyc_output +/.claude +/.webpack_cache \ No newline at end of file diff --git a/cypress-tests/cypress-gitsync.config.js b/cypress-tests/cypress-gitsync.config.js new file mode 100644 index 0000000000..0e5463b4a8 --- /dev/null +++ b/cypress-tests/cypress-gitsync.config.js @@ -0,0 +1,49 @@ +const { defineConfig } = require("cypress"); + +module.exports = defineConfig({ + execTimeout: 1800000, + defaultCommandTimeout: 30000, + requestTimeout: 30000, + pageLoadTimeout: 30000, + responseTimeout: 30000, + viewportWidth: 1440, + viewportHeight: 960, + chromeWebSecurity: false, + projectId: "sk3oji", + + e2e: { + setupNodeEvents(on, config) { + require("./cypress/config/tasks")(on); + require("./cypress/config/browserConfig")(on); + + return require("./cypress/plugins/index.js")(on, config); + }, + + baseUrl: "http://localhost:3000", // Default for local development (GitHub workflow overrides this) + specPattern: [ + "cypress/e2e/happyPath/platform/firstUser/firstUserOnboarding.cy.js", + "cypress/e2e/happyPath/platform/eeTestcases/licensing/updateLicense.cy.js", + "cypress/e2e/happyPath/platform/eeTestcases/gitSync/**/*.cy.js", + ], + + testIsolation: true, + redirectionLimit: 10, + + numTestsKeptInMemory: 0, + experimentalMemoryManagement: true, + + experimentalRunAllSpecs: true, + experimentalModifyObstructiveThirdPartyCode: true, + experimentalOriginDependencies: true, + + downloadsFolder: "cypress/downloads", + trashAssetsBeforeRuns: true, + video: false, + videoUploadOnPasses: false, + screenshotOnRunFailure: true, + screenshotsFolder: "cypress/screenshots", + + coverage: false, + codeCoverageTasksRegistered: false, + }, +});