
* test-nv-deploy yaml adjustments to generate testmo reports * CR fixes * changed working dir for testmo runner * changed prepare tests to wait for deploy * removed working dir * wip - working dir * wip - working dir * resource path deletion * order of steps changed * wip * wip * cypress reporter fix, added hash to report name * reporter fix - name of output changed * report name change * moved testmo run it into workflow env var * wip * wip * wip * wip * wip * wip * wip * wip - output * Test with output --------- Co-authored-by: andrzejewsky <vox3r69@gmail.com>
51 lines
1.3 KiB
JavaScript
51 lines
1.3 KiB
JavaScript
/* eslint-disable @typescript-eslint/no-var-requires */
|
|
/* eslint-disable no-console */
|
|
const { defineConfig } = require("cypress");
|
|
const fs = require("fs");
|
|
|
|
module.exports = defineConfig({
|
|
projectId: "51ef7c",
|
|
chromeWebSecurity: false,
|
|
defaultCommandTimeout: 20000,
|
|
requestTimeout: 20000,
|
|
viewportWidth: 1400,
|
|
viewportHeight: 660,
|
|
retries: {
|
|
runMode: 1,
|
|
openMode: 0,
|
|
},
|
|
reporter: "junit",
|
|
reporterOptions: {
|
|
mochaFile: "results/test-output-[hash].xml",
|
|
jenkinsMode: true,
|
|
outputs: true,
|
|
testCaseSwitchClassnameAndName: true,
|
|
},
|
|
e2e: {
|
|
env: {
|
|
grepFilterSpecs: true,
|
|
demoTests: false,
|
|
},
|
|
setupNodeEvents(on, config) {
|
|
config.specPattern = process.env.CYPRESS_demoTests
|
|
? "cypress/e2e/percy/**/*.{js,jsx,ts,tsx}"
|
|
: "cypress/e2e/**/*.{js,jsx,ts,tsx}";
|
|
|
|
config = require("./cypress/support/cypress-grep/plugin")(config);
|
|
config = require("./cypress/plugins/index.js")(on, config);
|
|
|
|
on("after:spec", (spec, results) => {
|
|
if (results && results.video) {
|
|
return fs.unlink(results.video, function (err) {
|
|
if (err) {
|
|
console.warn(`Could not remove video - ${err}`);
|
|
} else {
|
|
console.log("File removed:", results.video);
|
|
}
|
|
});
|
|
}
|
|
});
|
|
return config;
|
|
},
|
|
},
|
|
});
|