* add saved question extraction prototype * fix additional failure cases * refactor: reconciler * revert me: manual skill file edit for source swapping * set data permissions to view for databases referenced in the query * rename data app collection and group * prevent agents from removing savedQuestionSourceId * docs: clarify data app query location * chore: cleanup query-sync canonical module * refactor: split query tests into different files * Swap query source for data app query hooks and apply dynamic filters on top of it (#79584) * code improvements and bug-fixes for data apps permissions * Add data apps model imports * address reviews on data apps permissions * run sync queries before vite build * Add data app resource link (#79878) add button to view data app resources * Show permission error when users cannot access a data app (#79874) show permission error page when user do not have permission to view data apps * Add data app group link in overflow menu (#79873) Add data app group link * Store and reconcile data app entity ids in data_app.yaml (#79833) * Store data app resource entity IDs * make entity ids in data_app.yaml authoritative * add top-level value after path key * simplify data_app.yaml manifest parser * only allow changing data app collection if empty * consolidate backend test helpers and remove redundant tests * chore: restore README changes * ci: fix failing tests * Add support of actions to Data App reconciler (#79842) Add support of actions to Data App reconciler * Fix bugs/inconsistency and add more e2e for data apps reconciler/syncing (#80002) * Update semantic schema skill about preventing segments and measures in dynamic parts of a query in Data Apps (#80288) * Grant view data access on a table-by-table basis in data app groups (#80189) * grant view data on table instead of database level * refactor table scan in reconciler * update e2e tests for permission grants * Grant data app view permissions per table * Skip unchanged data app permissions * add e2e data app test for sandboxing * reset host app sources after runs * Preserve sandboxing for data app users (#80406) * add e2e data app test for sandboxing * improve e2e tests for data apps * Remove sandbox E2E from table permissions change * preserve existing sandboxing from sandboxed groups in data apps * assert that we grant non-sandboxed tables * Explain data app sandbox exclusion * Add data app sandbox E2E coverage * Exercise sandbox preservation in data app E2E * Disable saved question sources in data apps (#80139) * Disable saved question sources in data apps * Preserve question-only schema scope * Remove the saved question schema parameter * Copy table-sourced metrics into data app collection and do not codegen card-sourced metrics (#80086) * copy table-sourced metrics into the data app collections * copy table-sourced metrics into the data app collections * Address metric sync review feedback * Accept keyword metric display in query response * Fix data app metric reconciliation ordering * Remove old lockfile format * exclude card-sourced metrics from schema generator * do not use card terms in metrics to avoid ambiguity with card-sourced metrics * fix model imports * Fix data app metric reconciliation * refactor: cleanup reconciler unit tests * Fix duplicated metric client helper * add safe metrics path * Handle unsupported metric dependencies * Fix data app CI test regressions * Fix "Re-adding removed query fails to adopt deleted card" (#80341) * Clean-up data apps permissions endpoints (#80825) * Remove entity ids from data_app.yaml (#81317) Remove data app entity ids from data_app.yaml * Adjust data apps permissions code (#81093) * Remove the data app table permission grants (#81584) * Add permissions_group.is_data_app_group and hide data app permission groups from UI (#81705) * Add data app user management and access warnings (#81839) * Address data app user access review feedback * additional e2e test cases for bugs in manage users page * fix failing frontend type check on unit test * fix migration id collision for data apps * combine migration changes into one file * fix data app metric sync after trashing copied metrics * fix cli runtime dependency packaging for embedding sdk * avoid loading data app bundle during resource setup * prevent redundant data app collection permission updates * allow admins to remove data app members after token expires * update docs and add e2e test for missing resource collection case * isolate data app sync using transactions * do not leave user on an empty page when removing the last member on the page * reserve sandbox-host slug in data app config * ignore generated data app action fixtures * move queries into db.clj * preserve legacy permissions when adding data app members * regenerate the kondo modules config The data-apps module reaches for :model/Permissions and :model/DataPermissions, neither of which was recorded in :model-imports, so metabase.core.modules-test fails on the current tree. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011nNKkhQjjiUSM7qwLReyfP * reject data app queries whose metrics read another card Sync copies a referenced metric but rewrites nothing inside the copy, and copies nothing that copy in turn reads, so those references still point at the originals. The app publishes successfully and then fails for every viewer without access to the originals' collections. Checking while resolving the query, rather than at codegen, also catches a metric edited into that shape after its schema was generated. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011nNKkhQjjiUSM7qwLReyfP * exclude metrics that read a saved card anywhere from generated schemas source-card-id only reads stage 0, so a table-sourced metric that joins a saved question passed the codegen filter. The CLI checks the whole query and rejects such a metric, aborting sync-resources for any app that uses it. Checking the whole query here keeps codegen consistent with what sync supports, and removes the database round trip that asked which of the referenced cards were metrics -- the step that let a saved-question join through in the first place. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011nNKkhQjjiUSM7qwLReyfP * resolve copied resources' table dependencies through the server Numeric source-table entries miss implicit joins: a copied model querying Orders and reading Products.Category through a foreign key names Products nowhere, so it was left out of the app's permission warnings. Run the same metadata-based lookup the query endpoint uses, through a new endpoint the CLI calls for copied models, actions and metrics, and drop the JSON walk it replaces. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011nNKkhQjjiUSM7qwLReyfP * cover the create-queries grant the database defaults leave on app groups An app group that predates the first non-audit database is given create-queries :query-builder-and-native by set-new-database-permissions!, alongside the :blocked view-data it special-cases for app groups. A user with data access through another group would gain native query authoring just by joining the app. The reconciler already resets it, but nothing failed when :perms/create-queries was dropped from its list. The pairing cannot be produced through set-database-permission!, which cascades view-data to :unrestricted for any create-queries value other than :no, so the test writes the row the way the defaults insert it. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011nNKkhQjjiUSM7qwLReyfP * prevent models based on saved questions from being copied * return to a valid member page after overlapping removals * do not resolve query objects when either enabled flag is false * prevent shorthand properties and spreads from overriding generated ids * prevent adding duplicate members and retry only members that are failed to add * define schema for data app query endpoint * reconcile only the current data app group during resource setup * expand the schema fingerprint * add data app group field in permission group schemas * prevent new databases from granting query creation to data app groups * throw validation errors when invalid query spec fields are passed * do not fail validation on columns metadata * add enabled metadata to query definition schema * accept more data app specific query metadata and binning options --------- Co-authored-by: Timofey Kachalov <timofei@metabase.com> Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
442 lines
15 KiB
JavaScript
442 lines
15 KiB
JavaScript
import { execFileSync } from "node:child_process";
|
|
import fs from "node:fs";
|
|
import path from "node:path";
|
|
|
|
import { plugin as cypressGrepPlugin } from "@cypress/grep/plugin";
|
|
import cypressOnFix from "cypress-on-fix";
|
|
import installLogsPrinter from "cypress-terminal-report/src/installLogsPrinter";
|
|
|
|
import { BACKEND_HOST, BACKEND_PORT } from "../runner/constants/backend-port";
|
|
|
|
import {
|
|
extractFailedTests,
|
|
recordFailedTestsForQuarantine,
|
|
reportFailedTestsToConductor,
|
|
} from "./ci_conductor";
|
|
import * as ciTasks from "./ci_tasks";
|
|
import { collectFailingTests } from "./collectFailedTests";
|
|
import {
|
|
copyDirectory,
|
|
readDirectory,
|
|
removeDirectory,
|
|
verifyDownloadTasks,
|
|
} from "./commands/downloads/downloadUtils";
|
|
import * as dbTasks from "./db_tasks";
|
|
import {
|
|
startCustomVizDevServer,
|
|
stopCustomVizDevServer,
|
|
} from "./helpers/e2e-custom-viz-dev-server-tasks";
|
|
import {
|
|
buildDataApp,
|
|
removeDataAppDeclaration,
|
|
removeDataAppPaths,
|
|
scaffoldDataApp,
|
|
syncDataApp,
|
|
writeDataAppFiles,
|
|
} from "./helpers/e2e-data-app-tasks";
|
|
import { signJwt } from "./helpers/e2e-jwt-tasks";
|
|
import {
|
|
startMockLlmServer,
|
|
stopMockLlmServer,
|
|
} from "./helpers/e2e-mock-llm-tasks";
|
|
|
|
const createBundler = require("@bahmutov/cypress-esbuild-preprocessor"); // This function is called when a project is opened or re-opened (e.g. due to the project's config changing)
|
|
const coverageTask = require("@cypress/code-coverage/task");
|
|
const {
|
|
NodeModulesPolyfillPlugin,
|
|
} = require("@esbuild-plugins/node-modules-polyfill");
|
|
const cypressSplit = require("cypress-split");
|
|
|
|
const {
|
|
sideEffectFreeModulesPlugin,
|
|
} = require("../../frontend/build/shared/esbuild/side-effect-free-modules-plugin");
|
|
|
|
const isInstrumented = process.env.INSTRUMENT_COVERAGE === "true";
|
|
// The Cypress config process runs with cwd = this file's directory
|
|
// (e2e/support), so @cypress/code-coverage writes .nyc_output/out.json here.
|
|
// NYC_OUTPUT_FILE is anchored to __dirname to read from that same place;
|
|
// COVERAGE_MANIFEST_RAW_DIR points at e2e/coverage-manifest-raw, which the
|
|
// nightly workflow uploads.
|
|
const COVERAGE_MANIFEST_RAW_DIR = path.resolve(
|
|
__dirname,
|
|
"../coverage-manifest-raw",
|
|
);
|
|
const NYC_OUTPUT_FILE = path.resolve(__dirname, ".nyc_output/out.json");
|
|
|
|
// Function metadata (name + line per Istanbul function index), accumulated
|
|
// across the specs this process runs and shipped with the raw shard artifact.
|
|
// The f-counter indices in the per-spec/per-test entries are only meaningful
|
|
// against the exact instrumented bundle that produced them; this file makes
|
|
// the artifact self-describing for offline analysis (test-overlap heat maps)
|
|
// without rebuilding that bundle. Named uniquely per process so shard
|
|
// artifacts can merge into one directory without clobbering each other —
|
|
// consumers shallow-merge all fnmap-*.json (same file => identical entries).
|
|
const FNMAP_FILE = path.join(
|
|
COVERAGE_MANIFEST_RAW_DIR,
|
|
`fnmap-${require("node:crypto").randomUUID()}.json`,
|
|
);
|
|
|
|
const isEnterprise = process.env["MB_EDITION"] === "ee";
|
|
const isCI = !!process.env.CI;
|
|
|
|
const snowplowMicroUrl = process.env["MB_SNOWPLOW_URL"];
|
|
|
|
// Per-test capture state, fed by the recordTestCapture task that the
|
|
// support-file afterEach calls (e2e/support/per-test-capture.js). Each entry
|
|
// is one test attempt: { title, f: {file: {fnIdx: firedCount}}, routes,
|
|
// pages }. The function counts arrive already per-test — the support file
|
|
// reads them from the app windows' Istanbul counters and zeroes those after
|
|
// each flush.
|
|
let perTestEntries = [];
|
|
|
|
const perTestCaptureTasks = {
|
|
recordTestCapture({ title, f, routes, pages }) {
|
|
perTestEntries.push({ title, f, routes, pages });
|
|
return null;
|
|
},
|
|
|
|
resetTestCapture() {
|
|
perTestEntries = [];
|
|
return null;
|
|
},
|
|
};
|
|
|
|
// Records name + line for every instrumented function in files this process
|
|
// hasn't seen yet. The metadata is identical for a given file across specs
|
|
// (same bundle), so first sighting wins.
|
|
function appendFnMap(coverage) {
|
|
let fnMap = {};
|
|
try {
|
|
fnMap = JSON.parse(fs.readFileSync(FNMAP_FILE, "utf8"));
|
|
} catch {
|
|
// First spec of the run.
|
|
}
|
|
let changed = false;
|
|
for (const [file, fileCov] of Object.entries(coverage)) {
|
|
if (fnMap[file] || !fileCov.fnMap) {
|
|
continue;
|
|
}
|
|
const entry = {};
|
|
for (const [idx, fn] of Object.entries(fileCov.fnMap)) {
|
|
entry[idx] = {
|
|
name: fn.name,
|
|
line: fn.decl?.start?.line ?? fn.loc?.start?.line ?? null,
|
|
};
|
|
}
|
|
fnMap[file] = entry;
|
|
changed = true;
|
|
}
|
|
if (changed) {
|
|
fs.writeFileSync(FNMAP_FILE, JSON.stringify(fnMap));
|
|
}
|
|
}
|
|
|
|
// Persists raw __coverage__ counters per spec, plus the per-test breakdown
|
|
// (function deltas and API routes). The manifest builder reads these later,
|
|
// applies baseline subtraction, and maps surviving files to modules. We
|
|
// delete .nyc_output/out.json between specs so each entry reflects only that
|
|
// spec's execution — @cypress/code-coverage otherwise accumulates.
|
|
function writeSpecCoverageEntry(spec) {
|
|
// Consume the per-test state up front so a missing/corrupt out.json can't
|
|
// leak one spec's tests into the next spec's entry.
|
|
const tests = perTestEntries;
|
|
perTestEntries = [];
|
|
|
|
if (!fs.existsSync(NYC_OUTPUT_FILE)) {
|
|
return;
|
|
}
|
|
|
|
const coverage = JSON.parse(fs.readFileSync(NYC_OUTPUT_FILE, "utf8"));
|
|
|
|
fs.mkdirSync(COVERAGE_MANIFEST_RAW_DIR, { recursive: true });
|
|
appendFnMap(coverage);
|
|
|
|
// The manifest builder only needs per-file function counters to compute the
|
|
// baseline greater-delta. Drop statement/branch maps and counters, and drop
|
|
// files where no function was invoked. Cuts each entry from ~25MB to <200KB.
|
|
const trimmed = {};
|
|
for (const [file, fc] of Object.entries(coverage)) {
|
|
if (!Object.values(fc.f || {}).some((c) => c > 0)) {
|
|
continue;
|
|
}
|
|
trimmed[file] = { f: fc.f };
|
|
}
|
|
|
|
fs.mkdirSync(COVERAGE_MANIFEST_RAW_DIR, { recursive: true });
|
|
const entryName = spec.relative.replace(/[\\/]/g, "__") + ".json";
|
|
fs.writeFileSync(
|
|
path.join(COVERAGE_MANIFEST_RAW_DIR, entryName),
|
|
JSON.stringify({ spec: spec.relative, coverage: trimmed, tests }),
|
|
);
|
|
|
|
fs.unlinkSync(NYC_OUTPUT_FILE);
|
|
}
|
|
|
|
// docs say that tsconfig paths should handle aliases, but they don't
|
|
const assetsResolverPlugin = {
|
|
name: "assetsResolver",
|
|
setup(build) {
|
|
// Redirect all paths starting with "assets/" to "resources/"
|
|
build.onResolve({ filter: /^assets\// }, (args) => {
|
|
return {
|
|
path: path.join(
|
|
__dirname,
|
|
"../../resources/frontend_client/app",
|
|
args.path,
|
|
),
|
|
};
|
|
});
|
|
},
|
|
};
|
|
|
|
const defaultConfig = {
|
|
// Expose non-sensitive environment variables synchronously via Cypress.expose()
|
|
// These are safe to expose in the browser and are used for configuration
|
|
expose: {
|
|
CI: isCI,
|
|
IS_ENTERPRISE: isEnterprise,
|
|
MB_EDITION: process.env["MB_EDITION"],
|
|
ENABLE_NETWORK_THROTTLING: !!process.env["ENABLE_NETWORK_THROTTLING"],
|
|
SNOWPLOW_MICRO_URL: snowplowMicroUrl,
|
|
CLIENT_PORT: process.env["CLIENT_PORT"],
|
|
feHealthcheck: process.env["FE_HEALTHCHECK_URL"]
|
|
? { enabled: true, url: process.env["FE_HEALTHCHECK_URL"] }
|
|
: undefined,
|
|
// Lets @cypress/code-coverage/support skip its hooks entirely on
|
|
// uninstrumented runs, instead of logging a warning on every spec.
|
|
coverage: isInstrumented,
|
|
},
|
|
|
|
allowCypressEnv: false,
|
|
|
|
// This is the functionality of the old cypress-plugins.js file
|
|
setupNodeEvents(cypressOn, config) {
|
|
// `on` is used to hook into various events Cypress emits
|
|
// `config` is the resolved Cypress config
|
|
|
|
// Build custom-viz .tgz fixtures from sources
|
|
execFileSync(
|
|
"node",
|
|
[
|
|
path.resolve(
|
|
__dirname,
|
|
"../../enterprise/frontend/src/custom-viz/fixtures/build-example-custom-viz.mjs",
|
|
),
|
|
],
|
|
{ stdio: "inherit" },
|
|
);
|
|
|
|
// Use cypress-on-fix to enable multiple handlers
|
|
const on = cypressOnFix(cypressOn);
|
|
|
|
// CLI grep can't handle commas in the name
|
|
// needed when we want to run only specific tests
|
|
config.expose.grep ??= process.env.GREP;
|
|
|
|
// cypress-terminal-report
|
|
if (isCI) {
|
|
installLogsPrinter(on, {
|
|
printLogsToConsole: "never",
|
|
});
|
|
}
|
|
|
|
/********************************************************************
|
|
** PREPROCESSOR **
|
|
********************************************************************/
|
|
on(
|
|
"file:preprocessor",
|
|
createBundler({
|
|
loader: {
|
|
".svg": "text",
|
|
},
|
|
plugins: [
|
|
NodeModulesPolyfillPlugin(),
|
|
assetsResolverPlugin,
|
|
sideEffectFreeModulesPlugin,
|
|
],
|
|
sourcemap: "inline",
|
|
}),
|
|
);
|
|
|
|
/********************************************************************
|
|
** BROWSERS **
|
|
********************************************************************/
|
|
|
|
on("before:browser:launch", (browser = {}, launchOptions) => {
|
|
if (browser.name === "chrome" || browser.name === "chromium") {
|
|
// Open dev tools in Chrome by default when in headed mode
|
|
if (browser.isHeaded) {
|
|
launchOptions.args.push("--auto-open-devtools-for-tabs");
|
|
}
|
|
launchOptions.args.push("--blink-settings=preferredColorScheme=1");
|
|
}
|
|
|
|
// Start browsers with prefers-reduced-motion set to "reduce"
|
|
if (browser.family === "firefox") {
|
|
launchOptions.preferences["ui.prefersReducedMotion"] = 1;
|
|
}
|
|
|
|
if (browser.family === "chromium") {
|
|
launchOptions.args.push("--force-prefers-reduced-motion");
|
|
}
|
|
|
|
return launchOptions;
|
|
});
|
|
|
|
/********************************************************************
|
|
** TASKS **
|
|
********************************************************************/
|
|
on("task", {
|
|
log(...messages) {
|
|
console.log(...messages);
|
|
return null; // tasks must have a return value
|
|
},
|
|
...dbTasks,
|
|
...ciTasks,
|
|
...verifyDownloadTasks,
|
|
readDirectory,
|
|
copyDirectory,
|
|
removeDirectory,
|
|
signJwt,
|
|
startMockLlmServer,
|
|
stopMockLlmServer,
|
|
startCustomVizDevServer,
|
|
stopCustomVizDevServer,
|
|
buildDataApp,
|
|
syncDataApp,
|
|
scaffoldDataApp,
|
|
writeDataAppFiles,
|
|
removeDataAppDeclaration,
|
|
removeDataAppPaths,
|
|
...perTestCaptureTasks,
|
|
});
|
|
|
|
/********************************************************************
|
|
** CONFIG **
|
|
********************************************************************/
|
|
|
|
// `grepIntegrationFolder` needs to point to the root!
|
|
// See: https://github.com/cypress-io/cypress/issues/24452#issuecomment-1295377775
|
|
config.expose.grepIntegrationFolder = "../../";
|
|
config.expose.grepFilterSpecs = true;
|
|
config.expose.grepOmitFiltered = true;
|
|
|
|
cypressGrepPlugin(config);
|
|
|
|
if (isCI) {
|
|
cypressSplit(on, config);
|
|
collectFailingTests(on, config);
|
|
}
|
|
|
|
if (isInstrumented) {
|
|
coverageTask(on, config);
|
|
}
|
|
|
|
// Surface the resolved Cypress retry ceiling so the ci-conductor reporter
|
|
// can include it in the payload (CYPRESS_RETRIES isn't otherwise set in CI;
|
|
// the value lives in mainConfig.retries.runMode). DEV-1999.
|
|
const resolvedRetries =
|
|
typeof config.retries === "number"
|
|
? config.retries
|
|
: (config.retries?.runMode ?? 0);
|
|
process.env.CYPRESS_RETRIES = String(resolvedRetries);
|
|
|
|
on("after:spec", async (spec, results) => {
|
|
// Report failures to ci-conductor mid-run (no-ops unless configured).
|
|
if (isCI) {
|
|
// Reporting to ci-conductor must NEVER break the test run, so this is
|
|
// a hard backstop around everything — extraction, payload build, and
|
|
// the request. The reporter also handles its own errors internally.
|
|
try {
|
|
const failedTests = extractFailedTests(spec, results);
|
|
// Persist ultimate failures for the post-run quarantine gate (DEV-2082).
|
|
recordFailedTestsForQuarantine(failedTests);
|
|
await reportFailedTestsToConductor(failedTests);
|
|
} catch (error) {
|
|
console.error("[ci-conductor] reporting failed (ignored)", error);
|
|
}
|
|
}
|
|
|
|
// this is an official workaround to keep recordings of the failed specs only
|
|
// https://docs.cypress.io/guides/guides/screenshots-and-videos#Delete-videos-for-specs-without-failing-or-retried-tests
|
|
if (results && results.video) {
|
|
// Do we have test failures?
|
|
if (results && results.video && results.stats.failures === 0) {
|
|
// delete the video if the spec passed
|
|
fs.unlinkSync(results.video);
|
|
}
|
|
}
|
|
|
|
if (isInstrumented) {
|
|
// Don't let a bad/partial coverage file abort the nightly shard - at
|
|
// worst we lose this spec's entry, not the whole run.
|
|
try {
|
|
writeSpecCoverageEntry(spec);
|
|
} catch (error) {
|
|
console.error(
|
|
"[coverage] failed to write spec entry (ignored)",
|
|
error,
|
|
);
|
|
}
|
|
}
|
|
});
|
|
|
|
return config;
|
|
},
|
|
baseUrl: `http://${BACKEND_HOST}:${BACKEND_PORT}`,
|
|
defaultBrowser: process.env.CYPRESS_BROWSER ?? "chrome",
|
|
supportFile: "e2e/support/cypress.js",
|
|
chromeWebSecurity: false,
|
|
modifyObstructiveCode: false,
|
|
// New `specPattern` is the combination of the old:
|
|
// 1. testFiles and
|
|
// 2. integrationFolder
|
|
specPattern: "e2e/test/**/*.cy.spec.{js,ts}",
|
|
viewportHeight: 800,
|
|
viewportWidth: 1280,
|
|
// enable video recording in run mode
|
|
video: process.env["CYPRESS_VIDEO"] !== "false",
|
|
videoCompression: false,
|
|
};
|
|
|
|
const mainConfig = {
|
|
...defaultConfig,
|
|
numTestsKeptInMemory: process.env["CI"] ? 1 : 50,
|
|
reporter: "cypress-multi-reporters",
|
|
reporterOptions: {
|
|
configFile: false,
|
|
// 🤯 mochawesome != cypress-mochawesome-reporter != mochaAwesome (this form does not exist) 🤯
|
|
// See https://glebbahmutov.com/blog/the-awesome-battle/ to compare the first two.
|
|
reporterEnabled: "mochawesome, mocha-junit-reporter",
|
|
mochawesomeReporterOptions: {
|
|
// https://github.com/adamgruber/mochawesome (NOT https://www.npmjs.com/package/cypress-mochawesome-reporter)
|
|
reportDir: "cypress/reports/mochareports",
|
|
reportFilename: "[status]-[name]",
|
|
quiet: true,
|
|
html: true,
|
|
json: true,
|
|
},
|
|
// 🤯🤮mochaJunitReporterReporterOptions 🤮🤯
|
|
// Exercise care when using this poorly documented key:
|
|
// - https://stackoverflow.com/questions/51180963/cypress-tests-with-mocha-multi-reports-not-able-to-get-aggregated-results-for-a
|
|
// - https://stackoverflow.com/questions/37965049/mocha-multi-reporter-with-junit
|
|
// For the curious, ChatGPT 3.5 does NOT get it right
|
|
mochaJunitReporterReporterOptions: {
|
|
mochaFile: "./target/junit/[hash].xml",
|
|
toConsole: false,
|
|
},
|
|
},
|
|
retries: {
|
|
runMode:
|
|
process.env["CYPRESS_RETRIES"] != null
|
|
? parseInt(process.env["CYPRESS_RETRIES"], 10)
|
|
: 1,
|
|
openMode: 0,
|
|
},
|
|
};
|
|
|
|
module.exports = {
|
|
defaultConfig,
|
|
mainConfig,
|
|
};
|