Commit 68154cf9 by Steven Vachon Committed by GitHub

@grafana/e2e: generate JSON report file (#25033)

* Output JSON report from Cypress

* Updated lockfile
parent a0e5f51d
{ {
"supportFile": "cypress/support/index.ts", "projectId": "zb7k1c",
"projectId": "zb7k1c" "supportFile": "cypress/support/index.ts"
} }
...@@ -14,6 +14,10 @@ module.exports = async baseConfig => { ...@@ -14,6 +14,10 @@ module.exports = async baseConfig => {
const projectConfig = { const projectConfig = {
fixturesFolder: `${CWD}/cypress/fixtures`, fixturesFolder: `${CWD}/cypress/fixtures`,
integrationFolder: `${CWD}/cypress/integration`, 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`, screenshotsFolder: `${CWD}/cypress/screenshots`,
videosFolder: `${CWD}/cypress/videos`, videosFolder: `${CWD}/cypress/videos`,
}; };
...@@ -46,14 +50,23 @@ module.exports = async baseConfig => { ...@@ -46,14 +50,23 @@ module.exports = async baseConfig => {
.catch(error => { .catch(error => {
if (error.code === 'ENOENT') { if (error.code === 'ENOENT') {
// File is optional // File is optional
return null; return {};
} else { } else {
// Unexpected error // Unexpected error
throw error; throw error;
} }
}); });
return { ...baseConfig, ...projectConfig, ...customProjectConfig }; return {
...baseConfig,
...projectConfig,
...customProjectConfig,
reporterOptions: {
...baseConfig.reporterOptions,
...projectConfig.reporterOptions,
...customProjectConfig.reporterOptions,
},
};
} else { } else {
// Temporary legacy support for Grafana core (using `yarn start`) // Temporary legacy support for Grafana core (using `yarn start`)
return baseConfig; return baseConfig;
......
...@@ -46,6 +46,7 @@ ...@@ -46,6 +46,7 @@
"@cypress/webpack-preprocessor": "4.1.3", "@cypress/webpack-preprocessor": "4.1.3",
"@grafana/e2e-selectors": "7.1.0-pre.0", "@grafana/e2e-selectors": "7.1.0-pre.0",
"@grafana/tsconfig": "^1.0.0-rc1", "@grafana/tsconfig": "^1.0.0-rc1",
"@mochajs/json-file-reporter": "^1.2.0",
"blink-diff": "1.0.13", "blink-diff": "1.0.13",
"commander": "5.0.0", "commander": "5.0.0",
"cypress": "4.5.0", "cypress": "4.5.0",
......
...@@ -3222,6 +3222,28 @@ ...@@ -3222,6 +3222,28 @@
js-yaml "~3.13.1" js-yaml "~3.13.1"
resolve "1.8.1" resolve "1.8.1"
"@grafana/data@7.0.0", "@grafana/data@next":
version "7.0.0"
resolved "https://registry.yarnpkg.com/@grafana/data/-/data-7.0.0.tgz#89dff54c6a9bf21536beb21e2882880572a84837"
integrity sha512-02PxXuzGYf0oAHCwqYn5V4oaN9j/UwAJ9d+zxRe9XJNIPymRhJ+IjK1JoumDekvXn+pJwDH5yMIvSkPsfKynyQ==
dependencies:
"@braintree/sanitize-url" "4.0.0"
apache-arrow "0.16.0"
lodash "4.17.15"
rxjs "6.5.5"
xss "1.0.6"
"@grafana/e2e-selectors@7.0.0":
version "7.0.0"
resolved "https://registry.yarnpkg.com/@grafana/e2e-selectors/-/e2e-selectors-7.0.0.tgz#0f19014390fb8d60fcda23ecec2946ab962e8c27"
integrity sha512-gm7WZ9AvkGv/K83z/1+X13ibjNwis0fPM1LT/iJhmN/IYB/+/FydDE+uZSBFYRckZpCXMIaoBWMFgFGBtZxneg==
dependencies:
"@grafana/tsconfig" "^1.0.0-rc1"
commander "5.0.0"
execa "4.0.0"
typescript "3.7.5"
yaml "^1.8.3"
"@grafana/eslint-config@^1.0.0-rc1": "@grafana/eslint-config@^1.0.0-rc1":
version "1.0.0-rc1" version "1.0.0-rc1"
resolved "https://registry.yarnpkg.com/@grafana/eslint-config/-/eslint-config-1.0.0-rc1.tgz#3b0a1abddfea900a57abc9526ad31abb1da2d42c" resolved "https://registry.yarnpkg.com/@grafana/eslint-config/-/eslint-config-1.0.0-rc1.tgz#3b0a1abddfea900a57abc9526ad31abb1da2d42c"
...@@ -3254,6 +3276,53 @@ ...@@ -3254,6 +3276,53 @@
resolved "https://registry.yarnpkg.com/@grafana/tsconfig/-/tsconfig-1.0.0-rc1.tgz#d07ea16755a50cae21000113f30546b61647a200" resolved "https://registry.yarnpkg.com/@grafana/tsconfig/-/tsconfig-1.0.0-rc1.tgz#d07ea16755a50cae21000113f30546b61647a200"
integrity sha512-nucKPGyzlSKYSiJk5RA8GzMdVWhdYNdF+Hh65AXxjD9PlY69JKr5wANj8bVdQboag6dgg0BFKqgKPyY+YtV4Iw== integrity sha512-nucKPGyzlSKYSiJk5RA8GzMdVWhdYNdF+Hh65AXxjD9PlY69JKr5wANj8bVdQboag6dgg0BFKqgKPyY+YtV4Iw==
"@grafana/ui@next":
version "7.0.0"
resolved "https://registry.yarnpkg.com/@grafana/ui/-/ui-7.0.0.tgz#9e434adc4eb3806e560ede3524803113db64621e"
integrity sha512-b5BMXCjpitKn6OtF0G3rHq0ZhuOl14wXeyPNxBXhw98f62usJfhSLZOZ4w6h4y1sMY70zHnL8tyM23SB2KJ3/w==
dependencies:
"@emotion/core" "^10.0.27"
"@grafana/data" "7.0.0"
"@grafana/e2e-selectors" "7.0.0"
"@grafana/slate-react" "0.22.9-grafana"
"@grafana/tsconfig" "^1.0.0-rc1"
"@iconscout/react-unicons" "^1.0.0"
"@torkelo/react-select" "3.0.8"
"@types/react-beautiful-dnd" "12.1.2"
"@types/react-color" "3.0.1"
"@types/react-select" "3.0.8"
"@types/react-table" "7.0.12"
"@types/slate" "0.47.1"
"@types/slate-react" "0.22.5"
bizcharts "^3.5.8"
classnames "2.2.6"
d3 "5.15.0"
emotion "10.0.27"
immutable "3.8.2"
jquery "3.4.1"
lodash "4.17.15"
moment "2.24.0"
papaparse "4.6.3"
rc-cascader "1.0.1"
rc-drawer "3.1.3"
rc-slider "8.7.1"
rc-time-picker "^3.7.3"
react "16.12.0"
react-beautiful-dnd "13.0.0"
react-calendar "2.19.2"
react-color "2.18.0"
react-custom-scrollbars "4.2.1"
react-dom "16.12.0"
react-highlight-words "0.16.0"
react-hook-form "5.1.3"
react-popper "1.3.3"
react-storybook-addon-props-combinations "1.1.0"
react-table "7.0.0"
react-transition-group "4.3.0"
slate "0.47.8"
storybook-dark-mode "0.4.0"
tinycolor2 "1.4.1"
"@icons/material@^0.2.4": "@icons/material@^0.2.4":
version "0.2.4" version "0.2.4"
resolved "https://registry.yarnpkg.com/@icons/material/-/material-0.2.4.tgz#e90c9f71768b3736e76d7dd6783fc6c2afa88bc8" resolved "https://registry.yarnpkg.com/@icons/material/-/material-0.2.4.tgz#e90c9f71768b3736e76d7dd6783fc6c2afa88bc8"
...@@ -4236,6 +4305,11 @@ ...@@ -4236,6 +4305,11 @@
resolved "https://registry.yarnpkg.com/@microsoft/tsdoc/-/tsdoc-0.12.14.tgz#0e0810a0a174e50e22dfe8edb30599840712f22d" resolved "https://registry.yarnpkg.com/@microsoft/tsdoc/-/tsdoc-0.12.14.tgz#0e0810a0a174e50e22dfe8edb30599840712f22d"
integrity sha512-518yewjSga1jLdiLrcmpMFlaba5P+50b0TWNFUpC+SL9Yzf0kMi57qw+bMl+rQ08cGqH1vLx4eg9YFUbZXgZ0Q== integrity sha512-518yewjSga1jLdiLrcmpMFlaba5P+50b0TWNFUpC+SL9Yzf0kMi57qw+bMl+rQ08cGqH1vLx4eg9YFUbZXgZ0Q==
"@mochajs/json-file-reporter@^1.2.0":
version "1.2.0"
resolved "https://registry.yarnpkg.com/@mochajs/json-file-reporter/-/json-file-reporter-1.2.0.tgz#036917c90c0291dab5dd4e14323da813108295c8"
integrity sha512-uAxHLKG+x0qkYnyQRBoHhXJCF7r2BS87Sdz3VKj19QB6Cxjs25yjIgO4X0PJpfa6CawA4BST+V2Q6y9iiNrWqg==
"@mrmlnc/readdir-enhanced@^2.2.1": "@mrmlnc/readdir-enhanced@^2.2.1":
version "2.2.1" version "2.2.1"
resolved "https://registry.yarnpkg.com/@mrmlnc/readdir-enhanced/-/readdir-enhanced-2.2.1.tgz#524af240d1a360527b730475ecfa1344aa540dde" resolved "https://registry.yarnpkg.com/@mrmlnc/readdir-enhanced/-/readdir-enhanced-2.2.1.tgz#524af240d1a360527b730475ecfa1344aa540dde"
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment