ToolJet/cypress-tests/cypress-ee-platform.config.js

88 lines
2.8 KiB
JavaScript
Raw Normal View History

const { defineConfig } = require("cypress");
const environments = {
"run-cypress-platform": {
baseUrl: "http://localhost:3000",
configFile: "cypress-platform.config.js",
},
"run-cypress-platform-subpath": {
baseUrl: "http://localhost:3000/apps",
configFile: "cypress-platform.config.js",
},
"run-cypress-platform-proxy": {
baseUrl: "http://localhost:4001",
configFile: "cypress-platform.config.js",
},
"run-cypress-platform-proxy-subpath": {
baseUrl: "http://localhost:4001/apps",
configFile: "cypress-platform.config.js",
},
};
const githubLabel = process.env.GITHUB_LABEL || "run-cypress-platform";
const environment = environments[githubLabel];
module.exports = defineConfig({
execTimeout: 1800000,
defaultCommandTimeout: 30000,
requestTimeout: 30000,
pageLoadTimeout: 30000,
responseTimeout: 30000,
viewportWidth: 1440,
viewportHeight: 960,
chromeWebSecurity: false,
2025-11-14 09:36:11 +00:00
projectId: "sk3oji",
2025-11-05 08:23:50 +00:00
e2e: {
2025-11-26 07:45:04 +00:00
setupNodeEvents (on, config) {
config.baseUrl = environment.baseUrl;
require("./cypress/config/tasks")(on);
require("./cypress/config/browserConfig")(on);
return require("./cypress/plugins/index.js")(on, config);
},
2025-11-05 08:23:50 +00:00
baseUrl: environment.baseUrl,
configFile: environment.configFile,
specPattern: [
"cypress/e2e/happyPath/platform/firstUser/firstUserOnboarding.cy.js",
"cypress/e2e/happyPath/platform/eeTestcases/licensing/basicPlanTestcases/**/*.cy.js",
"cypress/e2e/happyPath/platform/eeTestcases/licensing/paidPlanTestcases/**/*.cy.js",
"cypress/e2e/happyPath/platform/eeTestcases/licensing/updateLicense.cy.js",
"cypress/e2e/happyPath/platform/eeTestcases/sso/**/*.cy.js",
2025-11-20 12:28:09 +00:00
"cypress/e2e/happyPath/platform/eeTestcases/settings/**/*.cy.js",
"cypress/e2e/happyPath/platform/eeTestcases/multi-env/**/*.cy.js",
"cypress/e2e/happyPath/platform/eeTestcases/externalApi/**/*.cy.js",
"cypress/e2e/happyPath/platform/eeTestcases/userMetadata/**/*.cy.js",
2025-11-19 08:13:01 +00:00
"cypress/e2e/happyPath/platform/eeTestcases/superAdmin/**/*.cy.js",
"cypress/e2e/happyPath/platform/ceTestcases/**/*.cy.js",
"cypress/e2e/happyPath/platform/commonTestcases/**/*.cy.js",
],
2025-11-05 08:23:50 +00:00
testIsolation: true,
retries: {
2025-11-26 07:45:04 +00:00
runMode: 2,
openMode: 0,
},
redirectionLimit: 10,
2025-11-05 08:23:50 +00:00
numTestsKeptInMemory: 0,
experimentalMemoryManagement: true,
2025-11-05 08:23:50 +00:00
experimentalRunAllSpecs: true,
experimentalModifyObstructiveThirdPartyCode: true,
experimentalOriginDependencies: true,
2025-11-05 08:23:50 +00:00
downloadsFolder: "cypress/downloads",
trashAssetsBeforeRuns: true,
video: false,
videoUploadOnPasses: false,
screenshotOnRunFailure: true,
screenshotsFolder: "cypress/screenshots",
2025-11-05 08:23:50 +00:00
coverage: false,
codeCoverageTasksRegistered: false,
},
});