@grafana/e2e: generate JSON report file (#25033)
* Output JSON report from Cypress * Updated lockfile
This commit is contained in:
@@ -14,6 +14,10 @@ module.exports = async baseConfig => {
|
||||
const projectConfig = {
|
||||
fixturesFolder: `${CWD}/cypress/fixtures`,
|
||||
integrationFolder: `${CWD}/cypress/integration`,
|
||||
reporter: '@mochajs/json-file-reporter', // putting this in cypress.json caused weird errors
|
||||
reporterOptions: {
|
||||
output: `${CWD}/cypress/report.json`,
|
||||
},
|
||||
screenshotsFolder: `${CWD}/cypress/screenshots`,
|
||||
videosFolder: `${CWD}/cypress/videos`,
|
||||
};
|
||||
@@ -46,14 +50,23 @@ module.exports = async baseConfig => {
|
||||
.catch(error => {
|
||||
if (error.code === 'ENOENT') {
|
||||
// File is optional
|
||||
return null;
|
||||
return {};
|
||||
} else {
|
||||
// Unexpected error
|
||||
throw error;
|
||||
}
|
||||
});
|
||||
|
||||
return { ...baseConfig, ...projectConfig, ...customProjectConfig };
|
||||
return {
|
||||
...baseConfig,
|
||||
...projectConfig,
|
||||
...customProjectConfig,
|
||||
reporterOptions: {
|
||||
...baseConfig.reporterOptions,
|
||||
...projectConfig.reporterOptions,
|
||||
...customProjectConfig.reporterOptions,
|
||||
},
|
||||
};
|
||||
} else {
|
||||
// Temporary legacy support for Grafana core (using `yarn start`)
|
||||
return baseConfig;
|
||||
|
||||
Reference in New Issue
Block a user