diff --git a/cypress/support/commands.js b/cypress/support/commands.js index b59f7301f..504611888 100644 --- a/cypress/support/commands.js +++ b/cypress/support/commands.js @@ -63,27 +63,20 @@ Cypress.Commands.add('mountWithContext', (Component, options = {}, props) => { // one of the fec dependencies talks to window.insights.chrome Cypress.Commands.add( - 'mockWindowChrome', + 'mockWindowInsights', ({ userPermissions } = { userPermissions: ['*:*:*'] }) => { - cy.window().then( - // one of the fec dependencies talks to window.insights.chrome - (window) => { - window.chrome = { - getApp: () => 'inventory', - }; - window.insights = { - chrome: { - getUserPermissions: () => userPermissions, - auth: { - getUser: () => { - return Promise.resolve({}); - }, - }, - getApp: () => 'inventory', + window.insights = { + ...window.insights, + chrome: { + getUserPermissions: () => userPermissions, + auth: { + getUser: () => { + return Promise.resolve({}); }, - }; - } - ); + }, + getApp: () => 'inventory', + }, + }; } ); diff --git a/package-lock.json b/package-lock.json index 4f9985c43..a9ccdda20 100644 --- a/package-lock.json +++ b/package-lock.json @@ -50,7 +50,7 @@ "@commitlint/cli": "^17.6.7", "@commitlint/config-conventional": "^17.6.7", "@commitlint/travis-cli": "^17.6.7", - "@cypress/code-coverage": "^3.10.0", + "@cypress/code-coverage": "^3.12.9", "@cypress/react": "^7.0.2", "@patternfly/patternfly": "^4.224.2", "@redhat-cloud-services/eslint-config-redhat-cloud-services": "^1.3.0", @@ -2794,23 +2794,27 @@ } }, "node_modules/@cypress/code-coverage": { - "version": "3.10.0", - "resolved": "https://registry.npmjs.org/@cypress/code-coverage/-/code-coverage-3.10.0.tgz", - "integrity": "sha512-K5pW2KPpK4vKMXqxd6vuzo6m9BNgpAv1LcrrtmqAtOJ1RGoEILXYZVost0L6Q+V01NyY7n7jXIIfS7LR3nP6YA==", + "version": "3.12.9", + "resolved": "https://registry.npmjs.org/@cypress/code-coverage/-/code-coverage-3.12.9.tgz", + "integrity": "sha512-MIVISl2WOYzV0DgRZXs9wxYRBMM5eN2n/p4PN0wPJCATllfv8nqqyMC1TGWBrf8Di+QMikUjbSZ20w/5+9w4Lg==", "dev": true, "dependencies": { - "@cypress/webpack-preprocessor": "^5.11.0", + "@cypress/webpack-preprocessor": "^6.0.0", "chalk": "4.1.2", - "dayjs": "1.10.7", + "dayjs": "1.11.10", "debug": "4.3.4", "execa": "4.1.0", "globby": "11.0.4", "istanbul-lib-coverage": "3.0.0", - "js-yaml": "3.14.1", + "js-yaml": "4.1.0", "nyc": "15.1.0" }, "peerDependencies": { - "cypress": "*" + "@babel/core": "^7.0.1", + "@babel/preset-env": "^7.0.0", + "babel-loader": "^8.3 || ^9", + "cypress": "*", + "webpack": "^4 || ^5" } }, "node_modules/@cypress/code-coverage/node_modules/ansi-styles": { @@ -2828,15 +2832,6 @@ "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, - "node_modules/@cypress/code-coverage/node_modules/argparse": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", - "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", - "dev": true, - "dependencies": { - "sprintf-js": "~1.0.2" - } - }, "node_modules/@cypress/code-coverage/node_modules/array-union": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz", @@ -2880,12 +2875,6 @@ "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", "dev": true }, - "node_modules/@cypress/code-coverage/node_modules/dayjs": { - "version": "1.10.7", - "resolved": "https://registry.npmjs.org/dayjs/-/dayjs-1.10.7.tgz", - "integrity": "sha512-P6twpd70BcPK34K26uJ1KT3wlhpuOAPoMwJzpsIWUxHZ7wpmbdZL/hQqBDfz7hGurYSa5PhzdhDHtt319hL3ig==", - "dev": true - }, "node_modules/@cypress/code-coverage/node_modules/execa": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/execa/-/execa-4.1.0.tgz", @@ -2962,19 +2951,6 @@ "node": ">=8.12.0" } }, - "node_modules/@cypress/code-coverage/node_modules/js-yaml": { - "version": "3.14.1", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", - "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", - "dev": true, - "dependencies": { - "argparse": "^1.0.7", - "esprima": "^4.0.0" - }, - "bin": { - "js-yaml": "bin/js-yaml.js" - } - }, "node_modules/@cypress/code-coverage/node_modules/supports-color": { "version": "7.2.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", @@ -3058,78 +3034,28 @@ } }, "node_modules/@cypress/webpack-preprocessor": { - "version": "5.15.6", - "resolved": "https://registry.npmjs.org/@cypress/webpack-preprocessor/-/webpack-preprocessor-5.15.6.tgz", - "integrity": "sha512-UCpDxj0PJTenvBJsAuSIyymZWnfvseZHNLbXlMZV+H939dYp7FhAcI58CAwWvjMEu2peQfsFpE+QWrMJvBIobQ==", + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/@cypress/webpack-preprocessor/-/webpack-preprocessor-6.0.0.tgz", + "integrity": "sha512-1AS1Et5CNPJii0+DdBZBS8e0hlM2BkBNmYRdZO4/16A3KS3em1sjPZtFw7jJF00m6DYAdB9iy6QW/lLZ2bN0gg==", "dev": true, "dependencies": { - "@babel/parser": "7.13.0", "bluebird": "3.7.1", - "debug": "^4.3.2", - "fs-extra": "^10.1.0", - "loader-utils": "^2.0.0", - "lodash": "^4.17.20", - "md5": "2.3.0", - "source-map": "^0.6.1", - "webpack-virtual-modules": "^0.4.4" + "debug": "^4.3.4", + "lodash": "^4.17.20" }, "peerDependencies": { "@babel/core": "^7.0.1", "@babel/preset-env": "^7.0.0", - "babel-loader": "^8.0.2", + "babel-loader": "^8.3 || ^9", "webpack": "^4 || ^5" } }, - "node_modules/@cypress/webpack-preprocessor/node_modules/@babel/parser": { - "version": "7.13.0", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.13.0.tgz", - "integrity": "sha512-w80kxEMFhE3wjMOQkfdTvv0CSdRSJZptIlLhU4eU/coNJeWjduspUFz+IRnBbAq6m5XYBFMoT1TNkk9K9yf10g==", - "dev": true, - "bin": { - "parser": "bin/babel-parser.js" - }, - "engines": { - "node": ">=6.0.0" - } - }, "node_modules/@cypress/webpack-preprocessor/node_modules/bluebird": { "version": "3.7.1", "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.7.1.tgz", "integrity": "sha512-DdmyoGCleJnkbp3nkbxTLJ18rjDsE4yCggEwKNXkeV123sPNfOCYeDoeuOY+F2FrSjO1YXcTU+dsy96KMy+gcg==", "dev": true }, - "node_modules/@cypress/webpack-preprocessor/node_modules/fs-extra": { - "version": "10.1.0", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-10.1.0.tgz", - "integrity": "sha512-oRXApq54ETRj4eMiFzGnHWGy+zo5raudjuxN0b8H7s/RU2oW0Wvsx9O0ACRN/kRq9E8Vu/ReskGB5o3ji+FzHQ==", - "dev": true, - "dependencies": { - "graceful-fs": "^4.2.0", - "jsonfile": "^6.0.1", - "universalify": "^2.0.0" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/@cypress/webpack-preprocessor/node_modules/source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/@cypress/webpack-preprocessor/node_modules/universalify": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.0.tgz", - "integrity": "sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ==", - "dev": true, - "engines": { - "node": ">= 10.0.0" - } - }, "node_modules/@cypress/xvfb": { "version": "1.2.4", "resolved": "https://registry.npmjs.org/@cypress/xvfb/-/xvfb-1.2.4.tgz", @@ -4869,6 +4795,25 @@ "form-data": "^4.0.0" } }, + "node_modules/@redhat-cloud-services/frontend-components-config/node_modules/babel-loader": { + "version": "8.3.0", + "resolved": "https://registry.npmjs.org/babel-loader/-/babel-loader-8.3.0.tgz", + "integrity": "sha512-H8SvsMF+m9t15HNLMipppzkC+Y2Yq+v3SonZyU70RBL/h1gxPkH08Ot8pEE9Z4Kd+czyWJClmFS8qzIP9OZ04Q==", + "dev": true, + "dependencies": { + "find-cache-dir": "^3.3.1", + "loader-utils": "^2.0.0", + "make-dir": "^3.1.0", + "schema-utils": "^2.6.5" + }, + "engines": { + "node": ">= 8.9" + }, + "peerDependencies": { + "@babel/core": "^7.0.0", + "webpack": ">=2" + } + }, "node_modules/@redhat-cloud-services/frontend-components-config/node_modules/chalk": { "version": "4.1.2", "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", @@ -4940,6 +4885,24 @@ "node": ">=8" } }, + "node_modules/@redhat-cloud-services/frontend-components-config/node_modules/schema-utils": { + "version": "2.7.1", + "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-2.7.1.tgz", + "integrity": "sha512-SHiNtMOUGWBQJwzISiVYKu82GiV4QYGePp3odlY1tuKO7gPtphAT5R/py0fA6xtbgLL/RvtJZnU9b8s0F1q0Xg==", + "dev": true, + "dependencies": { + "@types/json-schema": "^7.0.5", + "ajv": "^6.12.4", + "ajv-keywords": "^3.5.2" + }, + "engines": { + "node": ">= 8.9.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" + } + }, "node_modules/@redhat-cloud-services/frontend-components-config/node_modules/supports-color": { "version": "7.2.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", @@ -8032,22 +7995,142 @@ } }, "node_modules/babel-loader": { - "version": "8.2.5", - "resolved": "https://registry.npmjs.org/babel-loader/-/babel-loader-8.2.5.tgz", - "integrity": "sha512-OSiFfH89LrEMiWd4pLNqGz4CwJDtbs2ZVc+iGu2HrkRfPxId9F2anQj38IxWpmRfsUY0aBZYi1EFcd3mhtRMLQ==", + "version": "9.1.3", + "resolved": "https://registry.npmjs.org/babel-loader/-/babel-loader-9.1.3.tgz", + "integrity": "sha512-xG3ST4DglodGf8qSwv0MdeWLhrDsw/32QMdTO5T1ZIp9gQur0HkCyFs7Awskr10JKXFXwpAhiCuYX5oGXnRGbw==", "dev": true, + "peer": true, "dependencies": { - "find-cache-dir": "^3.3.1", - "loader-utils": "^2.0.0", - "make-dir": "^3.1.0", - "schema-utils": "^2.6.5" + "find-cache-dir": "^4.0.0", + "schema-utils": "^4.0.0" }, "engines": { - "node": ">= 8.9" + "node": ">= 14.15.0" }, "peerDependencies": { - "@babel/core": "^7.0.0", - "webpack": ">=2" + "@babel/core": "^7.12.0", + "webpack": ">=5" + } + }, + "node_modules/babel-loader/node_modules/find-cache-dir": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-4.0.0.tgz", + "integrity": "sha512-9ZonPT4ZAK4a+1pUPVPZJapbi7O5qbbJPdYw/NOQWZZbVLdDTYM3A4R9z/DpAM08IDaFGsvPgiGZ82WEwUDWjg==", + "dev": true, + "peer": true, + "dependencies": { + "common-path-prefix": "^3.0.0", + "pkg-dir": "^7.0.0" + }, + "engines": { + "node": ">=14.16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/babel-loader/node_modules/find-up": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-6.3.0.tgz", + "integrity": "sha512-v2ZsoEuVHYy8ZIlYqwPe/39Cy+cFDzp4dXPaxNvkEuouymu+2Jbz0PxpKarJHYJTmv2HWT3O382qY8l4jMWthw==", + "dev": true, + "peer": true, + "dependencies": { + "locate-path": "^7.1.0", + "path-exists": "^5.0.0" + }, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/babel-loader/node_modules/locate-path": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-7.2.0.tgz", + "integrity": "sha512-gvVijfZvn7R+2qyPX8mAuKcFGDf6Nc61GdvGafQsHL0sBIxfKzA+usWn4GFC/bk+QdwPUD4kWFJLhElipq+0VA==", + "dev": true, + "peer": true, + "dependencies": { + "p-locate": "^6.0.0" + }, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/babel-loader/node_modules/p-limit": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-4.0.0.tgz", + "integrity": "sha512-5b0R4txpzjPWVw/cXXUResoD4hb6U/x9BH08L7nw+GN1sezDzPdxeRvpc9c433fZhBan/wusjbCsqwqm4EIBIQ==", + "dev": true, + "peer": true, + "dependencies": { + "yocto-queue": "^1.0.0" + }, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/babel-loader/node_modules/p-locate": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-6.0.0.tgz", + "integrity": "sha512-wPrq66Llhl7/4AGC6I+cqxT07LhXvWL08LNXz1fENOw0Ap4sRZZ/gZpTTJ5jpurzzzfS2W/Ge9BY3LgLjCShcw==", + "dev": true, + "peer": true, + "dependencies": { + "p-limit": "^4.0.0" + }, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/babel-loader/node_modules/path-exists": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-5.0.0.tgz", + "integrity": "sha512-RjhtfwJOxzcFmNOi6ltcbcu4Iu+FL3zEj83dk4kAS+fVpTxXLO1b38RvJgT/0QwvV/L3aY9TAnyv0EOqW4GoMQ==", + "dev": true, + "peer": true, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + } + }, + "node_modules/babel-loader/node_modules/pkg-dir": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-7.0.0.tgz", + "integrity": "sha512-Ie9z/WINcxxLp27BKOCHGde4ITq9UklYKDzVo1nhk5sqGEXU3FpkwP5GM2voTGJkGd9B3Otl+Q4uwSOeSUtOBA==", + "dev": true, + "peer": true, + "dependencies": { + "find-up": "^6.3.0" + }, + "engines": { + "node": ">=14.16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/babel-loader/node_modules/yocto-queue": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-1.0.0.tgz", + "integrity": "sha512-9bnSc/HEW2uRy67wc+T8UwauLuPJVn28jb+GtJY16iiKWyvmYJRXVT4UamsAEGQfPohgr2q4Tq0sQbQlxTfi1g==", + "dev": true, + "peer": true, + "engines": { + "node": ">=12.20" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/babel-plugin-istanbul": { @@ -8723,15 +8806,6 @@ "integrity": "sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA==", "dev": true }, - "node_modules/charenc": { - "version": "0.0.2", - "resolved": "https://registry.npmjs.org/charenc/-/charenc-0.0.2.tgz", - "integrity": "sha512-yrLQ/yVUFXkzg7EDQsPieE/53+0RlaWTs+wBrvW36cyilJ2SaDWfl4Yj7MtLTXleV9uEKefbAGUPv2/iWSooRA==", - "dev": true, - "engines": { - "node": "*" - } - }, "node_modules/charset": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/charset/-/charset-1.0.1.tgz", @@ -9822,15 +9896,6 @@ "node": ">= 8" } }, - "node_modules/crypt": { - "version": "0.0.2", - "resolved": "https://registry.npmjs.org/crypt/-/crypt-0.0.2.tgz", - "integrity": "sha512-mCxBlsHFYh9C+HVpiEacem8FEBnMXgU9gy4zmNC+SXAZNB/1idgp/aulFJ4FgCi7GPEVbfyng092GqL2k2rmow==", - "dev": true, - "engines": { - "node": "*" - } - }, "node_modules/crypto-random-string": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/crypto-random-string/-/crypto-random-string-2.0.0.tgz", @@ -10256,9 +10321,9 @@ } }, "node_modules/dayjs": { - "version": "1.11.5", - "resolved": "https://registry.npmjs.org/dayjs/-/dayjs-1.11.5.tgz", - "integrity": "sha512-CAdX5Q3YW3Gclyo5Vpqkgpj8fSdLQcRuzfX6mC6Phy0nfJ0eGYOeS7m4mt2plDWLAtA4TqTakvbboHvUxfe4iA==" + "version": "1.11.10", + "resolved": "https://registry.npmjs.org/dayjs/-/dayjs-1.11.10.tgz", + "integrity": "sha512-vjAczensTgRcqDERK0SR2XMwsF/tSvnvlv6VcF2GIhg6Sx4yOIt/irsr1RDJsKiIyBzJDpCoXiWWq28MqH2cnQ==" }, "node_modules/debounce-promise": { "version": "3.1.2", @@ -20102,23 +20167,6 @@ "url": "https://github.com/sponsors/wooorm" } }, - "node_modules/md5": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/md5/-/md5-2.3.0.tgz", - "integrity": "sha512-T1GITYmFaKuO91vxyoQMFETst+O71VUPEU3ze5GNzDm0OWdP8v1ziTaAEPUr/3kLsY3Sftgz242A1SetQiDL7g==", - "dev": true, - "dependencies": { - "charenc": "0.0.2", - "crypt": "0.0.2", - "is-buffer": "~1.1.6" - } - }, - "node_modules/md5/node_modules/is-buffer": { - "version": "1.1.6", - "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", - "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==", - "dev": true - }, "node_modules/mdast-util-from-markdown": { "version": "0.8.5", "resolved": "https://registry.npmjs.org/mdast-util-from-markdown/-/mdast-util-from-markdown-0.8.5.tgz", @@ -20446,59 +20494,6 @@ "webpack": "^5.0.0" } }, - "node_modules/mini-css-extract-plugin/node_modules/ajv": { - "version": "8.12.0", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.12.0.tgz", - "integrity": "sha512-sRu1kpcO9yLtYxBKvqfTeh9KzZEwO3STyX1HT+4CaDzC6HpTGYhIhPIzj9XuKU7KYDwnaeh5hcOwjy1QuJzBPA==", - "dev": true, - "dependencies": { - "fast-deep-equal": "^3.1.1", - "json-schema-traverse": "^1.0.0", - "require-from-string": "^2.0.2", - "uri-js": "^4.2.2" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/epoberezkin" - } - }, - "node_modules/mini-css-extract-plugin/node_modules/ajv-keywords": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-5.1.0.tgz", - "integrity": "sha512-YCS/JNFAUyr5vAuhk1DWm1CBxRHW9LbJ2ozWeemrIqpbsqKjHVxYPyi5GC0rjZIT5JxJ3virVTS8wk4i/Z+krw==", - "dev": true, - "dependencies": { - "fast-deep-equal": "^3.1.3" - }, - "peerDependencies": { - "ajv": "^8.8.2" - } - }, - "node_modules/mini-css-extract-plugin/node_modules/json-schema-traverse": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", - "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==", - "dev": true - }, - "node_modules/mini-css-extract-plugin/node_modules/schema-utils": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-4.0.1.tgz", - "integrity": "sha512-lELhBAAly9NowEsX0yZBlw9ahZG+sK/1RJ21EpzdYHKEs13Vku3LJ+MIPhh4sMs0oCCeufZQEQbMekiA4vuVIQ==", - "dev": true, - "dependencies": { - "@types/json-schema": "^7.0.9", - "ajv": "^8.9.0", - "ajv-formats": "^2.1.1", - "ajv-keywords": "^5.1.0" - }, - "engines": { - "node": ">= 12.13.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/webpack" - } - }, "node_modules/minimalistic-assert": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz", @@ -26535,23 +26530,58 @@ } }, "node_modules/schema-utils": { - "version": "2.7.1", - "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-2.7.1.tgz", - "integrity": "sha512-SHiNtMOUGWBQJwzISiVYKu82GiV4QYGePp3odlY1tuKO7gPtphAT5R/py0fA6xtbgLL/RvtJZnU9b8s0F1q0Xg==", + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-4.2.0.tgz", + "integrity": "sha512-L0jRsrPpjdckP3oPug3/VxNKt2trR8TcabrM6FOAAlvC/9Phcmm+cuAgTlxBqdBR1WJx7Naj9WHw+aOmheSVbw==", "dev": true, "dependencies": { - "@types/json-schema": "^7.0.5", - "ajv": "^6.12.4", - "ajv-keywords": "^3.5.2" + "@types/json-schema": "^7.0.9", + "ajv": "^8.9.0", + "ajv-formats": "^2.1.1", + "ajv-keywords": "^5.1.0" }, "engines": { - "node": ">= 8.9.0" + "node": ">= 12.13.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/webpack" } }, + "node_modules/schema-utils/node_modules/ajv": { + "version": "8.12.0", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.12.0.tgz", + "integrity": "sha512-sRu1kpcO9yLtYxBKvqfTeh9KzZEwO3STyX1HT+4CaDzC6HpTGYhIhPIzj9XuKU7KYDwnaeh5hcOwjy1QuJzBPA==", + "dev": true, + "dependencies": { + "fast-deep-equal": "^3.1.1", + "json-schema-traverse": "^1.0.0", + "require-from-string": "^2.0.2", + "uri-js": "^4.2.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, + "node_modules/schema-utils/node_modules/ajv-keywords": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-5.1.0.tgz", + "integrity": "sha512-YCS/JNFAUyr5vAuhk1DWm1CBxRHW9LbJ2ozWeemrIqpbsqKjHVxYPyi5GC0rjZIT5JxJ3virVTS8wk4i/Z+krw==", + "dev": true, + "dependencies": { + "fast-deep-equal": "^3.1.3" + }, + "peerDependencies": { + "ajv": "^8.8.2" + } + }, + "node_modules/schema-utils/node_modules/json-schema-traverse": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", + "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==", + "dev": true + }, "node_modules/secure-compare": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/secure-compare/-/secure-compare-3.0.1.tgz", @@ -29534,65 +29564,12 @@ "webpack": "^4.0.0 || ^5.0.0" } }, - "node_modules/webpack-dev-middleware/node_modules/ajv": { - "version": "8.11.0", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.11.0.tgz", - "integrity": "sha512-wGgprdCvMalC0BztXvitD2hC04YffAvtsUn93JbGXYLAtCUO4xd17mCCZQxUOItiBwZvJScWo8NIvQMQ71rdpg==", - "dev": true, - "dependencies": { - "fast-deep-equal": "^3.1.1", - "json-schema-traverse": "^1.0.0", - "require-from-string": "^2.0.2", - "uri-js": "^4.2.2" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/epoberezkin" - } - }, - "node_modules/webpack-dev-middleware/node_modules/ajv-keywords": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-5.1.0.tgz", - "integrity": "sha512-YCS/JNFAUyr5vAuhk1DWm1CBxRHW9LbJ2ozWeemrIqpbsqKjHVxYPyi5GC0rjZIT5JxJ3virVTS8wk4i/Z+krw==", - "dev": true, - "dependencies": { - "fast-deep-equal": "^3.1.3" - }, - "peerDependencies": { - "ajv": "^8.8.2" - } - }, "node_modules/webpack-dev-middleware/node_modules/colorette": { "version": "2.0.19", "resolved": "https://registry.npmjs.org/colorette/-/colorette-2.0.19.tgz", "integrity": "sha512-3tlv/dIP7FWvj3BsbHrGLJ6l/oKh1O3TcgBqMn+yyCagOxc23fyzDS6HypQbgxWbkpDnf52p1LuR4eWDQ/K9WQ==", "dev": true }, - "node_modules/webpack-dev-middleware/node_modules/json-schema-traverse": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", - "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==", - "dev": true - }, - "node_modules/webpack-dev-middleware/node_modules/schema-utils": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-4.0.0.tgz", - "integrity": "sha512-1edyXKgh6XnJsJSQ8mKWXnN/BVaIbFMLpouRUrXgVq7WYne5kw3MW7UPhO44uRXQSIpTSXoJbmrR2X0w9kUTyg==", - "dev": true, - "dependencies": { - "@types/json-schema": "^7.0.9", - "ajv": "^8.8.0", - "ajv-formats": "^2.1.1", - "ajv-keywords": "^5.0.0" - }, - "engines": { - "node": ">= 12.13.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/webpack" - } - }, "node_modules/webpack-dev-server": { "version": "4.15.1", "resolved": "https://registry.npmjs.org/webpack-dev-server/-/webpack-dev-server-4.15.1.tgz", @@ -29652,34 +29629,6 @@ } } }, - "node_modules/webpack-dev-server/node_modules/ajv": { - "version": "8.11.0", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.11.0.tgz", - "integrity": "sha512-wGgprdCvMalC0BztXvitD2hC04YffAvtsUn93JbGXYLAtCUO4xd17mCCZQxUOItiBwZvJScWo8NIvQMQ71rdpg==", - "dev": true, - "dependencies": { - "fast-deep-equal": "^3.1.1", - "json-schema-traverse": "^1.0.0", - "require-from-string": "^2.0.2", - "uri-js": "^4.2.2" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/epoberezkin" - } - }, - "node_modules/webpack-dev-server/node_modules/ajv-keywords": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-5.1.0.tgz", - "integrity": "sha512-YCS/JNFAUyr5vAuhk1DWm1CBxRHW9LbJ2ozWeemrIqpbsqKjHVxYPyi5GC0rjZIT5JxJ3virVTS8wk4i/Z+krw==", - "dev": true, - "dependencies": { - "fast-deep-equal": "^3.1.3" - }, - "peerDependencies": { - "ajv": "^8.8.2" - } - }, "node_modules/webpack-dev-server/node_modules/colorette": { "version": "2.0.19", "resolved": "https://registry.npmjs.org/colorette/-/colorette-2.0.19.tgz", @@ -29695,12 +29644,6 @@ "node": ">= 10" } }, - "node_modules/webpack-dev-server/node_modules/json-schema-traverse": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", - "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==", - "dev": true - }, "node_modules/webpack-dev-server/node_modules/rimraf": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", @@ -29716,25 +29659,6 @@ "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/webpack-dev-server/node_modules/schema-utils": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-4.0.0.tgz", - "integrity": "sha512-1edyXKgh6XnJsJSQ8mKWXnN/BVaIbFMLpouRUrXgVq7WYne5kw3MW7UPhO44uRXQSIpTSXoJbmrR2X0w9kUTyg==", - "dev": true, - "dependencies": { - "@types/json-schema": "^7.0.9", - "ajv": "^8.8.0", - "ajv-formats": "^2.1.1", - "ajv-keywords": "^5.0.0" - }, - "engines": { - "node": ">= 12.13.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/webpack" - } - }, "node_modules/webpack-dev-server/node_modules/ws": { "version": "8.13.0", "resolved": "https://registry.npmjs.org/ws/-/ws-8.13.0.tgz", @@ -29769,12 +29693,6 @@ "node": ">=10.0.0" } }, - "node_modules/webpack-virtual-modules": { - "version": "0.4.6", - "resolved": "https://registry.npmjs.org/webpack-virtual-modules/-/webpack-virtual-modules-0.4.6.tgz", - "integrity": "sha512-5tyDlKLqPfMqjT3Q9TAqf2YqjwmnUleZwzJi1A5qXnlBCdj2AtOJ6wAWdglTIDOPgOiOrXeBeFcsQ8+aGQ6QbA==", - "dev": true - }, "node_modules/webpack/node_modules/acorn": { "version": "8.8.2", "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.8.2.tgz", diff --git a/package.json b/package.json index 27d64c92b..229b3dd6c 100644 --- a/package.json +++ b/package.json @@ -112,7 +112,7 @@ "@commitlint/cli": "^17.6.7", "@commitlint/config-conventional": "^17.6.7", "@commitlint/travis-cli": "^17.6.7", - "@cypress/code-coverage": "^3.10.0", + "@cypress/code-coverage": "^3.12.9", "@cypress/react": "^7.0.2", "@patternfly/patternfly": "^4.224.2", "@redhat-cloud-services/eslint-config-redhat-cloud-services": "^1.3.0", @@ -195,4 +195,4 @@ "config": { "api_schema_path": "https://raw.githubusercontent.com/RedHatInsights/insights-host-inventory/master/swagger/openapi.json" } -} +} \ No newline at end of file diff --git a/src/components/GroupSystems/GroupSystems.cy.js b/src/components/GroupSystems/GroupSystems.cy.js index 21a93c589..b80b4e1ef 100644 --- a/src/components/GroupSystems/GroupSystems.cy.js +++ b/src/components/GroupSystems/GroupSystems.cy.js @@ -86,7 +86,7 @@ describe('test data', () => { }); before(() => { - cy.mockWindowChrome(); + cy.mockWindowInsights(); }); describe('renders correctly', () => { @@ -457,7 +457,7 @@ describe('integration with rbac', () => { describe('has only read permissions', () => { before(() => { - cy.mockWindowChrome({ + cy.mockWindowInsights({ userPermissions: READ_PERMISSIONS_WITH_RD, }); }); @@ -481,7 +481,7 @@ describe('integration with rbac', () => { describe('has groups write permissions', () => { before(() => { - cy.mockWindowChrome({ + cy.mockWindowInsights({ userPermissions: [ ...READ_PERMISSIONS_WITH_RD, ...WRITE_PERMISSIONS_WITH_RD, diff --git a/src/components/GroupsTable/GroupsTable.cy.js b/src/components/GroupsTable/GroupsTable.cy.js index cc07be674..dc10d52b6 100644 --- a/src/components/GroupsTable/GroupsTable.cy.js +++ b/src/components/GroupsTable/GroupsTable.cy.js @@ -41,7 +41,7 @@ const mountTable = (initialEntry = '/') => }); before(() => { - cy.mockWindowChrome(); + cy.mockWindowInsights(); }); const waitTable = () => @@ -433,7 +433,7 @@ describe('edge cases', () => { describe('integration with rbac', () => { describe('with only groups read', () => { before(() => { - cy.mockWindowChrome({ userPermissions: ['inventory:groups:read'] }); + cy.mockWindowInsights({ userPermissions: ['inventory:groups:read'] }); }); beforeEach(() => { @@ -461,7 +461,7 @@ describe('integration with rbac', () => { describe('with the write permissions for some groups', () => { before(() => { - cy.mockWindowChrome({ + cy.mockWindowInsights({ userPermissions: [ 'inventory:groups:read', { diff --git a/src/components/ImmutableDevices/ImmutableDevices.cy.js b/src/components/ImmutableDevices/ImmutableDevices.cy.js index 48721ad12..8f3ecb1bf 100644 --- a/src/components/ImmutableDevices/ImmutableDevices.cy.js +++ b/src/components/ImmutableDevices/ImmutableDevices.cy.js @@ -44,7 +44,7 @@ const mountWithProps = (props) => { }; before(() => { - cy.mockWindowChrome(); + cy.mockWindowInsights(); }); describe('ImmutableDevices', () => { diff --git a/src/components/InventoryGroupDetail/GroupDetailInfo.cy.js b/src/components/InventoryGroupDetail/GroupDetailInfo.cy.js index c49f58d20..eb7b053b6 100644 --- a/src/components/InventoryGroupDetail/GroupDetailInfo.cy.js +++ b/src/components/InventoryGroupDetail/GroupDetailInfo.cy.js @@ -5,7 +5,7 @@ const mountPage = (params) => describe('group detail information page', () => { before(() => { - cy.mockWindowChrome({ userPermissions: ['rbac:*:*'] }); + cy.mockWindowInsights({ userPermissions: ['rbac:*:*'] }); }); beforeEach(() => { @@ -42,7 +42,7 @@ describe('group detail information page', () => { describe('with no user access administrator role', () => { beforeEach(() => { - cy.mockWindowChrome({ userPermissions: [] }); + cy.mockWindowInsights({ userPermissions: [] }); mountPage({ chrome: { isBeta: () => true } }); }); diff --git a/src/components/InventoryGroupDetail/InventoryGroupDetail.cy.js b/src/components/InventoryGroupDetail/InventoryGroupDetail.cy.js index 735397fd5..67de19439 100644 --- a/src/components/InventoryGroupDetail/InventoryGroupDetail.cy.js +++ b/src/components/InventoryGroupDetail/InventoryGroupDetail.cy.js @@ -21,7 +21,7 @@ const mountPage = () => }); before(() => { - cy.mockWindowChrome(); // with all permissions + cy.mockWindowInsights(); // with all permissions }); const waitPageLoad = () => @@ -95,7 +95,7 @@ describe('group detail page', () => { describe('integration with rbac', () => { describe('no permissions', () => { before(() => { - cy.mockWindowChrome({ userPermissions: [] }); + cy.mockWindowInsights({ userPermissions: [] }); }); beforeEach(() => { @@ -133,7 +133,7 @@ describe('integration with rbac', () => { describe('only groups read permissions', () => { before(() => { - cy.mockWindowChrome({ + cy.mockWindowInsights({ userPermissions: [ { permission: 'inventory:groups:read', @@ -182,7 +182,7 @@ describe('integration with rbac', () => { describe('only group read and hosts read permission', () => { before(() => { - cy.mockWindowChrome({ + cy.mockWindowInsights({ userPermissions: [ 'inventory:hosts:read', { diff --git a/src/components/InventoryGroups/InventoryGroups.cy.js b/src/components/InventoryGroups/InventoryGroups.cy.js index 8589d519a..378755408 100644 --- a/src/components/InventoryGroups/InventoryGroups.cy.js +++ b/src/components/InventoryGroups/InventoryGroups.cy.js @@ -4,7 +4,7 @@ import InventoryGroups from './InventoryGroups'; const mountPage = () => cy.mountWithContext(InventoryGroups); before(() => { - cy.mockWindowChrome(); + cy.mockWindowInsights(); }); describe('groups table page', () => { @@ -44,7 +44,7 @@ describe('groups table page', () => { describe('integration with rbac', () => { it('disables empty state button when not enough permissions', () => { interceptors['successful empty'](); - cy.mockWindowChrome({ userPermissions: [] }); + cy.mockWindowInsights({ userPermissions: [] }); mountPage(); cy.ouiaId('CreateGroupButton').shouldHaveAriaDisabled(); diff --git a/src/components/InventoryGroups/Modals/AddSelectedHostsToGroupModal.cy.js b/src/components/InventoryGroups/Modals/AddSelectedHostsToGroupModal.cy.js index e79c46b2f..f1a6b8fb4 100644 --- a/src/components/InventoryGroups/Modals/AddSelectedHostsToGroupModal.cy.js +++ b/src/components/InventoryGroups/Modals/AddSelectedHostsToGroupModal.cy.js @@ -24,7 +24,7 @@ const mountModal = ( describe('AddSelectedHostsToGroupModal', () => { describe('without any permissions', () => { before(() => { - cy.mockWindowChrome({ + cy.mockWindowInsights({ userPermissions: [], }); }); @@ -42,7 +42,7 @@ describe('AddSelectedHostsToGroupModal', () => { describe('with limited groups write permissions', () => { it('should still hide the create group button', () => { - cy.mockWindowChrome({ + cy.mockWindowInsights({ userPermissions: [ { resourceDefinitions: [ @@ -66,7 +66,7 @@ describe('AddSelectedHostsToGroupModal', () => { describe('with groups write permission', () => { before(() => { - cy.mockWindowChrome({ + cy.mockWindowInsights({ userPermissions: ['inventory:groups:write'], }); }); diff --git a/src/components/InventoryGroups/Modals/AddSystemsToGroupModal.cy.js b/src/components/InventoryGroups/Modals/AddSystemsToGroupModal.cy.js index fdd36218a..ed8ceade8 100644 --- a/src/components/InventoryGroups/Modals/AddSystemsToGroupModal.cy.js +++ b/src/components/InventoryGroups/Modals/AddSystemsToGroupModal.cy.js @@ -41,7 +41,7 @@ const AVAILABLE_FILTER_NAMES = [ const ALERT = '[data-ouia-component-type="PF4/Alert"]'; before(() => { - cy.mockWindowChrome(); + cy.mockWindowInsights(); }); const mountModal = () => diff --git a/src/components/InventoryGroups/Modals/CreateGroupModal.cy.js b/src/components/InventoryGroups/Modals/CreateGroupModal.cy.js index d290976ea..267657b8e 100644 --- a/src/components/InventoryGroups/Modals/CreateGroupModal.cy.js +++ b/src/components/InventoryGroups/Modals/CreateGroupModal.cy.js @@ -49,7 +49,7 @@ const mockResponse = [ describe('Create Group Modal', () => { before(() => { - cy.mockWindowChrome(); + cy.mockWindowInsights(); }); beforeEach(() => { diff --git a/src/components/InventoryGroups/Modals/DeleteGroupModal.cy.js b/src/components/InventoryGroups/Modals/DeleteGroupModal.cy.js index fc0eeffee..bd771d28b 100644 --- a/src/components/InventoryGroups/Modals/DeleteGroupModal.cy.js +++ b/src/components/InventoryGroups/Modals/DeleteGroupModal.cy.js @@ -40,7 +40,7 @@ fixtures.results = [ describe('Delete Group Modal', () => { before(() => { - cy.mockWindowChrome(); + cy.mockWindowInsights(); }); describe('multiple hosts', () => { diff --git a/src/components/InventoryGroups/Modals/RenameGroupModal.cy.js b/src/components/InventoryGroups/Modals/RenameGroupModal.cy.js index e562411da..96c237863 100644 --- a/src/components/InventoryGroups/Modals/RenameGroupModal.cy.js +++ b/src/components/InventoryGroups/Modals/RenameGroupModal.cy.js @@ -26,7 +26,7 @@ describe('test data', () => { describe('render the modal', () => { before(() => { - cy.mockWindowChrome(); + cy.mockWindowInsights(); }); beforeEach(setInterceptors); diff --git a/src/components/InventoryTable/InventoryTable.cy.js b/src/components/InventoryTable/InventoryTable.cy.js index 017b92f0b..8c1334158 100644 --- a/src/components/InventoryTable/InventoryTable.cy.js +++ b/src/components/InventoryTable/InventoryTable.cy.js @@ -79,7 +79,7 @@ const setTableInterceptors = () => { describe('with default parameters', () => { before(() => { - cy.mockWindowChrome(); + cy.mockWindowInsights(); }); beforeEach(() => { @@ -246,7 +246,7 @@ describe('with default parameters', () => { }); describe('hiding filters', () => { - before(cy.mockWindowChrome); + before(cy.mockWindowInsights); beforeEach(() => setTableInterceptors()); diff --git a/src/components/InventoryTabs/HybridInventoryTabs.cy.js b/src/components/InventoryTabs/HybridInventoryTabs.cy.js index 797eb87b6..a0d5b5a6f 100644 --- a/src/components/InventoryTabs/HybridInventoryTabs.cy.js +++ b/src/components/InventoryTabs/HybridInventoryTabs.cy.js @@ -37,7 +37,7 @@ const mountWithProps = (props) => { }; before(() => { - cy.mockWindowChrome(); + cy.mockWindowInsights(); }); describe('When edge parity feature is enabled', () => { diff --git a/src/routes/InventoryDetail.cy.js b/src/routes/InventoryDetail.cy.js index b2d9d2e4d..8b457f431 100644 --- a/src/routes/InventoryDetail.cy.js +++ b/src/routes/InventoryDetail.cy.js @@ -45,7 +45,7 @@ hostInGroup.results[0].groups = [ hostInGroup.results[0].system_profile.operating_system.name = 'RHEL'; describe('renders correctly', () => { - before(() => cy.mockWindowChrome()); + before(() => cy.mockWindowInsights()); beforeEach(() => prepareTest()); it('renders main components for edge host', () => { @@ -67,7 +67,7 @@ describe('renders correctly', () => { describe('rbac integration', () => { describe('with no permissions', () => { - before(() => cy.mockWindowChrome({ userPermissions: [] })); + before(() => cy.mockWindowInsights({ userPermissions: [] })); beforeEach(() => prepareTest(hostInGroup)); it('should disable delete and edit buttons', () => { @@ -90,7 +90,7 @@ describe('rbac integration', () => { describe('with write permissions limited by group', () => { before(() => - cy.mockWindowChrome({ + cy.mockWindowInsights({ userPermissions: [ { permission: 'inventory:hosts:write', @@ -124,7 +124,7 @@ describe('rbac integration', () => { describe('with excluding group permissions', () => { before(() => - cy.mockWindowChrome({ + cy.mockWindowInsights({ userPermissions: [ { permission: 'inventory:hosts:write', diff --git a/src/routes/InventoryTable.cy.js b/src/routes/InventoryTable.cy.js index f3612fb9d..16edfc0be 100644 --- a/src/routes/InventoryTable.cy.js +++ b/src/routes/InventoryTable.cy.js @@ -44,7 +44,7 @@ const waitForTable = (waitNetwork = false) => { }; before(() => { - cy.mockWindowChrome(); + cy.mockWindowInsights(); }); describe('test data', () => { @@ -235,7 +235,7 @@ describe('inventory table', () => { describe('integration with rbac', () => { describe('with only read permissions', () => { before(() => { - cy.mockWindowChrome({ + cy.mockWindowInsights({ userPermissions: ['inventory:*:read'], }); }); @@ -273,7 +273,7 @@ describe('inventory table', () => { describe('with group-level hosts write permissions', () => { before(() => { - cy.mockWindowChrome({ + cy.mockWindowInsights({ userPermissions: [ 'inventory:*:read', { @@ -352,7 +352,7 @@ describe('inventory table', () => { describe('with excluding group-level hosts write permissions', () => { before(() => { - cy.mockWindowChrome({ + cy.mockWindowInsights({ userPermissions: [ 'inventory:*:read', { @@ -402,7 +402,7 @@ describe('inventory table', () => { describe('with limited groups write permissions', () => { before(() => { - cy.mockWindowChrome({ + cy.mockWindowInsights({ userPermissions: [ 'inventory:*:read', {