From 6de5db67d1a5c611ce7cb6384f39630df101b1bd Mon Sep 17 00:00:00 2001 From: pybelecalo <pierre-yves.belecalo@xelians.fr> Date: Fri, 22 Jan 2021 16:45:46 +0100 Subject: [PATCH] [TECH] Fix lint errors --- ui/ui-frontend-common/package-lock.json | 196 +++++++++--------- .../src/app/modules/application.service.ts | 5 +- ...plication-select-content.component.spec.ts | 2 +- .../confirm-dialog.component.spec.ts | 2 +- .../country/country.component.spec.ts | 2 +- .../customer-select-content.component.spec.ts | 2 +- .../common-menu/common-menu.component.ts | 2 +- .../role-toggle/role-toggle.component.spec.ts | 2 +- .../table-filter-search.component.spec.ts | 2 +- ui/ui-frontend/package.json | 2 + .../app/core/api/customer-api.service.spec.ts | 2 +- .../app/core/api/group-api.service.spec.ts | 2 +- .../src/app/core/api/user-api.service.spec.ts | 2 +- .../src/app/core/customer.service.spec.ts | 8 +- .../customer-create.component.spec.ts | 8 +- ...identity-provider-create.component.spec.ts | 14 +- ...dentity-provider-details.component.spec.ts | 2 +- .../sso-tab/identity-provider.service.spec.ts | 20 +- .../sso-tab/provider-api.service.spec.ts | 2 +- .../sso-tab/sso-tab.component.spec.ts | 2 +- .../customer-resolver.service.spec.ts | 12 +- .../app/customer/owner-api.service.spec.ts | 2 +- .../owner-create.component.spec.ts | 24 +-- .../customer/owner-resolver.service.spec.ts | 12 +- .../src/app/customer/owner.service.spec.ts | 8 +- .../app/customer/tenant-api.service.spec.ts | 2 +- .../tenant-create.component.spec.ts | 6 +- .../customer/tenant-resolver.service.spec.ts | 12 +- .../src/app/customer/tenant.service.spec.ts | 8 +- .../group-create.component.spec.ts | 16 +- .../group-list/group-list.component.spec.ts | 2 +- .../profiles-edit.component.spec.ts | 10 +- .../app/group/group-resolver.service.spec.ts | 12 +- .../src/app/group/group.component.spec.ts | 4 +- .../src/app/group/group.service.spec.ts | 10 +- .../information-tab.component.spec.ts | 2 +- .../app/hierarchy/hierarchy.service.spec.ts | 2 +- .../information-tab.component.spec.ts | 4 +- .../profile/profile-resolver.service.spec.ts | 12 +- .../src/app/profile/profile.service.spec.ts | 8 +- .../editable-keystore.component.spec.ts | 6 +- .../vitamui-snack-bar.service.ts | 22 +- .../customer-select.service.spec.ts | 4 +- .../user-generic-api.service.spec.ts | 2 +- .../projects/identity/src/assets/i18n/en.json | 39 +++- .../projects/identity/src/assets/i18n/fr.json | 39 +++- .../app/core/api/ingest-api.service.spec.ts | 2 +- .../projects/portal/src/assets/i18n/en.json | 3 +- .../projects/portal/src/assets/i18n/fr.json | 3 +- .../access-contract-create.component.spec.ts | 16 +- .../agency-create.component.spec.ts | 16 +- .../src/app/agency/agency.component.spec.ts | 5 +- .../context-create.component.spec.ts | 16 +- .../api/access-contract-api.service.spec.ts | 2 +- .../accession-register-api.service.spec.ts | 2 +- .../app/core/api/agency-api.service.spec.ts | 2 +- .../app/core/api/context-api.service.spec.ts | 2 +- .../api/ingest-contract-api.service.spec.ts | 2 +- .../app/core/api/ontology-api.service.spec.ts | 2 +- .../core/api/operation-api.service.spec.ts | 2 +- .../referential-import-api.service.spec.ts | 2 +- .../api/security-profile-api.service.spec.ts | 2 +- .../file-format-create.component.spec.ts | 16 +- .../logbook-search.service.spec.ts | 2 +- .../ontology-create.component.spec.ts | 16 +- .../rule-create/rule-create.component.spec.ts | 18 +- .../rule/rule-create/rule-create.component.ts | 2 +- .../rule-list/rule-list.component.spec.ts | 2 +- .../app/rule/rule-list/rule-list.component.ts | 10 +- .../rule-information-tab.component.spec.ts | 2 +- .../rule-information-tab.component.ts | 4 +- .../rule-preview.component.spec.ts | 4 +- .../src/app/rule/rule.component.spec.ts | 16 +- .../security-profile-create.component.spec.ts | 16 +- .../vitamui-import-dialog.component.spec.ts | 10 +- .../vitamui-snack-bar.service.ts | 22 +- .../starter-kit/src/app/app-routing.module.ts | 4 +- .../starter-kit/src/app/app.module.ts | 6 +- .../src/app/components/icons/icons.module.ts | 6 +- .../app/components/inputs/inputs.component.ts | 8 +- .../typography/typography.module.ts | 2 +- .../starter-kit/src/assets/i18n/en.json | 6 +- .../starter-kit/src/assets/i18n/fr.json | 6 +- ...plication-select-content.component.spec.ts | 7 +- .../card-group/card-group.component.spec.ts | 2 +- .../filing-plan/filing-plan.component.spec.ts | 49 +++-- .../filing-plan/filing-plan.service.spec.ts | 6 +- .../filing-plan/node.component.spec.ts | 10 +- .../vitamui-menu-tile.component.spec.ts | 8 +- .../vitamui-radio-group.service.spec.ts | 2 +- .../src/lib/vitamui-library.service.spec.ts | 2 +- 91 files changed, 502 insertions(+), 400 deletions(-) diff --git a/ui/ui-frontend-common/package-lock.json b/ui/ui-frontend-common/package-lock.json index 25b4ad17c..c6ae0c32a 100644 --- a/ui/ui-frontend-common/package-lock.json +++ b/ui/ui-frontend-common/package-lock.json @@ -1603,7 +1603,7 @@ }, "@babel/plugin-syntax-async-generators": { "version": "7.8.4", - "resolved": "https://nexus.teamdlab.com/repository/npm/@babel/plugin-syntax-async-generators/-/plugin-syntax-async-generators-7.8.4.tgz", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-async-generators/-/plugin-syntax-async-generators-7.8.4.tgz", "integrity": "sha512-tycmZxkGfZaxhMRbXlPXuVFpdWlXpir2W4AMhSJgRKzk/eDlIXOhb2LHWoLpDF7TEHylV5zNhykX6KAgHJmTNw==", "dev": true, "requires": { @@ -1621,7 +1621,7 @@ }, "@babel/plugin-syntax-dynamic-import": { "version": "7.8.3", - "resolved": "https://nexus.teamdlab.com/repository/npm/@babel/plugin-syntax-dynamic-import/-/plugin-syntax-dynamic-import-7.8.3.tgz", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-dynamic-import/-/plugin-syntax-dynamic-import-7.8.3.tgz", "integrity": "sha512-5gdGbFon+PszYzqs83S3E5mpi7/y/8M9eC90MRTZfduQOYW76ig6SOSPNe41IG5LoP3FGBn2N0RjVDSQiS94kQ==", "dev": true, "requires": { @@ -1639,7 +1639,7 @@ }, "@babel/plugin-syntax-json-strings": { "version": "7.8.3", - "resolved": "https://nexus.teamdlab.com/repository/npm/@babel/plugin-syntax-json-strings/-/plugin-syntax-json-strings-7.8.3.tgz", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-json-strings/-/plugin-syntax-json-strings-7.8.3.tgz", "integrity": "sha512-lY6kdGpWHvjoe2vk4WrAapEuBR69EMxZl+RoGRhrFGNYVK8mOPAW8VfbT/ZgrFbXlDNiiaxQnAtgVCZ6jv30EA==", "dev": true, "requires": { @@ -1657,7 +1657,7 @@ }, "@babel/plugin-syntax-nullish-coalescing-operator": { "version": "7.8.3", - "resolved": "https://nexus.teamdlab.com/repository/npm/@babel/plugin-syntax-nullish-coalescing-operator/-/plugin-syntax-nullish-coalescing-operator-7.8.3.tgz", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-nullish-coalescing-operator/-/plugin-syntax-nullish-coalescing-operator-7.8.3.tgz", "integrity": "sha512-aSff4zPII1u2QD7y+F8oDsz19ew4IGEJg9SVW+bqwpwtfFleiQDMdzA/R+UlWDzfnHFCxxleFT0PMIrR36XLNQ==", "dev": true, "requires": { @@ -1675,7 +1675,7 @@ }, "@babel/plugin-syntax-object-rest-spread": { "version": "7.8.3", - "resolved": "https://nexus.teamdlab.com/repository/npm/@babel/plugin-syntax-object-rest-spread/-/plugin-syntax-object-rest-spread-7.8.3.tgz", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-object-rest-spread/-/plugin-syntax-object-rest-spread-7.8.3.tgz", "integrity": "sha512-XoqMijGZb9y3y2XskN+P1wUGiVwWZ5JmoDRwx5+3GmEplNyVM2s2Dg8ILFQm8rWM48orGy5YpI5Bl8U1y7ydlA==", "dev": true, "requires": { @@ -1684,7 +1684,7 @@ }, "@babel/plugin-syntax-optional-catch-binding": { "version": "7.8.3", - "resolved": "https://nexus.teamdlab.com/repository/npm/@babel/plugin-syntax-optional-catch-binding/-/plugin-syntax-optional-catch-binding-7.8.3.tgz", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-optional-catch-binding/-/plugin-syntax-optional-catch-binding-7.8.3.tgz", "integrity": "sha512-6VPD0Pc1lpTqw0aKoeRTMiB+kWhAoT24PA+ksWSBrFtl5SIRVpZlwN3NNPQjehA2E/91FV3RjLWoVTglWcSV3Q==", "dev": true, "requires": { @@ -1693,7 +1693,7 @@ }, "@babel/plugin-syntax-optional-chaining": { "version": "7.8.3", - "resolved": "https://nexus.teamdlab.com/repository/npm/@babel/plugin-syntax-optional-chaining/-/plugin-syntax-optional-chaining-7.8.3.tgz", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-optional-chaining/-/plugin-syntax-optional-chaining-7.8.3.tgz", "integrity": "sha512-KoK9ErH1MBlCPxV0VANkXW2/dw4vlbGDrFgz8bmUsBGYkFRcbRwMh6cIJubdPrkxRwuGdtCk0v/wPTKbQgBjkg==", "dev": true, "requires": { @@ -2208,7 +2208,7 @@ }, "@istanbuljs/schema": { "version": "0.1.2", - "resolved": "https://nexus.teamdlab.com/repository/npm/@istanbuljs/schema/-/schema-0.1.2.tgz", + "resolved": "https://registry.npmjs.org/@istanbuljs/schema/-/schema-0.1.2.tgz", "integrity": "sha512-tsAQNx32a8CoFhjhijUIhI4kccIAgmGhy8LZMZgGfmXcpMbPRUqn5LWmgRttILi6yeGmBJd2xsPkFMs0PzgPCw==", "dev": true }, @@ -2607,7 +2607,7 @@ }, "@types/normalize-package-data": { "version": "2.4.0", - "resolved": "https://nexus.teamdlab.com/repository/npm/@types/normalize-package-data/-/normalize-package-data-2.4.0.tgz", + "resolved": "https://registry.npmjs.org/@types/normalize-package-data/-/normalize-package-data-2.4.0.tgz", "integrity": "sha512-f5j5b/Gf71L+dbqxIpQ4Z2WlmI/mPJ0fOkGGmFgtb6sAu97EPczzbS3/tJKxmcYDj55OX6ssqwDAWOHIYDRDGA==", "dev": true }, @@ -3003,7 +3003,7 @@ }, "ansi-escapes": { "version": "4.3.1", - "resolved": "https://nexus.teamdlab.com/repository/npm/ansi-escapes/-/ansi-escapes-4.3.1.tgz", + "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.1.tgz", "integrity": "sha512-JWF7ocqNrp8u9oqpgV+wH5ftbt+cfvv+PTjOvKLT3AdYly/LmORARfEVT1iyjwN+4MqE5UmVKoAdIBqeoCHgLA==", "dev": true, "requires": { @@ -3033,7 +3033,7 @@ }, "anymatch": { "version": "3.1.1", - "resolved": "https://nexus.teamdlab.com/repository/npm/anymatch/-/anymatch-3.1.1.tgz", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.1.tgz", "integrity": "sha512-mM8522psRCqzV+6LhomX5wgp25YVibjh8Wj23I5RPkPppSVSjyKD2A2mBJmWGa+KN7f2D6LNh9jkBCeyLktzjg==", "dev": true, "requires": { @@ -3183,7 +3183,7 @@ "dependencies": { "bn.js": { "version": "4.11.9", - "resolved": "https://nexus.teamdlab.com/repository/npm/bn.js/-/bn.js-4.11.9.tgz", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.9.tgz", "integrity": "sha512-E6QoYqCKZfgatHTdHzs1RRKP7ip4vvm+EyRUeE2RF0NblwVvb0p6jSVeNTOFxPn26QXN2o6SMfNxKp6kU8zQaw==", "dev": true } @@ -3342,7 +3342,7 @@ }, "babel-plugin-dynamic-import-node": { "version": "2.3.3", - "resolved": "https://nexus.teamdlab.com/repository/npm/babel-plugin-dynamic-import-node/-/babel-plugin-dynamic-import-node-2.3.3.tgz", + "resolved": "https://registry.npmjs.org/babel-plugin-dynamic-import-node/-/babel-plugin-dynamic-import-node-2.3.3.tgz", "integrity": "sha512-jZVI+s9Zg3IqA/kdi0i6UDCybUI3aSBLnglhYbSSjKlV7yF1F/5LWv8MakQmvYpnbJDS6fcBL2KzHSxNCMtWSQ==", "dev": true, "requires": { @@ -3430,7 +3430,7 @@ }, "base64id": { "version": "2.0.0", - "resolved": "https://nexus.teamdlab.com/repository/npm/base64id/-/base64id-2.0.0.tgz", + "resolved": "https://registry.npmjs.org/base64id/-/base64id-2.0.0.tgz", "integrity": "sha512-lGe34o6EHj9y3Kts9R4ZYs/Gr+6N7MCaMlIFA3F1R2O5/m7K06AxfSeO5530PEERE6/WyEg3lsuyw4GHlPZHog==", "dev": true }, @@ -3673,7 +3673,7 @@ "dependencies": { "readable-stream": { "version": "3.6.0", - "resolved": "https://nexus.teamdlab.com/repository/npm/readable-stream/-/readable-stream-3.6.0.tgz", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", "dev": true, "requires": { @@ -3684,7 +3684,7 @@ }, "safe-buffer": { "version": "5.2.1", - "resolved": "https://nexus.teamdlab.com/repository/npm/safe-buffer/-/safe-buffer-5.2.1.tgz", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", "dev": true } @@ -3723,7 +3723,7 @@ }, "buffer": { "version": "4.9.2", - "resolved": "https://nexus.teamdlab.com/repository/npm/buffer/-/buffer-4.9.2.tgz", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-4.9.2.tgz", "integrity": "sha512-xq+q3SRMOxGivLhBNaUdC64hDTQwejJ+H0T/NB1XMtTVEwNTrfFF3gAxiyW0Bu/xWEGhjVKgUcMhCrUy2+uCWg==", "dev": true, "requires": { @@ -4017,7 +4017,7 @@ }, "circular-dependency-plugin": { "version": "5.2.0", - "resolved": "https://nexus.teamdlab.com/repository/npm/circular-dependency-plugin/-/circular-dependency-plugin-5.2.0.tgz", + "resolved": "https://registry.npmjs.org/circular-dependency-plugin/-/circular-dependency-plugin-5.2.0.tgz", "integrity": "sha512-7p4Kn/gffhQaavNfyDFg7LS5S/UT1JAjyGd4UqR2+jzoYF02eDkj0Ec3+48TsIa4zghjLY87nQHIh/ecK9qLdw==", "dev": true }, @@ -4274,7 +4274,7 @@ }, "compressible": { "version": "2.0.18", - "resolved": "https://nexus.teamdlab.com/repository/npm/compressible/-/compressible-2.0.18.tgz", + "resolved": "https://registry.npmjs.org/compressible/-/compressible-2.0.18.tgz", "integrity": "sha512-AF3r7P5dWxL8MxyITRMlORQNaOA2IkAFaTr4k7BUumjPtRpGDTZpl0Pb1XCO6JeDCBdp126Cgs9sMxqSjgYyRg==", "dev": true, "requires": { @@ -4368,7 +4368,7 @@ }, "console-browserify": { "version": "1.2.0", - "resolved": "https://nexus.teamdlab.com/repository/npm/console-browserify/-/console-browserify-1.2.0.tgz", + "resolved": "https://registry.npmjs.org/console-browserify/-/console-browserify-1.2.0.tgz", "integrity": "sha512-ZMkYO/LkF17QvCPqM0gxw8yUzigAOZOSWSHg91FH6orS7vcEj5dVZTidN2fQ14yBSdg97RqhSNwLUXInd52OTA==", "dev": true }, @@ -4401,7 +4401,7 @@ }, "convert-source-map": { "version": "1.7.0", - "resolved": "https://nexus.teamdlab.com/repository/npm/convert-source-map/-/convert-source-map-1.7.0.tgz", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.7.0.tgz", "integrity": "sha512-4FJkXzKXEDB1snCFZlLP4gpC3JILicCpGbzG9f9G7tGqGCzETQ2hWPrcinA9oU4wtf2biUaEH5065UnMeR33oA==", "dev": true, "requires": { @@ -4696,7 +4696,7 @@ "dependencies": { "bn.js": { "version": "4.11.9", - "resolved": "https://nexus.teamdlab.com/repository/npm/bn.js/-/bn.js-4.11.9.tgz", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.9.tgz", "integrity": "sha512-E6QoYqCKZfgatHTdHzs1RRKP7ip4vvm+EyRUeE2RF0NblwVvb0p6jSVeNTOFxPn26QXN2o6SMfNxKp6kU8zQaw==", "dev": true } @@ -5088,7 +5088,7 @@ }, "date-format": { "version": "3.0.0", - "resolved": "https://nexus.teamdlab.com/repository/npm/date-format/-/date-format-3.0.0.tgz", + "resolved": "https://registry.npmjs.org/date-format/-/date-format-3.0.0.tgz", "integrity": "sha512-eyTcpKOcamdhWJXj56DpQMo1ylSQpcGtGKXcU0Tb97+K56/CF5amAqqqNj0+KvA0iw2ynxtHWFsPDSClCxe48w==", "dev": true }, @@ -5121,7 +5121,7 @@ }, "deep-equal": { "version": "1.1.1", - "resolved": "https://nexus.teamdlab.com/repository/npm/deep-equal/-/deep-equal-1.1.1.tgz", + "resolved": "https://registry.npmjs.org/deep-equal/-/deep-equal-1.1.1.tgz", "integrity": "sha512-yd9c5AdiqVcR+JjcwUQb9DkhJc8ngNr0MahEBGvDiJw8puWab2yZlh+nkasOnZP+EGTAP6rRp2JzJhJZzvNF8g==", "dev": true, "requires": { @@ -5294,7 +5294,7 @@ }, "des.js": { "version": "1.0.1", - "resolved": "https://nexus.teamdlab.com/repository/npm/des.js/-/des.js-1.0.1.tgz", + "resolved": "https://registry.npmjs.org/des.js/-/des.js-1.0.1.tgz", "integrity": "sha512-Q0I4pfFrv2VPd34/vfLrFOoRmlYj3OV50i7fskps1jZWK1kApMWWT9G6RRUeYedLcBDIhnSDaUvJMb3AhUlaEA==", "dev": true, "requires": { @@ -5349,7 +5349,7 @@ "dependencies": { "bn.js": { "version": "4.11.9", - "resolved": "https://nexus.teamdlab.com/repository/npm/bn.js/-/bn.js-4.11.9.tgz", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.9.tgz", "integrity": "sha512-E6QoYqCKZfgatHTdHzs1RRKP7ip4vvm+EyRUeE2RF0NblwVvb0p6jSVeNTOFxPn26QXN2o6SMfNxKp6kU8zQaw==", "dev": true } @@ -5513,7 +5513,7 @@ "dependencies": { "bn.js": { "version": "4.11.9", - "resolved": "https://nexus.teamdlab.com/repository/npm/bn.js/-/bn.js-4.11.9.tgz", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.9.tgz", "integrity": "sha512-E6QoYqCKZfgatHTdHzs1RRKP7ip4vvm+EyRUeE2RF0NblwVvb0p6jSVeNTOFxPn26QXN2o6SMfNxKp6kU8zQaw==", "dev": true } @@ -5729,7 +5729,7 @@ }, "es-to-primitive": { "version": "1.2.1", - "resolved": "https://nexus.teamdlab.com/repository/npm/es-to-primitive/-/es-to-primitive-1.2.1.tgz", + "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.1.tgz", "integrity": "sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==", "dev": true, "requires": { @@ -6251,7 +6251,7 @@ }, "figures": { "version": "3.2.0", - "resolved": "https://nexus.teamdlab.com/repository/npm/figures/-/figures-3.2.0.tgz", + "resolved": "https://registry.npmjs.org/figures/-/figures-3.2.0.tgz", "integrity": "sha512-yaduQFRKLXYOGgEn6AZau90j3ggSOyiqXU0F9JZfeXYhNa+Jk4X+s45A2zg5jns87GAFa34BBm2kXw4XpNcbdg==", "dev": true, "requires": { @@ -6437,7 +6437,7 @@ }, "flatted": { "version": "2.0.2", - "resolved": "https://nexus.teamdlab.com/repository/npm/flatted/-/flatted-2.0.2.tgz", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-2.0.2.tgz", "integrity": "sha512-r5wGx7YeOwNWNlCA0wQ86zKyDLMQr+/RB8xy74M4hTphfmjlijTSSXGuH8rnvKZnfT9i+75zmd8jcKdMR4O6jA==", "dev": true }, @@ -6711,7 +6711,7 @@ }, "globals": { "version": "11.12.0", - "resolved": "https://nexus.teamdlab.com/repository/npm/globals/-/globals-11.12.0.tgz", + "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", "dev": true }, @@ -6758,7 +6758,7 @@ }, "handle-thing": { "version": "2.0.1", - "resolved": "https://nexus.teamdlab.com/repository/npm/handle-thing/-/handle-thing-2.0.1.tgz", + "resolved": "https://registry.npmjs.org/handle-thing/-/handle-thing-2.0.1.tgz", "integrity": "sha512-9Qn4yBxelxoh2Ow62nP+Ka/kMnOXRi8BXnRaUwezLNhqelnN49xKz4F/dPP8OYLxLxq6JDtZb2i9XznUQbNPTg==", "dev": true }, @@ -6827,7 +6827,7 @@ }, "has-symbols": { "version": "1.0.1", - "resolved": "https://nexus.teamdlab.com/repository/npm/has-symbols/-/has-symbols-1.0.1.tgz", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.1.tgz", "integrity": "sha512-PLcsoqu++dmEIZB+6totNFKq/7Do+Z0u4oT0zKOJNl3lYK6vGwwu2hjHs+68OEZbTjiUE9bgOABXbP/GvrS0Kg==", "dev": true }, @@ -6891,7 +6891,7 @@ }, "hash-base": { "version": "3.1.0", - "resolved": "https://nexus.teamdlab.com/repository/npm/hash-base/-/hash-base-3.1.0.tgz", + "resolved": "https://registry.npmjs.org/hash-base/-/hash-base-3.1.0.tgz", "integrity": "sha512-1nmYp/rhMDiE7AYkDw+lLwlAzz0AntGIe51F3RfFfEqyQ3feY2eI/NcwC6umIQVOASPMsWJLJScWKSSvzL9IVA==", "dev": true, "requires": { @@ -6902,7 +6902,7 @@ "dependencies": { "readable-stream": { "version": "3.6.0", - "resolved": "https://nexus.teamdlab.com/repository/npm/readable-stream/-/readable-stream-3.6.0.tgz", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", "dev": true, "requires": { @@ -6913,7 +6913,7 @@ }, "safe-buffer": { "version": "5.2.1", - "resolved": "https://nexus.teamdlab.com/repository/npm/safe-buffer/-/safe-buffer-5.2.1.tgz", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", "dev": true } @@ -7002,7 +7002,7 @@ }, "html-escaper": { "version": "2.0.2", - "resolved": "https://nexus.teamdlab.com/repository/npm/html-escaper/-/html-escaper-2.0.2.tgz", + "resolved": "https://registry.npmjs.org/html-escaper/-/html-escaper-2.0.2.tgz", "integrity": "sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==", "dev": true }, @@ -7041,7 +7041,7 @@ }, "http-proxy": { "version": "1.18.1", - "resolved": "https://nexus.teamdlab.com/repository/npm/http-proxy/-/http-proxy-1.18.1.tgz", + "resolved": "https://registry.npmjs.org/http-proxy/-/http-proxy-1.18.1.tgz", "integrity": "sha512-7mz/721AbnJwIVbnaSv1Cz3Am0ZLT/UBwkC92VlxhXv/k/BBQfM2fXElQNC27BVGr0uwUpplYPQM9LnaBMR5NQ==", "dev": true, "requires": { @@ -7279,7 +7279,7 @@ }, "ignore-walk": { "version": "3.0.3", - "resolved": "https://nexus.teamdlab.com/repository/npm/ignore-walk/-/ignore-walk-3.0.3.tgz", + "resolved": "https://registry.npmjs.org/ignore-walk/-/ignore-walk-3.0.3.tgz", "integrity": "sha512-m7o6xuOaT1aqheYHKf8W6J5pYH85ZI9w077erOzLje3JsB1gkafkAhHHY19dqjulgIZHFm32Cp5uNZgcQqdJKw==", "dev": true, "requires": { @@ -7865,7 +7865,7 @@ }, "is-binary-path": { "version": "2.1.0", - "resolved": "https://nexus.teamdlab.com/repository/npm/is-binary-path/-/is-binary-path-2.1.0.tgz", + "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", "dev": true, "requires": { @@ -8098,7 +8098,7 @@ }, "is-symbol": { "version": "1.0.3", - "resolved": "https://nexus.teamdlab.com/repository/npm/is-symbol/-/is-symbol-1.0.3.tgz", + "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.3.tgz", "integrity": "sha512-OwijhaRSgqvhm/0ZdAcXNZt9lYdKFpcRDT5ULUuYXPoT794UNOdU+gpT6Rzo7b4V2HUl/op6GqY894AZwv9faQ==", "dev": true, "requires": { @@ -8146,7 +8146,7 @@ }, "isbinaryfile": { "version": "4.0.6", - "resolved": "https://nexus.teamdlab.com/repository/npm/isbinaryfile/-/isbinaryfile-4.0.6.tgz", + "resolved": "https://registry.npmjs.org/isbinaryfile/-/isbinaryfile-4.0.6.tgz", "integrity": "sha512-ORrEy+SNVqUhrCaal4hA4fBzhggQQ+BaLntyPOdoEiwlKZW9BZiJXjg3RMiruE4tPEI3pyVPpySHQF/dKWperg==", "dev": true }, @@ -8170,13 +8170,13 @@ }, "istanbul-lib-coverage": { "version": "3.0.0", - "resolved": "https://nexus.teamdlab.com/repository/npm/istanbul-lib-coverage/-/istanbul-lib-coverage-3.0.0.tgz", + "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-3.0.0.tgz", "integrity": "sha512-UiUIqxMgRDET6eR+o5HbfRYP1l0hqkWOs7vNxC/mggutCMUIhWMm8gAHb8tHlyfD3/l6rlgNA5cKdDzEAf6hEg==", "dev": true }, "istanbul-lib-instrument": { "version": "4.0.3", - "resolved": "https://nexus.teamdlab.com/repository/npm/istanbul-lib-instrument/-/istanbul-lib-instrument-4.0.3.tgz", + "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-4.0.3.tgz", "integrity": "sha512-BXgQl9kf4WTCPCCpmFGoJkz/+uhvm7h7PFKUYxh7qarQd3ER33vHG//qaE8eN25l07YqZPpHXU9I09l/RD5aGQ==", "dev": true, "requires": { @@ -8372,7 +8372,7 @@ }, "jsesc": { "version": "2.5.2", - "resolved": "https://nexus.teamdlab.com/repository/npm/jsesc/-/jsesc-2.5.2.tgz", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz", "integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==", "dev": true }, @@ -8825,13 +8825,13 @@ }, "leven": { "version": "3.1.0", - "resolved": "https://nexus.teamdlab.com/repository/npm/leven/-/leven-3.1.0.tgz", + "resolved": "https://registry.npmjs.org/leven/-/leven-3.1.0.tgz", "integrity": "sha512-qsda+H8jTaUaN/x5vzW2rzc+8Rw4TAQ/4KjB46IwK5VH+IlVeeeje/EoZRpiXvIqjFgK84QffqPztGI3VBLG1A==", "dev": true }, "levenary": { "version": "1.1.1", - "resolved": "https://nexus.teamdlab.com/repository/npm/levenary/-/levenary-1.1.1.tgz", + "resolved": "https://registry.npmjs.org/levenary/-/levenary-1.1.1.tgz", "integrity": "sha512-mkAdOIt79FD6irqjYSs4rdbnlT5vRonMEvBVPVb3XmevfS8kgRXwfes0dhPdEtzTWD/1eNE/Bm/G1iRt6DcnQQ==", "dev": true, "requires": { @@ -8859,7 +8859,7 @@ }, "lines-and-columns": { "version": "1.1.6", - "resolved": "https://nexus.teamdlab.com/repository/npm/lines-and-columns/-/lines-and-columns-1.1.6.tgz", + "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.1.6.tgz", "integrity": "sha1-HADHQ7QzzQpOgHWPe2SldEDZ/wA=", "dev": true }, @@ -9032,7 +9032,7 @@ }, "log4js": { "version": "6.3.0", - "resolved": "https://nexus.teamdlab.com/repository/npm/log4js/-/log4js-6.3.0.tgz", + "resolved": "https://registry.npmjs.org/log4js/-/log4js-6.3.0.tgz", "integrity": "sha512-Mc8jNuSFImQUIateBFwdOQcmC6Q5maU0VVvdC2R6XMb66/VnT+7WS4D/0EeNMZu1YODmJe5NIn2XftCzEocUgw==", "dev": true, "requires": { @@ -9112,7 +9112,7 @@ }, "make-fetch-happen": { "version": "5.0.2", - "resolved": "https://nexus.teamdlab.com/repository/npm/make-fetch-happen/-/make-fetch-happen-5.0.2.tgz", + "resolved": "https://registry.npmjs.org/make-fetch-happen/-/make-fetch-happen-5.0.2.tgz", "integrity": "sha512-07JHC0r1ykIoruKO8ifMXu+xEU8qOXDFETylktdug6vJDACnP+HKevOu3PXyNPzFyTSlz8vrBYlBO1JZRe8Cag==", "dev": true, "requires": { @@ -9349,7 +9349,7 @@ }, "merge-source-map": { "version": "1.1.0", - "resolved": "https://nexus.teamdlab.com/repository/npm/merge-source-map/-/merge-source-map-1.1.0.tgz", + "resolved": "https://registry.npmjs.org/merge-source-map/-/merge-source-map-1.1.0.tgz", "integrity": "sha512-Qkcp7P2ygktpMPh2mCQZaf3jhN6D3Z/qVZHSdWvQ+2Ef5HgRAPBO57A77+ENm0CPx2+1Ce/MYKi3ymqdfuqibw==", "dev": true, "requires": { @@ -9358,7 +9358,7 @@ }, "merge-stream": { "version": "2.0.0", - "resolved": "https://nexus.teamdlab.com/repository/npm/merge-stream/-/merge-stream-2.0.0.tgz", + "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==", "dev": true }, @@ -9396,7 +9396,7 @@ "dependencies": { "bn.js": { "version": "4.11.9", - "resolved": "https://nexus.teamdlab.com/repository/npm/bn.js/-/bn.js-4.11.9.tgz", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.9.tgz", "integrity": "sha512-E6QoYqCKZfgatHTdHzs1RRKP7ip4vvm+EyRUeE2RF0NblwVvb0p6jSVeNTOFxPn26QXN2o6SMfNxKp6kU8zQaw==", "dev": true } @@ -9839,7 +9839,7 @@ }, "node-fetch-npm": { "version": "2.0.4", - "resolved": "https://nexus.teamdlab.com/repository/npm/node-fetch-npm/-/node-fetch-npm-2.0.4.tgz", + "resolved": "https://registry.npmjs.org/node-fetch-npm/-/node-fetch-npm-2.0.4.tgz", "integrity": "sha512-iOuIQDWDyjhv9qSDrj9aq/klt6F9z1p2otB3AV7v3zBDcL/x+OfGsvGQZZCcMZbUf4Ujw1xGNQkjvGnVT22cKg==", "dev": true, "requires": { @@ -10095,7 +10095,7 @@ }, "npm-bundled": { "version": "1.1.1", - "resolved": "https://nexus.teamdlab.com/repository/npm/npm-bundled/-/npm-bundled-1.1.1.tgz", + "resolved": "https://registry.npmjs.org/npm-bundled/-/npm-bundled-1.1.1.tgz", "integrity": "sha512-gqkfgGePhTpAEgUsGEgcq1rqPXA+tv/aVBlgEzfXwA1yiUJF7xtEt3CtVwOjNYQOVknDk0F20w58Fnm3EtG0fA==", "dev": true, "requires": { @@ -10113,7 +10113,7 @@ }, "npm-normalize-package-bin": { "version": "1.0.1", - "resolved": "https://nexus.teamdlab.com/repository/npm/npm-normalize-package-bin/-/npm-normalize-package-bin-1.0.1.tgz", + "resolved": "https://registry.npmjs.org/npm-normalize-package-bin/-/npm-normalize-package-bin-1.0.1.tgz", "integrity": "sha512-EPfafl6JL5/rU+ot6P3gRSCpPDW5VmIzX959Ob1+ySFUuuYHWHekXpwdUZcKP5C+DS4GEtdJluwBjnsNDl+fSA==", "dev": true }, @@ -10141,7 +10141,7 @@ }, "npm-packlist": { "version": "1.4.8", - "resolved": "https://nexus.teamdlab.com/repository/npm/npm-packlist/-/npm-packlist-1.4.8.tgz", + "resolved": "https://registry.npmjs.org/npm-packlist/-/npm-packlist-1.4.8.tgz", "integrity": "sha512-5+AZgwru5IevF5ZdnFglB5wNlHG1AOOuw28WhUq8/8emhBmLv6jX5by4WJCh7lW0uSYZYS6DXqIsyZVIXRZU9A==", "dev": true, "requires": { @@ -10199,7 +10199,7 @@ }, "safe-buffer": { "version": "5.2.1", - "resolved": "https://nexus.teamdlab.com/repository/npm/safe-buffer/-/safe-buffer-5.2.1.tgz", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", "dev": true }, @@ -10638,7 +10638,7 @@ }, "p-retry": { "version": "3.0.1", - "resolved": "https://nexus.teamdlab.com/repository/npm/p-retry/-/p-retry-3.0.1.tgz", + "resolved": "https://registry.npmjs.org/p-retry/-/p-retry-3.0.1.tgz", "integrity": "sha512-XE6G4+YTTkT2a0UWb2kjZe8xNwf8bIbnqpc/IS/idOBVhyves0mK5OJgeocjx7q5pvX/6m23xuzVPYT1uGM73w==", "dev": true, "requires": { @@ -10976,7 +10976,7 @@ }, "picomatch": { "version": "2.2.2", - "resolved": "https://nexus.teamdlab.com/repository/npm/picomatch/-/picomatch-2.2.2.tgz", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.2.2.tgz", "integrity": "sha512-q0M/9eZHzmr0AulXyPwNfZjtwZ/RBZlbN3K3CErVrk50T2ASYI7Bye0EvekFY3IP1Nt2DHu0re+V2ZHIpMkuWg==", "dev": true }, @@ -11175,7 +11175,7 @@ "dependencies": { "postcss-value-parser": { "version": "3.3.1", - "resolved": "https://nexus.teamdlab.com/repository/npm/postcss-value-parser/-/postcss-value-parser-3.3.1.tgz", + "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-3.3.1.tgz", "integrity": "sha512-pISE66AbVkp4fDQ7VHBwRNXzAAKJjw4Vw7nWI/+Q3vuly7SNfgYXvm6i5IgFylHGK5sP/xHAbB7N49OS4gWNyQ==", "dev": true } @@ -11669,13 +11669,13 @@ }, "postcss-value-parser": { "version": "4.1.0", - "resolved": "https://nexus.teamdlab.com/repository/npm/postcss-value-parser/-/postcss-value-parser-4.1.0.tgz", + "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-4.1.0.tgz", "integrity": "sha512-97DXOFbQJhk71ne5/Mt6cOu6yxsSfM0QGQyl0L25Gca4yGWEGJaig7l7gbCX623VqTBNGLRLaVUCnNkcedlRSQ==", "dev": true }, "prepend-http": { "version": "1.0.4", - "resolved": "https://nexus.teamdlab.com/repository/npm/prepend-http/-/prepend-http-1.0.4.tgz", + "resolved": "https://registry.npmjs.org/prepend-http/-/prepend-http-1.0.4.tgz", "integrity": "sha1-1PRWKwzjaW5BrFLQ4ALlemNdxtw=", "dev": true }, @@ -12109,7 +12109,7 @@ "dependencies": { "bn.js": { "version": "4.11.9", - "resolved": "https://nexus.teamdlab.com/repository/npm/bn.js/-/bn.js-4.11.9.tgz", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.9.tgz", "integrity": "sha512-E6QoYqCKZfgatHTdHzs1RRKP7ip4vvm+EyRUeE2RF0NblwVvb0p6jSVeNTOFxPn26QXN2o6SMfNxKp6kU8zQaw==", "dev": true } @@ -12198,7 +12198,7 @@ }, "query-string": { "version": "4.3.4", - "resolved": "https://nexus.teamdlab.com/repository/npm/query-string/-/query-string-4.3.4.tgz", + "resolved": "https://registry.npmjs.org/query-string/-/query-string-4.3.4.tgz", "integrity": "sha1-u7aTucqRXCMlFbIosaArYJBD2+s=", "dev": true, "requires": { @@ -12381,7 +12381,7 @@ }, "read-pkg-up": { "version": "5.0.0", - "resolved": "https://nexus.teamdlab.com/repository/npm/read-pkg-up/-/read-pkg-up-5.0.0.tgz", + "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-5.0.0.tgz", "integrity": "sha512-XBQjqOBtTzyol2CpsQOw8LHV0XbDZVG7xMMjmXAJomlVY03WOBRmYgDJETlvcg0H63AJvPRwT7GFi5rvOzUOKg==", "dev": true, "requires": { @@ -12460,7 +12460,7 @@ }, "regenerate-unicode-properties": { "version": "8.2.0", - "resolved": "https://nexus.teamdlab.com/repository/npm/regenerate-unicode-properties/-/regenerate-unicode-properties-8.2.0.tgz", + "resolved": "https://registry.npmjs.org/regenerate-unicode-properties/-/regenerate-unicode-properties-8.2.0.tgz", "integrity": "sha512-F9DjY1vKLo/tPePDycuH3dn9H1OTPIkVD9Kz4LODu+F2C75mgjAJ7x/gwy6ZcSNRAAkhNlJSOHRe8k3p+K9WhA==", "dev": true, "requires": { @@ -12524,7 +12524,7 @@ }, "regjsgen": { "version": "0.5.2", - "resolved": "https://nexus.teamdlab.com/repository/npm/regjsgen/-/regjsgen-0.5.2.tgz", + "resolved": "https://registry.npmjs.org/regjsgen/-/regjsgen-0.5.2.tgz", "integrity": "sha512-OFFT3MfrH90xIW8OOSyUrk6QHD5E9JOTeGodiJeBS3J6IwlgzJMNE/1bZklWz5oTg+9dCMyEetclvCVXOPoN3A==", "dev": true }, @@ -12816,7 +12816,7 @@ }, "run-async": { "version": "2.4.1", - "resolved": "https://nexus.teamdlab.com/repository/npm/run-async/-/run-async-2.4.1.tgz", + "resolved": "https://registry.npmjs.org/run-async/-/run-async-2.4.1.tgz", "integrity": "sha512-tvVnVv01b8c1RrA6Ep7JkStj85Guv/YrMcwqYQnwjsAS2cTmmPGBBjAjpCW7RrSodNSoE2/qg9O4bceNvUuDgQ==", "dev": true }, @@ -13292,7 +13292,7 @@ }, "smart-buffer": { "version": "4.1.0", - "resolved": "https://nexus.teamdlab.com/repository/npm/smart-buffer/-/smart-buffer-4.1.0.tgz", + "resolved": "https://registry.npmjs.org/smart-buffer/-/smart-buffer-4.1.0.tgz", "integrity": "sha512-iVICrxOzCynf/SNaBQCw34eM9jROU/s5rzIhpOvzhzuYHfJR/DhZfDkXiZSgKXfgv26HT3Yni3AV/DGw0cGnnw==", "dev": true }, @@ -13451,7 +13451,7 @@ }, "socket.io-adapter": { "version": "1.1.2", - "resolved": "https://nexus.teamdlab.com/repository/npm/socket.io-adapter/-/socket.io-adapter-1.1.2.tgz", + "resolved": "https://registry.npmjs.org/socket.io-adapter/-/socket.io-adapter-1.1.2.tgz", "integrity": "sha512-WzZRUj1kUjrTIrUKpZLEzFZ1OLj5FwLlAFQs9kuZJzJi5DKdU7FsWc36SNmA8iDOtwBQyT8FkrriRM8vXLYz8g==", "dev": true }, @@ -13510,7 +13510,7 @@ }, "socket.io-parser": { "version": "3.4.1", - "resolved": "https://nexus.teamdlab.com/repository/npm/socket.io-parser/-/socket.io-parser-3.4.1.tgz", + "resolved": "https://registry.npmjs.org/socket.io-parser/-/socket.io-parser-3.4.1.tgz", "integrity": "sha512-11hMgzL+WCLWf1uFtHSNvliI++tcRUWdoeYuwIl+Axvwy9z2gQM+7nJyN3STj1tLj5JyIUH8/gpDGxzAlDdi0A==", "dev": true, "requires": { @@ -13527,7 +13527,7 @@ }, "debug": { "version": "4.1.1", - "resolved": "https://nexus.teamdlab.com/repository/npm/debug/-/debug-4.1.1.tgz", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", "dev": true, "requires": { @@ -13555,7 +13555,7 @@ }, "sockjs-client": { "version": "1.4.0", - "resolved": "https://nexus.teamdlab.com/repository/npm/sockjs-client/-/sockjs-client-1.4.0.tgz", + "resolved": "https://registry.npmjs.org/sockjs-client/-/sockjs-client-1.4.0.tgz", "integrity": "sha512-5zaLyO8/nri5cua0VtOrFXBPK1jbL4+1cebT/mmKA1E1ZXOvJrII75bPu0l0k843G/+iAbhEqzyKr0w/eCCj7g==", "dev": true, "requires": { @@ -13589,7 +13589,7 @@ }, "socks": { "version": "2.3.3", - "resolved": "https://nexus.teamdlab.com/repository/npm/socks/-/socks-2.3.3.tgz", + "resolved": "https://registry.npmjs.org/socks/-/socks-2.3.3.tgz", "integrity": "sha512-o5t52PCNtVdiOvzMry7wU4aOqYWL0PeCXRWBEiJow4/i/wr+wpsJQ9awEu1EonLIqsfGd5qSgDdxEOvCdmBEpA==", "dev": true, "requires": { @@ -13620,7 +13620,7 @@ }, "sort-keys": { "version": "1.1.2", - "resolved": "https://nexus.teamdlab.com/repository/npm/sort-keys/-/sort-keys-1.1.2.tgz", + "resolved": "https://registry.npmjs.org/sort-keys/-/sort-keys-1.1.2.tgz", "integrity": "sha1-RBttTTRnmPG05J6JIK37oOVD+a0=", "dev": true, "requires": { @@ -13758,7 +13758,7 @@ }, "spdy": { "version": "4.0.2", - "resolved": "https://nexus.teamdlab.com/repository/npm/spdy/-/spdy-4.0.2.tgz", + "resolved": "https://registry.npmjs.org/spdy/-/spdy-4.0.2.tgz", "integrity": "sha512-r46gZQZQV+Kl9oItvl1JZZqJKGr+oEkB08A6BzkiR7593/7IbtuncXHd2YoYeTsG4157ZssMu9KYvUHLcjcDoA==", "dev": true, "requires": { @@ -13785,7 +13785,7 @@ "dependencies": { "readable-stream": { "version": "3.6.0", - "resolved": "https://nexus.teamdlab.com/repository/npm/readable-stream/-/readable-stream-3.6.0.tgz", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", "dev": true, "requires": { @@ -13929,7 +13929,7 @@ }, "streamroller": { "version": "2.2.4", - "resolved": "https://nexus.teamdlab.com/repository/npm/streamroller/-/streamroller-2.2.4.tgz", + "resolved": "https://registry.npmjs.org/streamroller/-/streamroller-2.2.4.tgz", "integrity": "sha512-OG79qm3AujAM9ImoqgWEY1xG4HX+Lw+yY6qZj9R1K2mhF5bEmQ849wvrb+4vt4jLMLzwXttJlQbOdPOQVRv7DQ==", "dev": true, "requires": { @@ -13940,13 +13940,13 @@ "dependencies": { "date-format": { "version": "2.1.0", - "resolved": "https://nexus.teamdlab.com/repository/npm/date-format/-/date-format-2.1.0.tgz", + "resolved": "https://registry.npmjs.org/date-format/-/date-format-2.1.0.tgz", "integrity": "sha512-bYQuGLeFxhkxNOF3rcMtiZxvCBAquGzZm6oWA1oZ0g2THUzivaRhv8uOhdr19LmoobSOLoIAxeUK2RdbM8IFTA==", "dev": true }, "fs-extra": { "version": "8.1.0", - "resolved": "https://nexus.teamdlab.com/repository/npm/fs-extra/-/fs-extra-8.1.0.tgz", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-8.1.0.tgz", "integrity": "sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==", "dev": true, "requires": { @@ -14303,7 +14303,7 @@ }, "thunky": { "version": "1.1.0", - "resolved": "https://nexus.teamdlab.com/repository/npm/thunky/-/thunky-1.1.0.tgz", + "resolved": "https://registry.npmjs.org/thunky/-/thunky-1.1.0.tgz", "integrity": "sha512-eHY7nBftgThBqOyHGVN+l8gF0BucP09fMo0oO/Lb0w1OF80dJv+lDVpXG60WMQvkcxAkNybKsrEIE3ZtKGmPrA==", "dev": true }, @@ -14345,7 +14345,7 @@ }, "to-fast-properties": { "version": "2.0.0", - "resolved": "https://nexus.teamdlab.com/repository/npm/to-fast-properties/-/to-fast-properties-2.0.0.tgz", + "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", "integrity": "sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4=", "dev": true }, @@ -14423,7 +14423,7 @@ }, "tree-kill": { "version": "1.2.2", - "resolved": "https://nexus.teamdlab.com/repository/npm/tree-kill/-/tree-kill-1.2.2.tgz", + "resolved": "https://registry.npmjs.org/tree-kill/-/tree-kill-1.2.2.tgz", "integrity": "sha512-L0Orpi8qGpRG//Nd+H90vFB+3iHnue1zSSGmNOOCh1GLJ7rUKVwV2HvijphGQS2UmhUZewS9VgvxYIdgr+fG1A==", "dev": true }, @@ -14568,7 +14568,7 @@ }, "type-fest": { "version": "0.11.0", - "resolved": "https://nexus.teamdlab.com/repository/npm/type-fest/-/type-fest-0.11.0.tgz", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.11.0.tgz", "integrity": "sha512-OdjXJxnCN1AvyLSzeKIgXTXxV+99ZuXl3Hpo9XpJAv9MBcHrrJOQ5kV7ypXOuQie+AmWG25hLbiKdwYTifzcfQ==", "dev": true }, @@ -14608,13 +14608,13 @@ }, "unicode-canonical-property-names-ecmascript": { "version": "1.0.4", - "resolved": "https://nexus.teamdlab.com/repository/npm/unicode-canonical-property-names-ecmascript/-/unicode-canonical-property-names-ecmascript-1.0.4.tgz", + "resolved": "https://registry.npmjs.org/unicode-canonical-property-names-ecmascript/-/unicode-canonical-property-names-ecmascript-1.0.4.tgz", "integrity": "sha512-jDrNnXWHd4oHiTZnx/ZG7gtUTVp+gCcTTKr8L0HjlwphROEW3+Him+IpvC+xcJEFegapiMZyZe02CyuOnRmbnQ==", "dev": true }, "unicode-match-property-ecmascript": { "version": "1.0.4", - "resolved": "https://nexus.teamdlab.com/repository/npm/unicode-match-property-ecmascript/-/unicode-match-property-ecmascript-1.0.4.tgz", + "resolved": "https://registry.npmjs.org/unicode-match-property-ecmascript/-/unicode-match-property-ecmascript-1.0.4.tgz", "integrity": "sha512-L4Qoh15vTfntsn4P1zqnHulG0LdXgjSO035fEpdtp6YxXhMT51Q6vgM5lYdG/5X3MjS+k/Y9Xw4SFCY9IkR0rg==", "dev": true, "requires": { @@ -14624,13 +14624,13 @@ }, "unicode-match-property-value-ecmascript": { "version": "1.2.0", - "resolved": "https://nexus.teamdlab.com/repository/npm/unicode-match-property-value-ecmascript/-/unicode-match-property-value-ecmascript-1.2.0.tgz", + "resolved": "https://registry.npmjs.org/unicode-match-property-value-ecmascript/-/unicode-match-property-value-ecmascript-1.2.0.tgz", "integrity": "sha512-wjuQHGQVofmSJv1uVISKLE5zO2rNGzM/KCYZch/QQvez7C1hUhBIuZ701fYXExuufJFMPhv2SyL8CyoIfMLbIQ==", "dev": true }, "unicode-property-aliases-ecmascript": { "version": "1.1.0", - "resolved": "https://nexus.teamdlab.com/repository/npm/unicode-property-aliases-ecmascript/-/unicode-property-aliases-ecmascript-1.1.0.tgz", + "resolved": "https://registry.npmjs.org/unicode-property-aliases-ecmascript/-/unicode-property-aliases-ecmascript-1.1.0.tgz", "integrity": "sha512-PqSoPh/pWetQ2phoj5RLiaqIk4kCNwoV3CI+LfGmWLKI3rE3kl1h59XpX2BjgDrmbxD9ARtQobPGU1SguCYuQg==", "dev": true }, @@ -14969,7 +14969,7 @@ }, "vm-browserify": { "version": "1.1.2", - "resolved": "https://nexus.teamdlab.com/repository/npm/vm-browserify/-/vm-browserify-1.1.2.tgz", + "resolved": "https://registry.npmjs.org/vm-browserify/-/vm-browserify-1.1.2.tgz", "integrity": "sha512-2ham8XPWTONajOR0ohOKOHXkm3+gaBmGut3SRuu75xLd/RRaY6vqgh8NBYYk7+RW3u5AtzPQZG8F10LHkl0lAQ==", "dev": true }, @@ -15546,7 +15546,7 @@ }, "webpack-dev-middleware": { "version": "3.7.2", - "resolved": "https://nexus.teamdlab.com/repository/npm/webpack-dev-middleware/-/webpack-dev-middleware-3.7.2.tgz", + "resolved": "https://registry.npmjs.org/webpack-dev-middleware/-/webpack-dev-middleware-3.7.2.tgz", "integrity": "sha512-1xC42LxbYoqLNAhV6YzTYacicgMZQTqRd27Sim9wn5hJrX3I5nxYy1SxSd4+gjUFsz1dQFj+yEe6zEVmSkeJjw==", "dev": true, "requires": { @@ -15618,7 +15618,7 @@ "dependencies": { "anymatch": { "version": "2.0.0", - "resolved": "https://nexus.teamdlab.com/repository/npm/anymatch/-/anymatch-2.0.0.tgz", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-2.0.0.tgz", "integrity": "sha512-5teOsQWABXHHBFP9y3skS5P3d/WfWXpv3FUpy+LorMrNYaT9pI4oLMQX7jzQ2KklNpGpWHzdCXTDT2Y3XGlZBw==", "dev": true, "requires": { @@ -15628,7 +15628,7 @@ "dependencies": { "normalize-path": { "version": "2.1.1", - "resolved": "https://nexus.teamdlab.com/repository/npm/normalize-path/-/normalize-path-2.1.1.tgz", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-2.1.1.tgz", "integrity": "sha1-GrKLVW4Zg2Oowab35vogE3/mrtk=", "dev": true, "requires": { @@ -15639,7 +15639,7 @@ }, "binary-extensions": { "version": "1.13.1", - "resolved": "https://nexus.teamdlab.com/repository/npm/binary-extensions/-/binary-extensions-1.13.1.tgz", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-1.13.1.tgz", "integrity": "sha512-Un7MIEDdUC5gNpcGDV97op1Ywk748MpHcFTHoYs6qnj1Z3j7I53VG3nwZhKzoBZmbdRNnb6WRdFlwl7tSDuZGw==", "dev": true }, @@ -15674,7 +15674,7 @@ }, "chokidar": { "version": "2.1.8", - "resolved": "https://nexus.teamdlab.com/repository/npm/chokidar/-/chokidar-2.1.8.tgz", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-2.1.8.tgz", "integrity": "sha512-ZmZUazfOzf0Nve7duiCKD23PFSCs4JPoYyccjUFF3aQkQadqBhfzhjkwBH2mNOG9cTBwhamM37EIsIkZw3nRgg==", "dev": true, "requires": { @@ -15754,7 +15754,7 @@ }, "is-binary-path": { "version": "1.0.1", - "resolved": "https://nexus.teamdlab.com/repository/npm/is-binary-path/-/is-binary-path-1.0.1.tgz", + "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-1.0.1.tgz", "integrity": "sha1-dfFmQrSA8YenEcgUFh/TpKdlWJg=", "dev": true, "requires": { @@ -15804,7 +15804,7 @@ }, "readdirp": { "version": "2.2.1", - "resolved": "https://nexus.teamdlab.com/repository/npm/readdirp/-/readdirp-2.2.1.tgz", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-2.2.1.tgz", "integrity": "sha512-1JU/8q+VgFZyxwrJ+SVIOsh+KywWGpds3NTqikiKpDMZWScmAYyKIgqkO+ARvNWJfXeXR1zxz7aHF4u4CyH6vQ==", "dev": true, "requires": { @@ -15872,7 +15872,7 @@ }, "webpack-sources": { "version": "1.4.3", - "resolved": "https://nexus.teamdlab.com/repository/npm/webpack-sources/-/webpack-sources-1.4.3.tgz", + "resolved": "https://registry.npmjs.org/webpack-sources/-/webpack-sources-1.4.3.tgz", "integrity": "sha512-lgTS3Xhv1lCOKo7SA5TjKXMjpSM4sBjNV5+q2bqesbSPs5FjGmU6jjtBSkX9b4qW87vDIsCIlUPOEhbZrMdjeQ==", "dev": true, "requires": { diff --git a/ui/ui-frontend-common/src/app/modules/application.service.ts b/ui/ui-frontend-common/src/app/modules/application.service.ts index a71866f67..493a74a9c 100644 --- a/ui/ui-frontend-common/src/app/modules/application.service.ts +++ b/ui/ui-frontend-common/src/app/modules/application.service.ts @@ -214,7 +214,7 @@ export class ApplicationService { private fillCategoriesWithApps(categoriesByIds: { [categoryId: string]: Category }, applications: Application[]) { const resultMap = new Map<Category, Application[]>(); - let categories: Category[] = Object.values(categoriesByIds); + const categories: Category[] = Object.values(categoriesByIds); categories.sort((a, b) => { return a.order > b.order ? 1 : -1; }); @@ -228,7 +228,8 @@ export class ApplicationService { return resultMap; } - private getLastUsedApps(categoriesByIds: { [categoryId: string]: Category }, applications: Application[], max = 8): { category: Category, apps: Application[] } { + private getLastUsedApps(categoriesByIds: { [categoryId: string]: Category }, + applications: Application[], max = 8): { category: Category, apps: Application[] } { let dataSource: ApplicationAnalytics[]; if (this.applicationsAnalytics) { dataSource = this.applicationsAnalytics; diff --git a/ui/ui-frontend-common/src/app/modules/components/application-select-content/application-select-content.component.spec.ts b/ui/ui-frontend-common/src/app/modules/components/application-select-content/application-select-content.component.spec.ts index b13038bfe..c78b23cfa 100644 --- a/ui/ui-frontend-common/src/app/modules/components/application-select-content/application-select-content.component.spec.ts +++ b/ui/ui-frontend-common/src/app/modules/components/application-select-content/application-select-content.component.spec.ts @@ -35,7 +35,7 @@ * knowledge of the CeCILL-C license and that you accept its terms. */ import { Component, Input } from '@angular/core'; -import { waitForAsync, ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; +import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; import { AuthService } from '../../auth.service'; import { WINDOW_LOCATION } from '../../injection-tokens'; diff --git a/ui/ui-frontend-common/src/app/modules/components/confirm-dialog/confirm-dialog.component.spec.ts b/ui/ui-frontend-common/src/app/modules/components/confirm-dialog/confirm-dialog.component.spec.ts index 8416a8e92..3da91c412 100644 --- a/ui/ui-frontend-common/src/app/modules/components/confirm-dialog/confirm-dialog.component.spec.ts +++ b/ui/ui-frontend-common/src/app/modules/components/confirm-dialog/confirm-dialog.component.spec.ts @@ -34,7 +34,7 @@ * The fact that you are presently reading this means that you have had * knowledge of the CeCILL-C license and that you accept its terms. */ -import { waitForAsync, ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; +import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; import { MatDialogModule } from '@angular/material/dialog'; import { ConfirmDialogComponent } from './confirm-dialog.component'; diff --git a/ui/ui-frontend-common/src/app/modules/components/country/country.component.spec.ts b/ui/ui-frontend-common/src/app/modules/components/country/country.component.spec.ts index 83c3418b5..e2f2a5524 100644 --- a/ui/ui-frontend-common/src/app/modules/components/country/country.component.spec.ts +++ b/ui/ui-frontend-common/src/app/modules/components/country/country.component.spec.ts @@ -34,7 +34,7 @@ * The fact that you are presently reading this means that you have had * knowledge of the CeCILL-C license and that you accept its terms. */ -import { waitForAsync, ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; +import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; import { CountryComponent } from './country.component'; diff --git a/ui/ui-frontend-common/src/app/modules/components/customer-select-content/customer-select-content.component.spec.ts b/ui/ui-frontend-common/src/app/modules/components/customer-select-content/customer-select-content.component.spec.ts index 6b0920978..48c27b92f 100644 --- a/ui/ui-frontend-common/src/app/modules/components/customer-select-content/customer-select-content.component.spec.ts +++ b/ui/ui-frontend-common/src/app/modules/components/customer-select-content/customer-select-content.component.spec.ts @@ -34,7 +34,7 @@ * The fact that you are presently reading this means that you have had * knowledge of the CeCILL-C license and that you accept its terms. */ -import { waitForAsync, ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; +import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; import { ActivatedRoute, Router } from '@angular/router'; import { CustomerSelectContentComponent } from './customer-select-content.component'; diff --git a/ui/ui-frontend-common/src/app/modules/components/navbar/common-menu/common-menu.component.ts b/ui/ui-frontend-common/src/app/modules/components/navbar/common-menu/common-menu.component.ts index 8b201a933..19e29f1a3 100644 --- a/ui/ui-frontend-common/src/app/modules/components/navbar/common-menu/common-menu.component.ts +++ b/ui/ui-frontend-common/src/app/modules/components/navbar/common-menu/common-menu.component.ts @@ -38,9 +38,9 @@ import { Component, Inject, OnInit } from '@angular/core'; import { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog'; import { Application } from '../../../models/application/application.interface'; +import {Category} from '../../../models/application/category.interface'; import { MenuOption } from '../customer-menu/menu-option.interface'; import { MenuType } from '../menu-type.enum'; -import {Category} from "../../../models/application/category.interface"; interface ModalData { menuType: MenuType; diff --git a/ui/ui-frontend-common/src/app/modules/components/role-toggle/role-toggle.component.spec.ts b/ui/ui-frontend-common/src/app/modules/components/role-toggle/role-toggle.component.spec.ts index 0a6ed1557..67fca0bf3 100644 --- a/ui/ui-frontend-common/src/app/modules/components/role-toggle/role-toggle.component.spec.ts +++ b/ui/ui-frontend-common/src/app/modules/components/role-toggle/role-toggle.component.spec.ts @@ -38,7 +38,7 @@ import { HttpClientTestingModule } from '@angular/common/http/testing'; import { Component } from '@angular/core'; -import { waitForAsync, ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; +import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; import { FormsModule } from '@angular/forms'; import { By } from '@angular/platform-browser'; import { TranslateModule } from '@ngx-translate/core'; diff --git a/ui/ui-frontend-common/src/app/modules/components/table-filter/table-filter-search.component.spec.ts b/ui/ui-frontend-common/src/app/modules/components/table-filter/table-filter-search.component.spec.ts index aaf32bb81..a845c75bf 100644 --- a/ui/ui-frontend-common/src/app/modules/components/table-filter/table-filter-search.component.spec.ts +++ b/ui/ui-frontend-common/src/app/modules/components/table-filter/table-filter-search.component.spec.ts @@ -36,7 +36,7 @@ */ // tslint:disable:no-magic-numbers import { Component } from '@angular/core'; -import { waitForAsync, ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; +import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; import { FormsModule } from '@angular/forms'; import { MatPseudoCheckboxModule } from '@angular/material/core'; import { By } from '@angular/platform-browser'; diff --git a/ui/ui-frontend/package.json b/ui/ui-frontend/package.json index f107841ee..4417f4cff 100644 --- a/ui/ui-frontend/package.json +++ b/ui/ui-frontend/package.json @@ -46,6 +46,8 @@ "lint:identity": "ng lint identity --format=stylish", "lint:ingest": "ng lint ingest --format=stylish", "lint:portal": "ng lint portal --format=stylish", + "lint:referential": "ng lint referential --format=stylish", + "lint:vitamui-library": "ng lint vitamui-library --format=stylish", "e2e": "ng e2e", "i18n-extract": "ng xi18n --outputPath=locale --i18n-locale=fr", "i18n-merge": "xliffmerge --profile xliffmerge.json fr en", diff --git a/ui/ui-frontend/projects/identity/src/app/core/api/customer-api.service.spec.ts b/ui/ui-frontend/projects/identity/src/app/core/api/customer-api.service.spec.ts index 65dacb011..a2776c3b2 100644 --- a/ui/ui-frontend/projects/identity/src/app/core/api/customer-api.service.spec.ts +++ b/ui/ui-frontend/projects/identity/src/app/core/api/customer-api.service.spec.ts @@ -56,7 +56,7 @@ describe('CustomerApiService', () => { })); it('should be created', () => { - const service: CustomerApiService = TestBed.get(CustomerApiService); + const service: CustomerApiService = TestBed.inject(CustomerApiService); expect(service).toBeTruthy(); }); }); diff --git a/ui/ui-frontend/projects/identity/src/app/core/api/group-api.service.spec.ts b/ui/ui-frontend/projects/identity/src/app/core/api/group-api.service.spec.ts index 7dc4d4ff3..3bc6ff1a4 100644 --- a/ui/ui-frontend/projects/identity/src/app/core/api/group-api.service.spec.ts +++ b/ui/ui-frontend/projects/identity/src/app/core/api/group-api.service.spec.ts @@ -51,7 +51,7 @@ describe('GroupApiService', () => { })); it('should be created', () => { - const service: GroupApiService = TestBed.get(GroupApiService); + const service: GroupApiService = TestBed.inject(GroupApiService); expect(service).toBeTruthy(); }); }); diff --git a/ui/ui-frontend/projects/identity/src/app/core/api/user-api.service.spec.ts b/ui/ui-frontend/projects/identity/src/app/core/api/user-api.service.spec.ts index 78b3a4425..6dacabab3 100644 --- a/ui/ui-frontend/projects/identity/src/app/core/api/user-api.service.spec.ts +++ b/ui/ui-frontend/projects/identity/src/app/core/api/user-api.service.spec.ts @@ -51,7 +51,7 @@ describe('UserApiService', () => { })); it('should be created', () => { - const service: UserApiService = TestBed.get(UserApiService); + const service: UserApiService = TestBed.inject(UserApiService); expect(service).toBeTruthy(); }); }); diff --git a/ui/ui-frontend/projects/identity/src/app/core/customer.service.spec.ts b/ui/ui-frontend/projects/identity/src/app/core/customer.service.spec.ts index 07fd70e61..42b3150ce 100644 --- a/ui/ui-frontend/projects/identity/src/app/core/customer.service.spec.ts +++ b/ui/ui-frontend/projects/identity/src/app/core/customer.service.spec.ts @@ -63,8 +63,8 @@ describe('CustomerService', () => { ] }); - httpTestingController = TestBed.get(HttpTestingController as Type<HttpTestingController>); - customerService = TestBed.get(CustomerService); + httpTestingController = TestBed.inject(HttpTestingController as Type<HttpTestingController>); + customerService = TestBed.inject(CustomerService); }); it('should be created', inject([CustomerService], (service: CustomerService) => { @@ -72,7 +72,7 @@ describe('CustomerService', () => { })); it('should call /fake-api/customers and display a success message', () => { - const snackBar = TestBed.get(VitamUISnackBar); + const snackBar = TestBed.inject(VitamUISnackBar); customerService.create(expectedCustomer).subscribe( (response: Customer) => { expect(response).toEqual(expectedCustomer); @@ -91,7 +91,7 @@ describe('CustomerService', () => { }); it('should display an error message', () => { - const snackBar = TestBed.get(VitamUISnackBar); + const snackBar = TestBed.inject(VitamUISnackBar); customerService.create(expectedCustomer).subscribe( fail, () => { diff --git a/ui/ui-frontend/projects/identity/src/app/customer/customer-create/customer-create.component.spec.ts b/ui/ui-frontend/projects/identity/src/app/customer/customer-create/customer-create.component.spec.ts index d3de9d5cc..767d39d73 100644 --- a/ui/ui-frontend/projects/identity/src/app/customer/customer-create/customer-create.component.spec.ts +++ b/ui/ui-frontend/projects/identity/src/app/customer/customer-create/customer-create.component.spec.ts @@ -281,15 +281,15 @@ describe('CustomerCreateComponent', () => { describe('Component', () => { it('should call dialogRef.close', () => { - const matDialogRef = TestBed.get(MatDialogRef); + const matDialogRef = TestBed.inject(MatDialogRef); component.onCancel(); - expect(matDialogRef.close.calls.count()).toBe(1); + expect(matDialogRef.close).toHaveBeenCalledTimes(1); }); it('should not call create()', () => { - const customerService = TestBed.get(CustomerService); + const customerService = TestBed.inject(CustomerService); component.onSubmit(); - expect(customerService.create.calls.count()).toBe(0); + expect(customerService.create).toHaveBeenCalledTimes(0); }); }); diff --git a/ui/ui-frontend/projects/identity/src/app/customer/customer-preview/sso-tab/identity-provider-create/identity-provider-create.component.spec.ts b/ui/ui-frontend/projects/identity/src/app/customer/customer-preview/sso-tab/identity-provider-create/identity-provider-create.component.spec.ts index 6d83b71cd..d0e17e4e2 100644 --- a/ui/ui-frontend/projects/identity/src/app/customer/customer-preview/sso-tab/identity-provider-create/identity-provider-create.component.spec.ts +++ b/ui/ui-frontend/projects/identity/src/app/customer/customer-preview/sso-tab/identity-provider-create/identity-provider-create.component.spec.ts @@ -98,20 +98,20 @@ describe('IdentityProviderCreateComponent', () => { describe('Class', () => { it('should call dialogRef.close', () => { - const matDialogRef = TestBed.get(MatDialogRef); + const matDialogRef = TestBed.inject(MatDialogRef); component.onCancel(); expect(matDialogRef.close).toHaveBeenCalled(); }); it('should not call idpService.create()', () => { - const idpService = TestBed.get(IdentityProviderService); + const idpService = TestBed.inject(IdentityProviderService); component.onSubmit(); expect(idpService.create).not.toHaveBeenCalled(); }); it('should call idpService.create()', () => { - const idpService = TestBed.get(IdentityProviderService); - const matDialogRef = TestBed.get(MatDialogRef); + const idpService = TestBed.inject(IdentityProviderService); + const matDialogRef = TestBed.inject(MatDialogRef); component.form.setValue({ customerId: '1234', name: 'Test IDP', @@ -146,9 +146,9 @@ describe('IdentityProviderCreateComponent', () => { }); it('should set an error', () => { - const idpService = TestBed.get(IdentityProviderService); - const matDialogRef = TestBed.get(MatDialogRef); - idpService.create.and.returnValue(observableThrowError({ error: { error: 'INVALID_KEYSTORE_PASSWORD' } })); + const idpService = TestBed.inject(IdentityProviderService); + const matDialogRef = TestBed.inject(MatDialogRef); + idpService.create = jasmine.createSpy().and.returnValue(observableThrowError({ error: { error: 'INVALID_KEYSTORE_PASSWORD' } })); component.form.setValue({ customerId: '1234', name: 'Test IDP', diff --git a/ui/ui-frontend/projects/identity/src/app/customer/customer-preview/sso-tab/identity-provider-details/identity-provider-details.component.spec.ts b/ui/ui-frontend/projects/identity/src/app/customer/customer-preview/sso-tab/identity-provider-details/identity-provider-details.component.spec.ts index ac5bd837b..8d4c8b0dc 100644 --- a/ui/ui-frontend/projects/identity/src/app/customer/customer-preview/sso-tab/identity-provider-details/identity-provider-details.component.spec.ts +++ b/ui/ui-frontend/projects/identity/src/app/customer/customer-preview/sso-tab/identity-provider-details/identity-provider-details.component.spec.ts @@ -208,7 +208,7 @@ describe('IdentityProviderDetailsComponent', () => { }); it('should be valid and call patch()', waitForAsync(() => { - const providerService = TestBed.get(IdentityProviderService); + const providerService = TestBed.inject(IdentityProviderService); spyOn(providerService, 'patch').and.returnValue(of(null)); testhost.component.form.setValue({ id: testhost.provider.id, diff --git a/ui/ui-frontend/projects/identity/src/app/customer/customer-preview/sso-tab/identity-provider.service.spec.ts b/ui/ui-frontend/projects/identity/src/app/customer/customer-preview/sso-tab/identity-provider.service.spec.ts index dd31e5cb5..600a45f89 100644 --- a/ui/ui-frontend/projects/identity/src/app/customer/customer-preview/sso-tab/identity-provider.service.spec.ts +++ b/ui/ui-frontend/projects/identity/src/app/customer/customer-preview/sso-tab/identity-provider.service.spec.ts @@ -80,8 +80,8 @@ describe('IdentityProviderService', () => { ] }); - httpTestingController = TestBed.get(HttpTestingController as Type<HttpTestingController>); - identityProviderService = TestBed.get(IdentityProviderService); + httpTestingController = TestBed.inject(HttpTestingController as Type<HttpTestingController>); + identityProviderService = TestBed.inject(IdentityProviderService); }); it('should be created', inject([IdentityProviderService], (service: IdentityProviderService) => { @@ -91,7 +91,7 @@ describe('IdentityProviderService', () => { describe('create', () => { it('should call /fake-api/providers and display a succes message', () => { - const snackBar = TestBed.get(VitamUISnackBar); + const snackBar = TestBed.inject(VitamUISnackBar); identityProviderService.create(identityProviders[0]).subscribe( (response: IdentityProvider) => { expect(response).toEqual(identityProviders[0]); @@ -110,7 +110,7 @@ describe('IdentityProviderService', () => { }); it('should display an error message', () => { - const snackBar = TestBed.get(VitamUISnackBar); + const snackBar = TestBed.inject(VitamUISnackBar); identityProviderService.create(identityProviders[0]).subscribe( fail, () => { @@ -146,7 +146,7 @@ describe('IdentityProviderService', () => { describe('update', () => { it('should call PATCH /fake-api/providers/42', () => { - const snackBar = TestBed.get(VitamUISnackBar); + const snackBar = TestBed.inject(VitamUISnackBar); identityProviderService.updated.subscribe((provider: IdentityProvider) => expect(provider).toEqual(identityProviders[0]), fail); identityProviderService.patch(identityProviders[0]).subscribe( (provider: IdentityProvider) => { @@ -167,7 +167,7 @@ describe('IdentityProviderService', () => { }); it('should display an error message', () => { - const snackBar = TestBed.get(VitamUISnackBar); + const snackBar = TestBed.inject(VitamUISnackBar); identityProviderService.patch(identityProviders[0]).subscribe( fail, () => { @@ -185,7 +185,7 @@ describe('IdentityProviderService', () => { describe('updateMetadataFile', () => { it('should call PATCH /fake-api/providers/42/idpMetadata', () => { - const snackBar = TestBed.get(VitamUISnackBar); + const snackBar = TestBed.inject(VitamUISnackBar); const expectedFile = new File([''], 'metadata.xml'); identityProviderService.updated.subscribe((provider: IdentityProvider) => expect(provider).toEqual(identityProviders[0]), fail); identityProviderService.updateMetadataFile('42', expectedFile).subscribe( @@ -210,7 +210,7 @@ describe('IdentityProviderService', () => { }); it('should display an error message', () => { - const snackBar = TestBed.get(VitamUISnackBar); + const snackBar = TestBed.inject(VitamUISnackBar); identityProviderService.updateMetadataFile('42', new File([''], 'metadata.xml')).subscribe( fail, () => { @@ -228,7 +228,7 @@ describe('IdentityProviderService', () => { describe('updateKeystore', () => { it('should call PATCH /fake-api/providers/42/keystore', () => { - const snackBar = TestBed.get(VitamUISnackBar); + const snackBar = TestBed.inject(VitamUISnackBar); const expectedFile = new File([''], 'keystore.jks'); identityProviderService.updated.subscribe((provider: IdentityProvider) => expect(provider).toEqual(identityProviders[0]), fail); identityProviderService.updateKeystore('42', expectedFile, 'password').subscribe( @@ -253,7 +253,7 @@ describe('IdentityProviderService', () => { }); it('should display an error message', () => { - const snackBar = TestBed.get(VitamUISnackBar); + const snackBar = TestBed.inject(VitamUISnackBar); identityProviderService.updateKeystore('42', new File([''], 'keystore.jks'), 'password').subscribe( fail, () => { diff --git a/ui/ui-frontend/projects/identity/src/app/customer/customer-preview/sso-tab/provider-api.service.spec.ts b/ui/ui-frontend/projects/identity/src/app/customer/customer-preview/sso-tab/provider-api.service.spec.ts index 57268c860..88486f532 100644 --- a/ui/ui-frontend/projects/identity/src/app/customer/customer-preview/sso-tab/provider-api.service.spec.ts +++ b/ui/ui-frontend/projects/identity/src/app/customer/customer-preview/sso-tab/provider-api.service.spec.ts @@ -51,7 +51,7 @@ describe('ProviderApiService', () => { })); it('should be created', () => { - const service: ProviderApiService = TestBed.get(ProviderApiService); + const service: ProviderApiService = TestBed.inject(ProviderApiService); expect(service).toBeTruthy(); }); }); diff --git a/ui/ui-frontend/projects/identity/src/app/customer/customer-preview/sso-tab/sso-tab.component.spec.ts b/ui/ui-frontend/projects/identity/src/app/customer/customer-preview/sso-tab/sso-tab.component.spec.ts index 38fd0e726..4503886d0 100644 --- a/ui/ui-frontend/projects/identity/src/app/customer/customer-preview/sso-tab/sso-tab.component.spec.ts +++ b/ui/ui-frontend/projects/identity/src/app/customer/customer-preview/sso-tab/sso-tab.component.spec.ts @@ -182,7 +182,7 @@ describe('SsoTabComponent', () => { }); it('should call open', () => { - const matDialogSpy = TestBed.get(MatDialog); + const matDialogSpy = TestBed.inject(MatDialog); testhost.component.openCreateIDPDialog(); expect(matDialogSpy.open).toHaveBeenCalled(); }); diff --git a/ui/ui-frontend/projects/identity/src/app/customer/customer-resolver.service.spec.ts b/ui/ui-frontend/projects/identity/src/app/customer/customer-resolver.service.spec.ts index 52ebeee63..5875dcc3a 100644 --- a/ui/ui-frontend/projects/identity/src/app/customer/customer-resolver.service.spec.ts +++ b/ui/ui-frontend/projects/identity/src/app/customer/customer-resolver.service.spec.ts @@ -86,7 +86,7 @@ describe('CustomerResolver', () => { ] }); - customerResolver = TestBed.get(CustomerResolver); + customerResolver = TestBed.inject(CustomerResolver); }); it('should be created', inject([CustomerResolver], (service: CustomerResolver) => { @@ -97,8 +97,8 @@ describe('CustomerResolver', () => { const route = new ActivatedRouteSnapshot(); spyOn(route.paramMap, 'get').and.returnValue('42'); - const customerService = TestBed.get(CustomerService); - customerService.get.and.returnValue(of(expectedCustomer)); + const customerService = TestBed.inject(CustomerService); + customerService.get = jasmine.createSpy().and.returnValue(of(expectedCustomer)); customerResolver.resolve(route).subscribe((customer) => { expect(customer).toEqual(expectedCustomer); }); @@ -110,9 +110,9 @@ describe('CustomerResolver', () => { it('should redirect to / if an error occurs', () => { const route = new ActivatedRouteSnapshot(); spyOn(route.paramMap, 'get').and.returnValue('42'); - const customerService = TestBed.get(CustomerService); - customerService.get.and.returnValue(of(null)); - const router = TestBed.get(Router); + const customerService = TestBed.inject(CustomerService); + customerService.get = jasmine.createSpy().and.returnValue(of(null)); + const router = TestBed.inject(Router); customerResolver.resolve(route).subscribe(() => { expect(router.navigate).toHaveBeenCalledWith(['/']); }); diff --git a/ui/ui-frontend/projects/identity/src/app/customer/owner-api.service.spec.ts b/ui/ui-frontend/projects/identity/src/app/customer/owner-api.service.spec.ts index f76093f61..a2a54d4f9 100644 --- a/ui/ui-frontend/projects/identity/src/app/customer/owner-api.service.spec.ts +++ b/ui/ui-frontend/projects/identity/src/app/customer/owner-api.service.spec.ts @@ -51,7 +51,7 @@ describe('OwnerApiService', () => { })); it('should be created', () => { - const service: OwnerApiService = TestBed.get(OwnerApiService); + const service: OwnerApiService = TestBed.inject(OwnerApiService); expect(service).toBeTruthy(); }); }); diff --git a/ui/ui-frontend/projects/identity/src/app/customer/owner-create/owner-create.component.spec.ts b/ui/ui-frontend/projects/identity/src/app/customer/owner-create/owner-create.component.spec.ts index a57bf1893..3ff3960d0 100644 --- a/ui/ui-frontend/projects/identity/src/app/customer/owner-create/owner-create.component.spec.ts +++ b/ui/ui-frontend/projects/identity/src/app/customer/owner-create/owner-create.component.spec.ts @@ -136,35 +136,35 @@ describe('OwnerCreateComponent', () => { }); it('should call dialogRef.close', () => { - const matDialogRef = TestBed.get(MatDialogRef); + const matDialogRef = TestBed.inject(MatDialogRef); component.onCancel(); - expect(matDialogRef.close.calls.count()).toBe(1); + expect(matDialogRef.close).toHaveBeenCalledTimes(1); }); it('should not call ownerService.create()', () => { - const ownerService = TestBed.get(OwnerService); + const ownerService = TestBed.inject(OwnerService); component.onOwnerSubmit(); - expect(ownerService.create.calls.count()).toBe(0); + expect(ownerService.create).toHaveBeenCalledTimes(0); }); it('should call ownerService.create()', () => { - const ownerService = TestBed.get(OwnerService); - const matDialogRef = TestBed.get(MatDialogRef); + const ownerService = TestBed.inject(OwnerService); + const matDialogRef = TestBed.inject(MatDialogRef); component.ownerForm.setValue({ owner }); component.onOwnerSubmit(); - expect(ownerService.create.calls.count()).toBe(1); - expect(matDialogRef.close.calls.count()).toBe(1); + expect(ownerService.create).toHaveBeenCalledTimes(1); + expect(matDialogRef.close).toHaveBeenCalledTimes(1); }); it('should not call tenantService.create()', () => { - const tenantService = TestBed.get(TenantService); + const tenantService = TestBed.inject(TenantService); component.onTenantSubmit(); expect(tenantService.create).not.toHaveBeenCalled(); }); it('should call tenantService.create()', () => { - const tenantService = TestBed.get(TenantService); - const matDialogRef = TestBed.get(MatDialogRef); + const tenantService = TestBed.inject(TenantService); + const matDialogRef = TestBed.inject(MatDialogRef); component.ownerForm.setValue({ owner }); const tenant = { name: 'tenant name', ownerId: owner.id, customerId: '42', enabled: true }; component.tenantForm.setValue(tenant); @@ -173,6 +173,6 @@ describe('OwnerCreateComponent', () => { { name: tenant.name, ownerId: tenant.ownerId, customerId: tenant.customerId, enabled: tenant.enabled }, owner.name ); - expect(matDialogRef.close.calls.count()).toBe(1); + expect(matDialogRef.close).toHaveBeenCalledTimes(1); }); }); diff --git a/ui/ui-frontend/projects/identity/src/app/customer/owner-resolver.service.spec.ts b/ui/ui-frontend/projects/identity/src/app/customer/owner-resolver.service.spec.ts index a960aec16..78844a168 100644 --- a/ui/ui-frontend/projects/identity/src/app/customer/owner-resolver.service.spec.ts +++ b/ui/ui-frontend/projects/identity/src/app/customer/owner-resolver.service.spec.ts @@ -74,7 +74,7 @@ describe('OwnerResolver', () => { ], }); - ownerResolver = TestBed.get(OwnerResolver); + ownerResolver = TestBed.inject(OwnerResolver); }); it('should be created', inject([OwnerResolver], (service: OwnerResolver) => { @@ -85,8 +85,8 @@ describe('OwnerResolver', () => { const route = new ActivatedRouteSnapshot(); spyOn(route.paramMap, 'get').and.returnValue('42'); - const ownerService = TestBed.get(OwnerService); - ownerService.get.and.returnValue(of(expectedOwner)); + const ownerService = TestBed.inject(OwnerService); + ownerService.get = jasmine.createSpy().and.returnValue(of(expectedOwner)); ownerResolver.resolve(route).subscribe((customer) => { expect(customer).toEqual(expectedOwner); }); @@ -98,9 +98,9 @@ describe('OwnerResolver', () => { it('should redirect to / if an error occurs', () => { const route = new ActivatedRouteSnapshot(); spyOn(route.paramMap, 'get').and.returnValue('42'); - const ownerService = TestBed.get(OwnerService); - ownerService.get.and.returnValue(of(null)); - const router = TestBed.get(Router); + const ownerService = TestBed.inject(OwnerService); + ownerService.get = jasmine.createSpy().and.returnValue(of(null)); + const router = TestBed.inject(Router); ownerResolver.resolve(route).subscribe(() => { expect(router.navigate).toHaveBeenCalledWith(['/']); }); diff --git a/ui/ui-frontend/projects/identity/src/app/customer/owner.service.spec.ts b/ui/ui-frontend/projects/identity/src/app/customer/owner.service.spec.ts index 0d2a3407a..25692f00e 100644 --- a/ui/ui-frontend/projects/identity/src/app/customer/owner.service.spec.ts +++ b/ui/ui-frontend/projects/identity/src/app/customer/owner.service.spec.ts @@ -75,8 +75,8 @@ describe('OwnerService', () => { ] }); - httpTestingController = TestBed.get(HttpTestingController as Type<HttpTestingController>); - ownerService = TestBed.get(OwnerService); + httpTestingController = TestBed.inject(HttpTestingController as Type<HttpTestingController>); + ownerService = TestBed.inject(OwnerService); }); it('should be created', inject([OwnerService], (service: OwnerService) => { @@ -91,7 +91,7 @@ describe('OwnerService', () => { }); it('should call /fake-api/owners and display a success message', () => { - const snackBar = TestBed.get(VitamUISnackBar); + const snackBar = TestBed.inject(VitamUISnackBar); ownerService.create(expectedOwner).subscribe( (response: Owner) => { expect(response).toEqual(expectedOwner); @@ -110,7 +110,7 @@ describe('OwnerService', () => { }); it('should display an error message', () => { - const snackBar = TestBed.get(VitamUISnackBar); + const snackBar = TestBed.inject(VitamUISnackBar); ownerService.create(expectedOwner).subscribe( fail, () => { diff --git a/ui/ui-frontend/projects/identity/src/app/customer/tenant-api.service.spec.ts b/ui/ui-frontend/projects/identity/src/app/customer/tenant-api.service.spec.ts index b10898df6..f86445b53 100644 --- a/ui/ui-frontend/projects/identity/src/app/customer/tenant-api.service.spec.ts +++ b/ui/ui-frontend/projects/identity/src/app/customer/tenant-api.service.spec.ts @@ -51,7 +51,7 @@ describe('TenantApiService', () => { })); it('should be created', () => { - const service: TenantApiService = TestBed.get(TenantApiService); + const service: TenantApiService = TestBed.inject(TenantApiService); expect(service).toBeTruthy(); }); }); diff --git a/ui/ui-frontend/projects/identity/src/app/customer/tenant-create/tenant-create.component.spec.ts b/ui/ui-frontend/projects/identity/src/app/customer/tenant-create/tenant-create.component.spec.ts index 95d0998b7..b4912c73f 100644 --- a/ui/ui-frontend/projects/identity/src/app/customer/tenant-create/tenant-create.component.spec.ts +++ b/ui/ui-frontend/projects/identity/src/app/customer/tenant-create/tenant-create.component.spec.ts @@ -89,7 +89,7 @@ describe('TenantCreateComponent', () => { }); it('should call dialogRef.close', () => { - const matDialogRef = TestBed.get(MatDialogRef); + const matDialogRef = TestBed.inject(MatDialogRef); component.onCancel(); expect(matDialogRef.close).toHaveBeenCalled(); }); @@ -101,7 +101,7 @@ describe('TenantCreateComponent', () => { ownerId: '42', enabled: true }; - const tenantServiceSpy = TestBed.get(TenantService); + const tenantServiceSpy = TestBed.inject(TenantService); component.form.setValue(tenant); component.onSubmit(); @@ -116,7 +116,7 @@ describe('TenantCreateComponent', () => { }); it('should not call create()', () => { - const tenantServiceSpy = TestBed.get(TenantService); + const tenantServiceSpy = TestBed.inject(TenantService); component.form.get('name').setValue(null); component.onSubmit(); expect(tenantServiceSpy.create).not.toHaveBeenCalled(); diff --git a/ui/ui-frontend/projects/identity/src/app/customer/tenant-resolver.service.spec.ts b/ui/ui-frontend/projects/identity/src/app/customer/tenant-resolver.service.spec.ts index 206eae8aa..02ed08cdf 100644 --- a/ui/ui-frontend/projects/identity/src/app/customer/tenant-resolver.service.spec.ts +++ b/ui/ui-frontend/projects/identity/src/app/customer/tenant-resolver.service.spec.ts @@ -73,7 +73,7 @@ describe('TenantResolver', () => { ], }); - tenantResolver = TestBed.get(TenantResolver); + tenantResolver = TestBed.inject(TenantResolver); }); it('should be created', inject([TenantResolver], (service: TenantResolver) => { @@ -84,8 +84,8 @@ describe('TenantResolver', () => { const route = new ActivatedRouteSnapshot(); spyOn(route.paramMap, 'get').and.returnValue('42'); - const tenantService = TestBed.get(TenantService); - tenantService.get.and.returnValue(of(expectedTenant)); + const tenantService = TestBed.inject(TenantService); + tenantService.get = jasmine.createSpy().and.returnValue(of(expectedTenant)); tenantResolver.resolve(route).subscribe((customer) => { expect(customer).toEqual(expectedTenant); }); @@ -97,9 +97,9 @@ describe('TenantResolver', () => { it('should redirect to / if an error occurs', () => { const route = new ActivatedRouteSnapshot(); spyOn(route.paramMap, 'get').and.returnValue('42'); - const tenantService = TestBed.get(TenantService); - tenantService.get.and.returnValue(of(null)); - const router = TestBed.get(Router); + const tenantService = TestBed.inject(TenantService); + tenantService.get = jasmine.createSpy().and.returnValue(of(null)); + const router = TestBed.inject(Router); tenantResolver.resolve(route).subscribe(() => { expect(router.navigate).toHaveBeenCalledWith(['/']); }); diff --git a/ui/ui-frontend/projects/identity/src/app/customer/tenant.service.spec.ts b/ui/ui-frontend/projects/identity/src/app/customer/tenant.service.spec.ts index ce10ba657..24df22ada 100644 --- a/ui/ui-frontend/projects/identity/src/app/customer/tenant.service.spec.ts +++ b/ui/ui-frontend/projects/identity/src/app/customer/tenant.service.spec.ts @@ -135,8 +135,8 @@ describe('TenantService', () => { ] }); - httpTestingController = TestBed.get(HttpTestingController as Type<HttpTestingController>); - tenantService = TestBed.get(TenantService); + httpTestingController = TestBed.inject(HttpTestingController as Type<HttpTestingController>); + tenantService = TestBed.inject(TenantService); }); it('should be created', inject([TenantService], (service: TenantService) => { @@ -162,7 +162,7 @@ describe('TenantService', () => { }); it('should call /fake-api/tenants and display a success message', () => { - const snackBar = TestBed.get(VitamUISnackBar); + const snackBar = TestBed.inject(VitamUISnackBar); tenantService.create(expectedTenant, expectedOwner.name).subscribe( (response: Tenant) => { expect(response).toEqual(expectedTenant); @@ -181,7 +181,7 @@ describe('TenantService', () => { }); it('should display an error message', () => { - const snackBar = TestBed.get(VitamUISnackBar); + const snackBar = TestBed.inject(VitamUISnackBar); tenantService.create(expectedTenant, expectedOwner.name).subscribe( fail, () => { diff --git a/ui/ui-frontend/projects/identity/src/app/group/group-create/group-create.component.spec.ts b/ui/ui-frontend/projects/identity/src/app/group/group-create/group-create.component.spec.ts index f0d18a7e5..a2b011182 100644 --- a/ui/ui-frontend/projects/identity/src/app/group/group-create/group-create.component.spec.ts +++ b/ui/ui-frontend/projects/identity/src/app/group/group-create/group-create.component.spec.ts @@ -205,20 +205,20 @@ describe('GroupCreateComponent', () => { describe('Component', () => { it('should call dialogRef.close', () => { - const matDialogRef = TestBed.get(MatDialogRef); + const matDialogRef = TestBed.inject(MatDialogRef); component.onCancel(); - expect(matDialogRef.close.calls.count()).toBe(1); + expect(matDialogRef.close).toHaveBeenCalledTimes(1); }); it('should not call create()', () => { - const groupService = TestBed.get(GroupService); + const groupService = TestBed.inject(GroupService); component.onSubmit(); - expect(groupService.create.calls.count()).toBe(0); + expect(groupService.create).toHaveBeenCalledTimes(0); }); it('should call create()', () => { - const groupService = TestBed.get(GroupService); - const matDialogRef = TestBed.get(MatDialogRef); + const groupService = TestBed.inject(GroupService); + const matDialogRef = TestBed.inject(MatDialogRef); component.form.setValue({ customerId: expectedGroup.customerId, name: expectedGroup.name, @@ -228,8 +228,8 @@ describe('GroupCreateComponent', () => { profileIds: expectedGroup.profileIds }); component.onSubmit(); - expect(groupService.create.calls.count()).toBe(1); - expect(matDialogRef.close.calls.count()).toBe(1); + expect(groupService.create).toHaveBeenCalledTimes(1); + expect(matDialogRef.close).toHaveBeenCalledTimes(1); }); }); diff --git a/ui/ui-frontend/projects/identity/src/app/group/group-list/group-list.component.spec.ts b/ui/ui-frontend/projects/identity/src/app/group/group-list/group-list.component.spec.ts index ce123dc35..772eda6f2 100644 --- a/ui/ui-frontend/projects/identity/src/app/group/group-list/group-list.component.spec.ts +++ b/ui/ui-frontend/projects/identity/src/app/group/group-list/group-list.component.spec.ts @@ -213,7 +213,7 @@ describe('GroupListComponent', () => { }); it('should call loadMore() on scroll', () => { - const groupService = TestBed.get(GroupService); + const groupService = TestBed.inject(GroupService); expect(page.infiniteScroll).toBeTruthy(); const directive = page.infiniteScroll.injector.get<InfiniteScrollStubDirective>(InfiniteScrollStubDirective); directive.vitamuiScroll.next(); diff --git a/ui/ui-frontend/projects/identity/src/app/group/group-preview/profiles-tab/profiles-edit/profiles-edit.component.spec.ts b/ui/ui-frontend/projects/identity/src/app/group/group-preview/profiles-tab/profiles-edit/profiles-edit.component.spec.ts index c2a619c76..06fb0f427 100644 --- a/ui/ui-frontend/projects/identity/src/app/group/group-preview/profiles-tab/profiles-edit/profiles-edit.component.spec.ts +++ b/ui/ui-frontend/projects/identity/src/app/group/group-preview/profiles-tab/profiles-edit/profiles-edit.component.spec.ts @@ -141,9 +141,9 @@ describe('ProfilesEditComponent', () => { describe('Component', () => { it('should call groupService.patch', () => { - const groupService = TestBed.get(GroupService); + const groupService = TestBed.inject(GroupService); spyOn(groupService, 'patch').and.callThrough(); - const matDialogRefSpy = TestBed.get(MatDialogRef); + const matDialogRefSpy = TestBed.inject(MatDialogRef); component.form.setValue({ profileIds: ['1', '2', '3'] }); component.form.markAsDirty(); component.onSubmit(); @@ -152,7 +152,7 @@ describe('ProfilesEditComponent', () => { }); it('should not call profileGroupService.patch', () => { - const profileGroupService = TestBed.get(GroupService); + const profileGroupService = TestBed.inject(GroupService); spyOn(profileGroupService, 'patch').and.callThrough(); component.form.markAsDirty(); component.onSubmit(); @@ -160,7 +160,7 @@ describe('ProfilesEditComponent', () => { }); it('should not call profileGroupService.patch', () => { - const profileGroupService = TestBed.get(GroupService); + const profileGroupService = TestBed.inject(GroupService); spyOn(profileGroupService, 'patch').and.callThrough(); component.form.setValue({ profileIds: ['1', '2', '3'] }); component.onSubmit(); @@ -168,7 +168,7 @@ describe('ProfilesEditComponent', () => { }); it('should call MatDialogRef.close', () => { - const matDialogRefSpy = TestBed.get(MatDialogRef); + const matDialogRefSpy = TestBed.inject(MatDialogRef); component.onCancel(); expect(matDialogRefSpy.close).toHaveBeenCalledTimes(1); }); diff --git a/ui/ui-frontend/projects/identity/src/app/group/group-resolver.service.spec.ts b/ui/ui-frontend/projects/identity/src/app/group/group-resolver.service.spec.ts index 735aaa782..8fe3c7041 100644 --- a/ui/ui-frontend/projects/identity/src/app/group/group-resolver.service.spec.ts +++ b/ui/ui-frontend/projects/identity/src/app/group/group-resolver.service.spec.ts @@ -71,7 +71,7 @@ describe('GroupResolver', () => { ] }); - groupResolver = TestBed.get(GroupResolver); + groupResolver = TestBed.inject(GroupResolver); }); it('should be created', inject([GroupResolver], (service: GroupResolver) => { @@ -82,8 +82,8 @@ describe('GroupResolver', () => { const route = new ActivatedRouteSnapshot(); spyOn(route.paramMap, 'get').and.returnValue('42'); - const profileGroupService = TestBed.get(GroupService); - profileGroupService.get.and.returnValue(of(expectedGroup)); + const profileGroupService = TestBed.inject(GroupService); + profileGroupService.get = jasmine.createSpy().and.returnValue(of(expectedGroup)); groupResolver.resolve(route).subscribe((profileGroup) => { expect(profileGroup).toEqual(expectedGroup); }); @@ -95,9 +95,9 @@ describe('GroupResolver', () => { it('should redirect to / if an error occurs', () => { const route = new ActivatedRouteSnapshot(); spyOn(route.paramMap, 'get').and.returnValue('42'); - const profileGroupService = TestBed.get(GroupService); - profileGroupService.get.and.returnValue(of(null)); - const router = TestBed.get(Router); + const profileGroupService = TestBed.inject(GroupService); + profileGroupService.get = jasmine.createSpy().and.returnValue(of(null)); + const router = TestBed.inject(Router); groupResolver.resolve(route).subscribe(() => { expect(router.navigate).toHaveBeenCalledWith(['/']); }); diff --git a/ui/ui-frontend/projects/identity/src/app/group/group.component.spec.ts b/ui/ui-frontend/projects/identity/src/app/group/group.component.spec.ts index 4c16afc39..7856dc752 100644 --- a/ui/ui-frontend/projects/identity/src/app/group/group.component.spec.ts +++ b/ui/ui-frontend/projects/identity/src/app/group/group.component.spec.ts @@ -128,9 +128,9 @@ describe('GroupComponent', () => { }); it('should open a modal with GroupCreateComponent', () => { - const matDialogSpy = TestBed.get(MatDialog); + const matDialogSpy = TestBed.inject(MatDialog); page.createGroup.click(); - expect(matDialogSpy.open.calls.count()).toBe(1); + expect(matDialogSpy.open).toHaveBeenCalledTimes(1); expect(matDialogSpy.open).toHaveBeenCalledWith(GroupCreateComponent, { panelClass: 'vitamui-modal', disableClose: true }); }); diff --git a/ui/ui-frontend/projects/identity/src/app/group/group.service.spec.ts b/ui/ui-frontend/projects/identity/src/app/group/group.service.spec.ts index 52aa7fe18..541c80c01 100644 --- a/ui/ui-frontend/projects/identity/src/app/group/group.service.spec.ts +++ b/ui/ui-frontend/projects/identity/src/app/group/group.service.spec.ts @@ -60,8 +60,8 @@ describe('GroupService', () => { ] }); - httpTestingController = TestBed.get(HttpTestingController as Type<HttpTestingController>); - groupService = TestBed.get(GroupService); + httpTestingController = TestBed.inject(HttpTestingController as Type<HttpTestingController>); + groupService = TestBed.inject(GroupService); }); it('should be created', inject([GroupService], (service: GroupService) => { @@ -141,7 +141,7 @@ describe('GroupService', () => { }); it('should call /fake-api/groups and display a success message', () => { - const snackBar = TestBed.get(VitamUISnackBar); + const snackBar = TestBed.inject(VitamUISnackBar); const expectedGroup: Group = { id: '1', customerId: '4242442', @@ -171,7 +171,7 @@ describe('GroupService', () => { }); it('should display an error message', () => { - const snackBar = TestBed.get(VitamUISnackBar); + const snackBar = TestBed.inject(VitamUISnackBar); const expectedProfileGroup: Group = { id: '1', customerId: '4242442', @@ -245,7 +245,7 @@ describe('GroupService', () => { }); it('should call PATCH /fake-api/groups/42', () => { - const snackBar = TestBed.get(VitamUISnackBar); + const snackBar = TestBed.inject(VitamUISnackBar); const expectedProfileGroup: Group = { id: '1', customerId: '4242442', diff --git a/ui/ui-frontend/projects/identity/src/app/hierarchy/hierarchy-detail/information-tab/information-tab.component.spec.ts b/ui/ui-frontend/projects/identity/src/app/hierarchy/hierarchy-detail/information-tab/information-tab.component.spec.ts index 4a20cc07d..be440fe15 100644 --- a/ui/ui-frontend/projects/identity/src/app/hierarchy/hierarchy-detail/information-tab/information-tab.component.spec.ts +++ b/ui/ui-frontend/projects/identity/src/app/hierarchy/hierarchy-detail/information-tab/information-tab.component.spec.ts @@ -182,7 +182,7 @@ describe('Hierarchy InformationTabComponent', () => { // TODO FIXME // it('should update the name', fakeAsync(() => { - // const service = TestBed.get(HierarchyService); + // const service = TestBed.inject(HierarchyService); // spyOn(service, 'update').and.returnValue(of(testhost.profile)); // testhost.component.form.get('name').setValue('New name'); // tick(400); diff --git a/ui/ui-frontend/projects/identity/src/app/hierarchy/hierarchy.service.spec.ts b/ui/ui-frontend/projects/identity/src/app/hierarchy/hierarchy.service.spec.ts index c2a73f2e1..dc24bae5f 100644 --- a/ui/ui-frontend/projects/identity/src/app/hierarchy/hierarchy.service.spec.ts +++ b/ui/ui-frontend/projects/identity/src/app/hierarchy/hierarchy.service.spec.ts @@ -58,7 +58,7 @@ describe('HierarchyService', () => { ); it('should be created', () => { - const service: HierarchyService = TestBed.get(HierarchyService); + const service: HierarchyService = TestBed.inject(HierarchyService); expect(service).toBeTruthy(); }); }); diff --git a/ui/ui-frontend/projects/identity/src/app/profile/profile-detail/information-tab/information-tab.component.spec.ts b/ui/ui-frontend/projects/identity/src/app/profile/profile-detail/information-tab/information-tab.component.spec.ts index 7fa1011ce..a6fd602af 100644 --- a/ui/ui-frontend/projects/identity/src/app/profile/profile-detail/information-tab/information-tab.component.spec.ts +++ b/ui/ui-frontend/projects/identity/src/app/profile/profile-detail/information-tab/information-tab.component.spec.ts @@ -167,7 +167,7 @@ describe('Profile InformationTabComponent', () => { // }); // it('should update the name', fakeAsync(() => { - // const service = TestBed.get(ProfileService); + // const service = TestBed.inject(ProfileService); // spyOn(service, 'patch').and.returnValue(of(testhost.profile)); // testhost.component.form.get('name').setValue('New name'); // tick(400); @@ -175,7 +175,7 @@ describe('Profile InformationTabComponent', () => { // })); // it('should not call update if nothing changes', fakeAsync(() => { - // const service = TestBed.get(ProfileService); + // const service = TestBed.inject(ProfileService); // spyOn(service, 'patch').and.returnValue(of(testhost.profile)); // testhost.component.form.get('name').setValue('ProfileName'); // tick(400); diff --git a/ui/ui-frontend/projects/identity/src/app/profile/profile-resolver.service.spec.ts b/ui/ui-frontend/projects/identity/src/app/profile/profile-resolver.service.spec.ts index 6846672c6..4dab9bbb5 100644 --- a/ui/ui-frontend/projects/identity/src/app/profile/profile-resolver.service.spec.ts +++ b/ui/ui-frontend/projects/identity/src/app/profile/profile-resolver.service.spec.ts @@ -76,7 +76,7 @@ describe('ProfileResolver', () => { ] }); - profileResolver = TestBed.get(ProfileResolver); + profileResolver = TestBed.inject(ProfileResolver); }); it('should be created', inject([ProfileResolver], (service: ProfileResolver) => { @@ -87,8 +87,8 @@ describe('ProfileResolver', () => { const route = new ActivatedRouteSnapshot(); spyOn(route.paramMap, 'get').and.returnValue('42'); - const rngProfileService = TestBed.get(ProfileService); - rngProfileService.get.and.returnValue(of(expectedProfile)); + const rngProfileService = TestBed.inject(ProfileService); + rngProfileService.get = jasmine.createSpy().and.returnValue(of(expectedProfile)); profileResolver.resolve(route).subscribe((profile) => { expect(profile).toEqual(expectedProfile); }); @@ -100,9 +100,9 @@ describe('ProfileResolver', () => { it('should redirect to / if an error occurs', () => { const route = new ActivatedRouteSnapshot(); spyOn(route.paramMap, 'get').and.returnValue('42'); - const rngProfileService = TestBed.get(ProfileService); - rngProfileService.get.and.returnValue(of(null)); - const router = TestBed.get(Router); + const rngProfileService = TestBed.inject(ProfileService); + rngProfileService.get = jasmine.createSpy().and.returnValue(of(null)); + const router = TestBed.inject(Router); profileResolver.resolve(route).subscribe(() => { expect(router.navigate).toHaveBeenCalledWith(['/']); }); diff --git a/ui/ui-frontend/projects/identity/src/app/profile/profile.service.spec.ts b/ui/ui-frontend/projects/identity/src/app/profile/profile.service.spec.ts index 2dc4d7649..bc8237840 100644 --- a/ui/ui-frontend/projects/identity/src/app/profile/profile.service.spec.ts +++ b/ui/ui-frontend/projects/identity/src/app/profile/profile.service.spec.ts @@ -58,8 +58,8 @@ describe('ProfileService', () => { ] }); - httpTestingController = TestBed.get(HttpTestingController as Type<HttpTestingController>); - rngProfileService = TestBed.get(ProfileService); + httpTestingController = TestBed.inject(HttpTestingController as Type<HttpTestingController>); + rngProfileService = TestBed.inject(ProfileService); }); it('should be created', inject([ProfileService], (service: ProfileService) => { @@ -93,7 +93,7 @@ describe('ProfileService', () => { describe('patch', () => { it('should call PATCH /fake-api/profiles/42', () => { - const snackBar = TestBed.get(VitamUISnackBar); + const snackBar = TestBed.inject(VitamUISnackBar); const expectedRequest = { id: '42', name: 'Profile Group Name', @@ -134,7 +134,7 @@ describe('ProfileService', () => { }); it('should display an error message', () => { - const snackBar = TestBed.get(VitamUISnackBar); + const snackBar = TestBed.inject(VitamUISnackBar); const expectedRequest = { id: '42', name: 'Profile Group Name', diff --git a/ui/ui-frontend/projects/identity/src/app/shared/editable-field/editable-keystore/editable-keystore.component.spec.ts b/ui/ui-frontend/projects/identity/src/app/shared/editable-field/editable-keystore/editable-keystore.component.spec.ts index e5761ef6a..725d52092 100644 --- a/ui/ui-frontend/projects/identity/src/app/shared/editable-field/editable-keystore/editable-keystore.component.spec.ts +++ b/ui/ui-frontend/projects/identity/src/app/shared/editable-field/editable-keystore/editable-keystore.component.spec.ts @@ -232,7 +232,7 @@ describe('EditableKeystoreComponent', () => { describe('confirm', () => { it('should call updateKeystore', () => { - const idpService = TestBed.get(IdentityProviderService); + const idpService = TestBed.inject(IdentityProviderService); spyOn(idpService, 'updateKeystore').and.callThrough(); testhost.component.editMode = true; const expectedFile = newFile([''], 'test.jks'); @@ -244,7 +244,7 @@ describe('EditableKeystoreComponent', () => { }); it('should not call updateKeystore', () => { - const idpService = TestBed.get(IdentityProviderService); + const idpService = TestBed.inject(IdentityProviderService); spyOn(idpService, 'updateKeystore').and.callThrough(); testhost.component.editMode = true; const expectedFile = newFile([''], 'test.jks'); @@ -258,7 +258,7 @@ describe('EditableKeystoreComponent', () => { }); it('should set the error', () => { - const idpService = TestBed.get(IdentityProviderService); + const idpService = TestBed.inject(IdentityProviderService); spyOn(idpService, 'updateKeystore').and.returnValue(observableThrowError(null)); testhost.component.editMode = true; const expectedFile = newFile([''], 'test.jks'); diff --git a/ui/ui-frontend/projects/identity/src/app/shared/vitamui-snack-bar/vitamui-snack-bar.service.ts b/ui/ui-frontend/projects/identity/src/app/shared/vitamui-snack-bar/vitamui-snack-bar.service.ts index da0516140..bdbb0664b 100644 --- a/ui/ui-frontend/projects/identity/src/app/shared/vitamui-snack-bar/vitamui-snack-bar.service.ts +++ b/ui/ui-frontend/projects/identity/src/app/shared/vitamui-snack-bar/vitamui-snack-bar.service.ts @@ -40,7 +40,7 @@ import { LiveAnnouncer } from '@angular/cdk/a11y'; import { BreakpointObserver, Breakpoints } from '@angular/cdk/layout'; import { Overlay, OverlayConfig, OverlayRef } from '@angular/cdk/overlay'; -import { ComponentPortal, ComponentType, PortalInjector, TemplatePortal } from '@angular/cdk/portal'; +import { ComponentPortal, ComponentType, TemplatePortal } from '@angular/cdk/portal'; import { ComponentRef, EmbeddedViewRef, @@ -167,9 +167,10 @@ export class VitamUISnackBar { config: MatSnackBarConfig): MatSnackBarContainer { const userInjector = config && config.viewContainerRef && config.viewContainerRef.injector; - const injector = new PortalInjector(userInjector || this._injector, new WeakMap([ - [MatSnackBarConfig, config], - ])); + const injector = Injector.create({ + parent: userInjector || this._injector, + providers: [{provide: MatSnackBarConfig, useValue: config}] + }); const containerPortal = new ComponentPortal(MatSnackBarContainer, config.viewContainerRef, injector); @@ -305,13 +306,16 @@ export class VitamUISnackBar { */ private _createInjector<T>( config: MatSnackBarConfig, - snackBarRef: MatSnackBarRef<T>): PortalInjector { + snackBarRef: MatSnackBarRef<T>): Injector { const userInjector = config && config.viewContainerRef && config.viewContainerRef.injector; - return new PortalInjector(userInjector || this._injector, new WeakMap<any, any>([ - [MatSnackBarRef, snackBarRef], - [MAT_SNACK_BAR_DATA, config.data], - ])); + return Injector.create({ + parent: userInjector || this._injector, + providers: [ + {provide: MatSnackBarRef, useValue: snackBarRef}, + {provide: MAT_SNACK_BAR_DATA, useValue: config.data} + ] + }); } } diff --git a/ui/ui-frontend/projects/identity/src/app/subrogation/customer-select.service.spec.ts b/ui/ui-frontend/projects/identity/src/app/subrogation/customer-select.service.spec.ts index 3fe1a52ea..8e7a66ab5 100644 --- a/ui/ui-frontend/projects/identity/src/app/subrogation/customer-select.service.spec.ts +++ b/ui/ui-frontend/projects/identity/src/app/subrogation/customer-select.service.spec.ts @@ -61,8 +61,8 @@ describe('CustomerSelectService', () => { ] }); - httpTestingController = TestBed.get(HttpTestingController as Type<HttpTestingController>); - searchService = TestBed.get(CustomerSelectService); + httpTestingController = TestBed.inject(HttpTestingController as Type<HttpTestingController>); + searchService = TestBed.inject(CustomerSelectService); }); it('should be created', inject([CustomerSelectService], (service: CustomerSelectService) => { diff --git a/ui/ui-frontend/projects/identity/src/app/subrogation/user-generic-api.service.spec.ts b/ui/ui-frontend/projects/identity/src/app/subrogation/user-generic-api.service.spec.ts index a0e5c76bd..45de7ce1d 100644 --- a/ui/ui-frontend/projects/identity/src/app/subrogation/user-generic-api.service.spec.ts +++ b/ui/ui-frontend/projects/identity/src/app/subrogation/user-generic-api.service.spec.ts @@ -51,7 +51,7 @@ describe('UserGenericApiService', () => { })); it('should be created', () => { - const service: UserGenericApiService = TestBed.get(UserGenericApiService); + const service: UserGenericApiService = TestBed.inject(UserGenericApiService); expect(service).toBeTruthy(); }); }); diff --git a/ui/ui-frontend/projects/identity/src/assets/i18n/en.json b/ui/ui-frontend/projects/identity/src/assets/i18n/en.json index 915f32c7a..81eec9242 100644 --- a/ui/ui-frontend/projects/identity/src/assets/i18n/en.json +++ b/ui/ui-frontend/projects/identity/src/assets/i18n/en.json @@ -1,4 +1,10 @@ { + "COMMON" : { + "CANCEL" : "Cancel", + "SUBMIT" : "Submit", + "UPDATE" : "Update", + "APPLY_UPDATE" : "Apply changes" + }, "MISC" : { "NO_DESC": "No description" }, @@ -6,6 +12,37 @@ "INVALID": "Invalid color", "TOO_LIGHT": "The color is too light.", "TOO_DARK": "The color is too dark.", - "INCOMPATIBLE": "This color will not be compatible with RGAA accessibility standards." + "INCOMPATIBLE": "This color will not be compatible with RGAA accessibility standards.", + "TERTIARY": "Tertiary color", + "HEADER_FOOTER": "Header/footer color", + "BACKGROUND": "Background color" + }, + "GRAPHIC_IDENTITY" : { + "TOGGLE_TITLE" : "Personalized graphic identity", + "COLOR_TITLE" :"Colors settings", + "LOGO_TITLE" :"Logo management", + "LOGO_HEADER_TITLE" :"Header logo", + "LOGO_FOOTER_TITLE" :"Footer logo", + "LOGO_PORTAL_TITLE" :"Portal logo", + "LOGO_DROP":"Drop your logo", + "LOGO_ATTACH":"Attach a logo", + "TERTIARY_COLOR_SHOW":"Show tertiary color", + "TERTIARY_COLOR_HIDE":"Hide tertiary color", + "SUBMIT":"Apply graphic idendity chart" + }, + "CUSTOMER" : { + "TAB" : { + "INFORMATION" : "Informations", + "SSO" : "SSO", + "GRAPHIC_ID" :"Graphic ID.", + "HOMEPAGE_MESSAGE" : "Homepage message", + "HISTORY" : "History" + } + }, + "HOMEPAGE_MESSAGE" : { + "UPDATE_TITLE" : "Homepage message personalization", + "PORTAL_TITLE" : "Portal title", + "PORTAL_MESSAGE" : "Portal homepage message", + "PORTAL_MESSAGE_LENGTH" : "/500 characters max left" } } \ No newline at end of file diff --git a/ui/ui-frontend/projects/identity/src/assets/i18n/fr.json b/ui/ui-frontend/projects/identity/src/assets/i18n/fr.json index c7e318582..bd1098f90 100644 --- a/ui/ui-frontend/projects/identity/src/assets/i18n/fr.json +++ b/ui/ui-frontend/projects/identity/src/assets/i18n/fr.json @@ -1,4 +1,10 @@ { + "COMMON" : { + "CANCEL" : "Annuler", + "SUBMIT" : "Terminer", + "UPDATE" : "Modifier", + "APPLY_UPDATE" : "Appliquer les modifications " + }, "MISC" : { "NO_DESC": "Aucune description" }, @@ -6,6 +12,37 @@ "INVALID": "Couleur incorrecte", "TOO_LIGHT": "La couleur est trop claire.", "TOO_DARK": "La couleur est trop foncée.", - "INCOMPATIBLE": "Cette couleur ne sera pas compatible avec les normes d'accessibilité RGAA." + "INCOMPATIBLE": "Cette couleur ne sera pas compatible avec les normes d'accessibilité RGAA.", + "TERTIARY": "Couleur tertiaire", + "HEADER_FOOTER": "Couleur header/footer", + "BACKGROUND": "Couleur background" + }, + "GRAPHIC_IDENTITY" : { + "TOGGLE_TITLE" : "Identité graphique personnalisée", + "COLOR_TITLE" :"Paramètrage des couleurs", + "LOGO_TITLE" :"Gestion des logos", + "LOGO_HEADER_TITLE" :"Logo d'entête", + "LOGO_FOOTER_TITLE" :"Logo pied de page", + "LOGO_PORTAL_TITLE" :"Logo du portail", + "LOGO_DROP":"Déposez votre logo", + "LOGO_ATTACH":"Joindre un logo", + "TERTIARY_COLOR_SHOW":"Afficher la couleur tertiaire", + "TERTIARY_COLOR_HIDE":"Ne pas afficher la couleur tertiaire", + "SUBMIT":"Appliquer la charte graphique" + }, + "CUSTOMER" : { + "TAB" : { + "INFORMATION" : "Informations", + "SSO" : "SSO", + "GRAPHIC_ID" :"ID. graphique", + "HOMEPAGE_MESSAGE" : "Message d'accueil", + "HISTORY" : "Historique" + } + }, + "HOMEPAGE_MESSAGE" : { + "UPDATE_TITLE" : "Personnalisation du message d'accueil", + "PORTAL_TITLE" : "Titre du portail", + "PORTAL_MESSAGE" : "Message d'accueil du portail", + "PORTAL_MESSAGE_LENGTH" : "/500 caractères max restants" } } \ No newline at end of file diff --git a/ui/ui-frontend/projects/ingest/src/app/core/api/ingest-api.service.spec.ts b/ui/ui-frontend/projects/ingest/src/app/core/api/ingest-api.service.spec.ts index 4c43f7b00..40b6848c6 100644 --- a/ui/ui-frontend/projects/ingest/src/app/core/api/ingest-api.service.spec.ts +++ b/ui/ui-frontend/projects/ingest/src/app/core/api/ingest-api.service.spec.ts @@ -18,7 +18,7 @@ describe('IngestApiService', () => { ] })); it('should be created', () => { - const service: IngestApiService = TestBed.get(IngestApiService); + const service: IngestApiService = TestBed.inject(IngestApiService); expect(service).toBeTruthy(); }); }); diff --git a/ui/ui-frontend/projects/portal/src/assets/i18n/en.json b/ui/ui-frontend/projects/portal/src/assets/i18n/en.json index 94962530e..cb2af50b9 100644 --- a/ui/ui-frontend/projects/portal/src/assets/i18n/en.json +++ b/ui/ui-frontend/projects/portal/src/assets/i18n/en.json @@ -5,6 +5,7 @@ "users": "User", "referential": "Referential", "opaudit": "Audits & operations", - "techadmin": "Technical administration" + "techadmin": "Technical administration", + "lastusedapps": "Lastly used" } } diff --git a/ui/ui-frontend/projects/portal/src/assets/i18n/fr.json b/ui/ui-frontend/projects/portal/src/assets/i18n/fr.json index d165daf11..130bc83b0 100644 --- a/ui/ui-frontend/projects/portal/src/assets/i18n/fr.json +++ b/ui/ui-frontend/projects/portal/src/assets/i18n/fr.json @@ -5,6 +5,7 @@ "users": "Utilisateur", "referential": "Référentiels", "opaudit": "Audits et opérations", - "techadmin": "Administration technique" + "techadmin": "Administration technique", + "lastusedapps": "Dernières utilisées" } } diff --git a/ui/ui-frontend/projects/referential/src/app/access-contract/access-contract-create/access-contract-create.component.spec.ts b/ui/ui-frontend/projects/referential/src/app/access-contract/access-contract-create/access-contract-create.component.spec.ts index 2b970349d..a98b53fc0 100644 --- a/ui/ui-frontend/projects/referential/src/app/access-contract/access-contract-create/access-contract-create.component.spec.ts +++ b/ui/ui-frontend/projects/referential/src/app/access-contract/access-contract-create/access-contract-create.component.spec.ts @@ -200,24 +200,24 @@ describe('AccessContractCreateComponent', () => { describe('Component', () => { it('should call dialogRef.close', () => { - const matDialogRef = TestBed.get(MatDialogRef); + const matDialogRef = TestBed.inject(MatDialogRef); component.onCancel(); - expect(matDialogRef.close.calls.count()).toBe(1); + expect(matDialogRef.close).toHaveBeenCalledTimes(1); }); it('should not call create()', () => { - const accessContractService = TestBed.get(AccessContractService); + const accessContractService = TestBed.inject(AccessContractService); component.onSubmit(); - expect(accessContractService.create.calls.count()).toBe(0); + expect(accessContractService.create).toHaveBeenCalledTimes(0); }); it('should call create()', () => { - const accessContractService = TestBed.get(AccessContractService); - const matDialogRef = TestBed.get(MatDialogRef); + const accessContractService = TestBed.inject(AccessContractService); + const matDialogRef = TestBed.inject(MatDialogRef); component.form.setValue(expectedAccessContract); component.onSubmit(); - expect(accessContractService.create.calls.count()).toBe(1); - expect(matDialogRef.close.calls.count()).toBe(1); + expect(accessContractService.create).toHaveBeenCalledTimes(1); + expect(matDialogRef.close).toHaveBeenCalledTimes(1); }); }); diff --git a/ui/ui-frontend/projects/referential/src/app/agency/agency-create/agency-create.component.spec.ts b/ui/ui-frontend/projects/referential/src/app/agency/agency-create/agency-create.component.spec.ts index 0d8fab5fd..74039716e 100644 --- a/ui/ui-frontend/projects/referential/src/app/agency/agency-create/agency-create.component.spec.ts +++ b/ui/ui-frontend/projects/referential/src/app/agency/agency-create/agency-create.component.spec.ts @@ -174,24 +174,24 @@ describe('AgencyCreateComponent', () => { describe('Component', () => { it('should call dialogRef.close', () => { - const matDialogRef = TestBed.get(MatDialogRef); + const matDialogRef = TestBed.inject(MatDialogRef); component.onCancel(); - expect(matDialogRef.close.calls.count()).toBe(1); + expect(matDialogRef.close).toHaveBeenCalledTimes(1); }); it('should not call create()', () => { - const agencyService = TestBed.get(AgencyService); + const agencyService = TestBed.inject(AgencyService); component.onSubmit(); - expect(agencyService.create.calls.count()).toBe(0); + expect(agencyService.create).toHaveBeenCalledTimes(0); }); it('should call create()', () => { - const agencyService = TestBed.get(AgencyService); - const matDialogRef = TestBed.get(MatDialogRef); + const agencyService = TestBed.inject(AgencyService); + const matDialogRef = TestBed.inject(MatDialogRef); component.form.setValue(expectedAgency); component.onSubmit(); - expect(agencyService.create.calls.count()).toBe(1); - expect(matDialogRef.close.calls.count()).toBe(1); + expect(agencyService.create).toHaveBeenCalledTimes(1); + expect(matDialogRef.close).toHaveBeenCalledTimes(1); }); }); diff --git a/ui/ui-frontend/projects/referential/src/app/agency/agency.component.spec.ts b/ui/ui-frontend/projects/referential/src/app/agency/agency.component.spec.ts index 236f13afd..52c125d30 100644 --- a/ui/ui-frontend/projects/referential/src/app/agency/agency.component.spec.ts +++ b/ui/ui-frontend/projects/referential/src/app/agency/agency.component.spec.ts @@ -1,6 +1,7 @@ import {Component, CUSTOM_ELEMENTS_SCHEMA, Input} from '@angular/core'; -import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; +import {ComponentFixture, TestBed, waitForAsync} from '@angular/core/testing'; import {MatDialogModule} from '@angular/material/dialog'; +import {MatMenuModule} from '@angular/material/menu'; import {MatSidenavModule} from '@angular/material/sidenav'; import {RouterTestingModule} from '@angular/router/testing'; import {InjectorModule, LoggerModule} from 'ui-frontend-common'; @@ -9,7 +10,7 @@ import {VitamUICommonTestModule} from 'ui-frontend-common/testing'; import {NoopAnimationsModule} from '@angular/platform-browser/animations'; import {AgencyComponent} from './agency.component'; import {AgencyService} from './agency.service'; -import { MatMenuModule } from '@angular/material/menu'; + @Component({selector: 'app-agency-preview', template: ''}) // tslint:disable-next-line:component-class-suffix diff --git a/ui/ui-frontend/projects/referential/src/app/context/context-create/context-create.component.spec.ts b/ui/ui-frontend/projects/referential/src/app/context/context-create/context-create.component.spec.ts index c9f499c1e..c105f1be8 100644 --- a/ui/ui-frontend/projects/referential/src/app/context/context-create/context-create.component.spec.ts +++ b/ui/ui-frontend/projects/referential/src/app/context/context-create/context-create.component.spec.ts @@ -261,24 +261,24 @@ xdescribe('ContextCreateComponent', () => { describe('Component', () => { it('should call dialogRef.close', () => { - const matDialogRef = TestBed.get(MatDialogRef); + const matDialogRef = TestBed.inject(MatDialogRef); component.onCancel(); - expect(matDialogRef.close.calls.count()).toBe(1); + expect(matDialogRef.close).toHaveBeenCalledTimes(1); }); it('should not call create()', () => { - const contextService = TestBed.get(ContextService); + const contextService = TestBed.inject(ContextService); component.onSubmit(); - expect(contextService.create.calls.count()).toBe(0); + expect(contextService.create).toHaveBeenCalledTimes(0); }); it('should call create()', () => { - const contextService = TestBed.get(ContextService); - const matDialogRef = TestBed.get(MatDialogRef); + const contextService = TestBed.inject(ContextService); + const matDialogRef = TestBed.inject(MatDialogRef); component.form.setValue(expectedContext); component.onSubmit(); - expect(contextService.create.calls.count()).toBe(1); - expect(matDialogRef.close.calls.count()).toBe(1); + expect(contextService.create).toHaveBeenCalledTimes(1); + expect(matDialogRef.close).toHaveBeenCalledTimes(1); }); }); diff --git a/ui/ui-frontend/projects/referential/src/app/core/api/access-contract-api.service.spec.ts b/ui/ui-frontend/projects/referential/src/app/core/api/access-contract-api.service.spec.ts index e0155d58d..24bac49e5 100644 --- a/ui/ui-frontend/projects/referential/src/app/core/api/access-contract-api.service.spec.ts +++ b/ui/ui-frontend/projects/referential/src/app/core/api/access-contract-api.service.spec.ts @@ -54,7 +54,7 @@ describe('AccessContractApiService', () => { })); it('should be created', () => { - const service: AccessContractApiService = TestBed.get(AccessContractApiService); + const service: AccessContractApiService = TestBed.inject(AccessContractApiService); expect(service).toBeTruthy(); }); }); diff --git a/ui/ui-frontend/projects/referential/src/app/core/api/accession-register-api.service.spec.ts b/ui/ui-frontend/projects/referential/src/app/core/api/accession-register-api.service.spec.ts index 257c1ca94..fdac99190 100644 --- a/ui/ui-frontend/projects/referential/src/app/core/api/accession-register-api.service.spec.ts +++ b/ui/ui-frontend/projects/referential/src/app/core/api/accession-register-api.service.spec.ts @@ -19,7 +19,7 @@ describe('AccessionRegisterApiService', () => { })); it('should be created', () => { - const service: AccessionRegisterApiService = TestBed.get(AccessionRegisterApiService); + const service: AccessionRegisterApiService = TestBed.inject(AccessionRegisterApiService); expect(service).toBeTruthy(); }); }); diff --git a/ui/ui-frontend/projects/referential/src/app/core/api/agency-api.service.spec.ts b/ui/ui-frontend/projects/referential/src/app/core/api/agency-api.service.spec.ts index a8fd09152..6195d74a4 100644 --- a/ui/ui-frontend/projects/referential/src/app/core/api/agency-api.service.spec.ts +++ b/ui/ui-frontend/projects/referential/src/app/core/api/agency-api.service.spec.ts @@ -54,7 +54,7 @@ describe('AgencyApiService', () => { })); it('should be created', () => { - const service: AgencyApiService = TestBed.get(AgencyApiService); + const service: AgencyApiService = TestBed.inject(AgencyApiService); expect(service).toBeTruthy(); }); }); diff --git a/ui/ui-frontend/projects/referential/src/app/core/api/context-api.service.spec.ts b/ui/ui-frontend/projects/referential/src/app/core/api/context-api.service.spec.ts index a8fd09152..6195d74a4 100644 --- a/ui/ui-frontend/projects/referential/src/app/core/api/context-api.service.spec.ts +++ b/ui/ui-frontend/projects/referential/src/app/core/api/context-api.service.spec.ts @@ -54,7 +54,7 @@ describe('AgencyApiService', () => { })); it('should be created', () => { - const service: AgencyApiService = TestBed.get(AgencyApiService); + const service: AgencyApiService = TestBed.inject(AgencyApiService); expect(service).toBeTruthy(); }); }); diff --git a/ui/ui-frontend/projects/referential/src/app/core/api/ingest-contract-api.service.spec.ts b/ui/ui-frontend/projects/referential/src/app/core/api/ingest-contract-api.service.spec.ts index e65e32ab8..53effcd94 100644 --- a/ui/ui-frontend/projects/referential/src/app/core/api/ingest-contract-api.service.spec.ts +++ b/ui/ui-frontend/projects/referential/src/app/core/api/ingest-contract-api.service.spec.ts @@ -19,7 +19,7 @@ describe('IngestContractApiService', () => { })); it('should be created', () => { - const service: IngestContractApiService = TestBed.get(IngestContractApiService); + const service: IngestContractApiService = TestBed.inject(IngestContractApiService); expect(service).toBeTruthy(); }); }); diff --git a/ui/ui-frontend/projects/referential/src/app/core/api/ontology-api.service.spec.ts b/ui/ui-frontend/projects/referential/src/app/core/api/ontology-api.service.spec.ts index 8d6e3ecc8..0b6a19c11 100644 --- a/ui/ui-frontend/projects/referential/src/app/core/api/ontology-api.service.spec.ts +++ b/ui/ui-frontend/projects/referential/src/app/core/api/ontology-api.service.spec.ts @@ -54,7 +54,7 @@ describe('OntologyApiService', () => { })); it('should be created', () => { - const service: OntologyApiService = TestBed.get(OntologyApiService); + const service: OntologyApiService = TestBed.inject(OntologyApiService); expect(service).toBeTruthy(); }); }); diff --git a/ui/ui-frontend/projects/referential/src/app/core/api/operation-api.service.spec.ts b/ui/ui-frontend/projects/referential/src/app/core/api/operation-api.service.spec.ts index bd5886040..594d9ee23 100644 --- a/ui/ui-frontend/projects/referential/src/app/core/api/operation-api.service.spec.ts +++ b/ui/ui-frontend/projects/referential/src/app/core/api/operation-api.service.spec.ts @@ -19,7 +19,7 @@ describe('OperationApiService', () => { })); it('should be created', () => { - const service: OperationApiService = TestBed.get(OperationApiService); + const service: OperationApiService = TestBed.inject(OperationApiService); expect(service).toBeTruthy(); }); }); diff --git a/ui/ui-frontend/projects/referential/src/app/core/api/referential-import-api.service.spec.ts b/ui/ui-frontend/projects/referential/src/app/core/api/referential-import-api.service.spec.ts index a4888e1cb..e3a31b9b4 100644 --- a/ui/ui-frontend/projects/referential/src/app/core/api/referential-import-api.service.spec.ts +++ b/ui/ui-frontend/projects/referential/src/app/core/api/referential-import-api.service.spec.ts @@ -55,7 +55,7 @@ describe('ReferentialImportApiService', () => { })); it('should be created', () => { - const service: ReferentialImportApiService = TestBed.get(ReferentialImportApiService); + const service: ReferentialImportApiService = TestBed.inject(ReferentialImportApiService); expect(service).toBeTruthy(); }); }); diff --git a/ui/ui-frontend/projects/referential/src/app/core/api/security-profile-api.service.spec.ts b/ui/ui-frontend/projects/referential/src/app/core/api/security-profile-api.service.spec.ts index a8fd09152..6195d74a4 100644 --- a/ui/ui-frontend/projects/referential/src/app/core/api/security-profile-api.service.spec.ts +++ b/ui/ui-frontend/projects/referential/src/app/core/api/security-profile-api.service.spec.ts @@ -54,7 +54,7 @@ describe('AgencyApiService', () => { })); it('should be created', () => { - const service: AgencyApiService = TestBed.get(AgencyApiService); + const service: AgencyApiService = TestBed.inject(AgencyApiService); expect(service).toBeTruthy(); }); }); diff --git a/ui/ui-frontend/projects/referential/src/app/file-format/file-format-create/file-format-create.component.spec.ts b/ui/ui-frontend/projects/referential/src/app/file-format/file-format-create/file-format-create.component.spec.ts index 9c5d9a0f6..511859f0d 100644 --- a/ui/ui-frontend/projects/referential/src/app/file-format/file-format-create/file-format-create.component.spec.ts +++ b/ui/ui-frontend/projects/referential/src/app/file-format/file-format-create/file-format-create.component.spec.ts @@ -180,24 +180,24 @@ describe('FileFormatCreateComponent', () => { describe('Component', () => { it('should call dialogRef.close', () => { - const matDialogRef = TestBed.get(MatDialogRef); + const matDialogRef = TestBed.inject(MatDialogRef); component.onCancel(); - expect(matDialogRef.close.calls.count()).toBe(1); + expect(matDialogRef.close).toHaveBeenCalledTimes(1); }); it('should not call create()', () => { - const fileFormatService = TestBed.get(FileFormatService); + const fileFormatService = TestBed.inject(FileFormatService); component.onSubmit(); - expect(fileFormatService.create.calls.count()).toBe(0); + expect(fileFormatService.create).toHaveBeenCalledTimes(0); }); it('should call create()', () => { - const fileFormatService = TestBed.get(FileFormatService); - const matDialogRef = TestBed.get(MatDialogRef); + const fileFormatService = TestBed.inject(FileFormatService); + const matDialogRef = TestBed.inject(MatDialogRef); component.form.setValue(expectedFileFormat); component.onSubmit(); - expect(fileFormatService.create.calls.count()).toBe(1); - expect(matDialogRef.close.calls.count()).toBe(1); + expect(fileFormatService.create).toHaveBeenCalledTimes(1); + expect(matDialogRef.close).toHaveBeenCalledTimes(1); }); }); diff --git a/ui/ui-frontend/projects/referential/src/app/logbook-operation/logbook-search.service.spec.ts b/ui/ui-frontend/projects/referential/src/app/logbook-operation/logbook-search.service.spec.ts index be366cab6..1227d8cc1 100644 --- a/ui/ui-frontend/projects/referential/src/app/logbook-operation/logbook-search.service.spec.ts +++ b/ui/ui-frontend/projects/referential/src/app/logbook-operation/logbook-search.service.spec.ts @@ -52,7 +52,7 @@ describe('LogbookSearchService', () => { })); it('should be created', () => { - const service: LogbookSearchService = TestBed.get(LogbookSearchService); + const service: LogbookSearchService = TestBed.inject(LogbookSearchService); expect(service).toBeTruthy(); }); }); diff --git a/ui/ui-frontend/projects/referential/src/app/ontology/ontology-create/ontology-create.component.spec.ts b/ui/ui-frontend/projects/referential/src/app/ontology/ontology-create/ontology-create.component.spec.ts index 1b19f0043..89439e8e2 100644 --- a/ui/ui-frontend/projects/referential/src/app/ontology/ontology-create/ontology-create.component.spec.ts +++ b/ui/ui-frontend/projects/referential/src/app/ontology/ontology-create/ontology-create.component.spec.ts @@ -192,24 +192,24 @@ xdescribe('OntologyCreateComponent', () => { describe('Component', () => { it('should call dialogRef.close', () => { - const matDialogRef = TestBed.get(MatDialogRef); + const matDialogRef = TestBed.inject(MatDialogRef); component.onCancel(); - expect(matDialogRef.close.calls.count()).toBe(1); + expect(matDialogRef.close).toHaveBeenCalledTimes(1); }); it('should not call create()', () => { - const customerService = TestBed.get(OntologyService); + const customerService = TestBed.inject(OntologyService); component.onSubmit(); - expect(customerService.create.calls.count()).toBe(0); + expect(customerService.create).toHaveBeenCalledTimes(0); }); it('should call create()', () => { - const customerService = TestBed.get(OntologyService); - const matDialogRef = TestBed.get(MatDialogRef); + const customerService = TestBed.inject(OntologyService); + const matDialogRef = TestBed.inject(MatDialogRef); component.form.setValue(expectedOntology); component.onSubmit(); - expect(customerService.create.calls.count()).toBe(1); - expect(matDialogRef.close.calls.count()).toBe(1); + expect(customerService.create).toHaveBeenCalledTimes(1); + expect(matDialogRef.close).toHaveBeenCalledTimes(1); }); }); diff --git a/ui/ui-frontend/projects/referential/src/app/rule/rule-create/rule-create.component.spec.ts b/ui/ui-frontend/projects/referential/src/app/rule/rule-create/rule-create.component.spec.ts index 06412f1a1..e0c9e7245 100644 --- a/ui/ui-frontend/projects/referential/src/app/rule/rule-create/rule-create.component.spec.ts +++ b/ui/ui-frontend/projects/referential/src/app/rule/rule-create/rule-create.component.spec.ts @@ -36,7 +36,7 @@ */ /* tslint:disable: max-classes-per-file directive-selector */ import {NO_ERRORS_SCHEMA} from '@angular/core'; -import {waitForAsync, ComponentFixture, TestBed} from '@angular/core/testing'; +import {ComponentFixture, TestBed, waitForAsync} from '@angular/core/testing'; import {ReactiveFormsModule} from '@angular/forms'; import {MatButtonToggleModule} from '@angular/material/button-toggle'; import {MAT_DIALOG_DATA, MatDialogModule, MatDialogRef} from '@angular/material/dialog'; @@ -200,24 +200,24 @@ describe('RuleCreateComponent', () => { describe('Component', () => { it('should call dialogRef.close', () => { - const matDialogRef = TestBed.get(MatDialogRef); + const matDialogRef = TestBed.inject(MatDialogRef); component.onCancel(); - expect(matDialogRef.close.calls.count()).toBe(1); + expect(matDialogRef.close).toHaveBeenCalledTimes(1); }); it('should not call create()', () => { - const ruleService = TestBed.get(RuleService); + const ruleService = TestBed.inject(RuleService); component.onSubmit(); - expect(ruleService.create.calls.count()).toBe(0); + expect(ruleService.create).toHaveBeenCalledTimes(0); }); it('should call create()', () => { - const ruleService = TestBed.get(RuleService); - const matDialogRef = TestBed.get(MatDialogRef); + const ruleService = TestBed.inject(RuleService); + const matDialogRef = TestBed.inject(MatDialogRef); component.form.setValue(expectedRule); component.onSubmit(); - expect(ruleService.create.calls.count()).toBe(1); - expect(matDialogRef.close.calls.count()).toBe(1); + expect(ruleService.create).toHaveBeenCalledTimes(1); + expect(matDialogRef.close).toHaveBeenCalledTimes(1); }); }); diff --git a/ui/ui-frontend/projects/referential/src/app/rule/rule-create/rule-create.component.ts b/ui/ui-frontend/projects/referential/src/app/rule/rule-create/rule-create.component.ts index 3051661b9..6a1235dff 100644 --- a/ui/ui-frontend/projects/referential/src/app/rule/rule-create/rule-create.component.ts +++ b/ui/ui-frontend/projects/referential/src/app/rule/rule-create/rule-create.component.ts @@ -42,7 +42,7 @@ import {Subscription} from 'rxjs'; import {ConfirmDialogService} from 'ui-frontend-common'; import {RuleService} from '../rule.service'; -import {RULE_TYPES, RULE_MEASUREMENTS} from '../rules.constants'; +import {RULE_MEASUREMENTS, RULE_TYPES} from '../rules.constants'; import {RuleCreateValidators} from './rule-create.validators'; const PROGRESS_BAR_MULTIPLICATOR = 100; diff --git a/ui/ui-frontend/projects/referential/src/app/rule/rule-list/rule-list.component.spec.ts b/ui/ui-frontend/projects/referential/src/app/rule/rule-list/rule-list.component.spec.ts index ae233d145..ea9458ad1 100644 --- a/ui/ui-frontend/projects/referential/src/app/rule/rule-list/rule-list.component.spec.ts +++ b/ui/ui-frontend/projects/referential/src/app/rule/rule-list/rule-list.component.spec.ts @@ -1,12 +1,12 @@ import {ComponentFixture, TestBed, waitForAsync} from '@angular/core/testing'; import {NO_ERRORS_SCHEMA} from '@angular/core'; +import { MatDialog } from '@angular/material/dialog'; import {Rule} from 'projects/vitamui-library/src/public-api'; import {of} from 'rxjs'; import {AuthService, BASE_URL, VitamUISnackBar} from 'ui-frontend-common'; import {RuleService} from '../rule.service'; import {RuleListComponent} from './rule-list.component'; -import { MatDialog } from '@angular/material/dialog'; describe('RuleListComponent', () => { diff --git a/ui/ui-frontend/projects/referential/src/app/rule/rule-list/rule-list.component.ts b/ui/ui-frontend/projects/referential/src/app/rule/rule-list/rule-list.component.ts index f91b29989..61c9810e8 100644 --- a/ui/ui-frontend/projects/referential/src/app/rule/rule-list/rule-list.component.ts +++ b/ui/ui-frontend/projects/referential/src/app/rule/rule-list/rule-list.component.ts @@ -64,7 +64,7 @@ import { } from 'ui-frontend-common'; import {VitamUISnackBarComponent} from '../../shared/vitamui-snack-bar'; import {RuleService} from '../rule.service'; -import {RULE_TYPES, RULE_MEASUREMENTS} from '../rules.constants'; +import {RULE_MEASUREMENTS, RULE_TYPES} from '../rules.constants'; const FILTER_DEBOUNCE_TIME_MS = 400; @@ -187,8 +187,8 @@ export class RuleListComponent extends InfiniteScrollTable<Rule> implements OnDe this.orderChange.next(); } - getRuleType(input: String) { - var result = this.ruleTypes.find(x => x.key.toLowerCase() === input.toLowerCase()); + getRuleType(input: string) { + const result = this.ruleTypes.find(x => x.key.toLowerCase() === input.toLowerCase()); if (result) { return result.label; } else { @@ -196,8 +196,8 @@ export class RuleListComponent extends InfiniteScrollTable<Rule> implements OnDe } } - getRuleMeasurement(input: String) { - var result = this.ruleMeasurements.find(x => x.key.toLowerCase() === input.toLowerCase()); + getRuleMeasurement(input: string) { + const result = this.ruleMeasurements.find(x => x.key.toLowerCase() === input.toLowerCase()); if (result) { return result.label; } else { diff --git a/ui/ui-frontend/projects/referential/src/app/rule/rule-preview/rule-information-tab/rule-information-tab.component.spec.ts b/ui/ui-frontend/projects/referential/src/app/rule/rule-preview/rule-information-tab/rule-information-tab.component.spec.ts index 879c25b5f..de8eb681c 100644 --- a/ui/ui-frontend/projects/referential/src/app/rule/rule-preview/rule-information-tab/rule-information-tab.component.spec.ts +++ b/ui/ui-frontend/projects/referential/src/app/rule/rule-preview/rule-information-tab/rule-information-tab.component.spec.ts @@ -34,7 +34,7 @@ * The fact that you are presently reading this means that you have had * knowledge of the CeCILL-C license and that you accept its terms. */ -import {waitForAsync, ComponentFixture, TestBed} from '@angular/core/testing'; +import {ComponentFixture, TestBed, waitForAsync} from '@angular/core/testing'; import {NO_ERRORS_SCHEMA} from '@angular/core'; import {FormBuilder} from '@angular/forms'; diff --git a/ui/ui-frontend/projects/referential/src/app/rule/rule-preview/rule-information-tab/rule-information-tab.component.ts b/ui/ui-frontend/projects/referential/src/app/rule/rule-preview/rule-information-tab/rule-information-tab.component.ts index a99b77855..5d5ab258b 100644 --- a/ui/ui-frontend/projects/referential/src/app/rule/rule-preview/rule-information-tab/rule-information-tab.component.ts +++ b/ui/ui-frontend/projects/referential/src/app/rule/rule-preview/rule-information-tab/rule-information-tab.component.ts @@ -41,8 +41,8 @@ import {Observable, of} from 'rxjs'; import {catchError, filter, map, switchMap} from 'rxjs/operators'; import {diff} from 'ui-frontend-common'; import {extend, isEmpty} from 'underscore'; -import {RULE_TYPES, RULE_MEASUREMENTS} from '../../rules.constants'; import {RuleService} from '../../rule.service'; +import {RULE_MEASUREMENTS, RULE_TYPES} from '../../rules.constants'; @Component({ @@ -105,7 +105,7 @@ export class RuleInformationTabComponent { unchanged(): boolean { if (this.previousValue().ruleDescription === undefined && this.form.getRawValue().ruleDescription != null) { - this.previousValue().ruleDescription = ""; + this.previousValue().ruleDescription = ''; } const unchanged = JSON.stringify(diff(this.form.getRawValue(), this.previousValue())) === '{}'; this.updated.emit(!unchanged); diff --git a/ui/ui-frontend/projects/referential/src/app/rule/rule-preview/rule-preview.component.spec.ts b/ui/ui-frontend/projects/referential/src/app/rule/rule-preview/rule-preview.component.spec.ts index c7a8e59ed..326100b1b 100644 --- a/ui/ui-frontend/projects/referential/src/app/rule/rule-preview/rule-preview.component.spec.ts +++ b/ui/ui-frontend/projects/referential/src/app/rule/rule-preview/rule-preview.component.spec.ts @@ -34,12 +34,12 @@ * The fact that you are presently reading this means that you have had * knowledge of the CeCILL-C license and that you accept its terms. */ -import {waitForAsync, ComponentFixture, TestBed} from '@angular/core/testing'; +import {ComponentFixture, TestBed, waitForAsync} from '@angular/core/testing'; import {CUSTOM_ELEMENTS_SCHEMA} from '@angular/core'; +import { MatDialog } from '@angular/material/dialog'; import {RuleService} from '../rule.service'; import {RulePreviewComponent} from './rule-preview.component'; -import { MatDialog } from '@angular/material/dialog'; describe('RulePreviewComponent', () => { let component: RulePreviewComponent; diff --git a/ui/ui-frontend/projects/referential/src/app/rule/rule.component.spec.ts b/ui/ui-frontend/projects/referential/src/app/rule/rule.component.spec.ts index a7b15b94c..3113798c4 100644 --- a/ui/ui-frontend/projects/referential/src/app/rule/rule.component.spec.ts +++ b/ui/ui-frontend/projects/referential/src/app/rule/rule.component.spec.ts @@ -1,4 +1,4 @@ -import {waitForAsync, ComponentFixture, TestBed} from '@angular/core/testing'; +import {ComponentFixture, TestBed, waitForAsync} from '@angular/core/testing'; import {HttpClientTestingModule} from '@angular/common/http/testing'; import { Component, Input } from '@angular/core'; @@ -10,18 +10,20 @@ import {RouterTestingModule} from '@angular/router/testing'; import {EMPTY, of} from 'rxjs'; // tslint:disable-next-line: max-line-length import {ApplicationService, AuthService, BASE_URL, ENVIRONMENT, GlobalEventService, HistoryModule, InjectorModule, LoggerModule, SearchBarModule, VitamUISnackBar} from 'ui-frontend-common'; -import {VitamUICommonTestModule} from 'ui-frontend-common/testing'; + +import { MatDialogModule, MatDialogRef } from '@angular/material/dialog'; import {Rule} from '../../../../vitamui-library/src/lib/models/rule'; import {environment} from '../../environments/environment'; import {RuleComponent} from './rule.component'; + +import { MatOptionModule } from '@angular/material/core'; import { MatFormFieldModule } from '@angular/material/form-field'; import { MatMenuModule } from '@angular/material/menu'; -import { MatSidenavModule } from '@angular/material/sidenav'; import { MatProgressSpinnerModule } from '@angular/material/progress-spinner'; -import { MatTabsModule } from '@angular/material/tabs'; -import { MatOptionModule } from '@angular/material/core'; import { MatSelectModule } from '@angular/material/select'; -import { MatDialogModule, MatDialogRef } from '@angular/material/dialog'; +import { MatSidenavModule } from '@angular/material/sidenav'; +import { MatTabsModule } from '@angular/material/tabs'; +import {VitamUICommonTestModule} from 'ui-frontend-common/testing'; @Component({selector: 'app-rule-preview', template: ''}) // tslint:disable-next-line:component-class-suffix @@ -112,4 +114,4 @@ describe('RuleComponent', () => { it('should create', () => { expect(component).toBeTruthy(); }); -}); \ No newline at end of file +}); diff --git a/ui/ui-frontend/projects/referential/src/app/security-profile/security-profile-create/security-profile-create.component.spec.ts b/ui/ui-frontend/projects/referential/src/app/security-profile/security-profile-create/security-profile-create.component.spec.ts index c6f5c69ef..aa2c6b1b5 100644 --- a/ui/ui-frontend/projects/referential/src/app/security-profile/security-profile-create/security-profile-create.component.spec.ts +++ b/ui/ui-frontend/projects/referential/src/app/security-profile/security-profile-create/security-profile-create.component.spec.ts @@ -192,24 +192,24 @@ describe('CustomerCreateComponent', () => { describe('Component', () => { it('should call dialogRef.close', () => { - const matDialogRef = TestBed.get(MatDialogRef); + const matDialogRef = TestBed.inject(MatDialogRef); component.onCancel(); - expect(matDialogRef.close.calls.count()).toBe(1); + expect(matDialogRef.close).toHaveBeenCalledTimes(1); }); it('should not call create()', () => { - const securityProfileService = TestBed.get(SecurityProfileService); + const securityProfileService = TestBed.inject(SecurityProfileService); component.onSubmit(); - expect(securityProfileService.create.calls.count()).toBe(0); + expect(securityProfileService.create).toHaveBeenCalledTimes(0); }); it('should call create()', () => { - const securityProfileService = TestBed.get(SecurityProfileService); - const matDialogRef = TestBed.get(MatDialogRef); + const securityProfileService = TestBed.inject(SecurityProfileService); + const matDialogRef = TestBed.inject(MatDialogRef); component.form.setValue(expectedSecurityProfile); component.onSubmit(); - expect(securityProfileService.create.calls.count()).toBe(1); - expect(matDialogRef.close.calls.count()).toBe(1); + expect(securityProfileService.create).toHaveBeenCalledTimes(1); + expect(matDialogRef.close).toHaveBeenCalledTimes(1); }); }); diff --git a/ui/ui-frontend/projects/referential/src/app/shared/vitamui-import-dialog/vitamui-import-dialog.component.spec.ts b/ui/ui-frontend/projects/referential/src/app/shared/vitamui-import-dialog/vitamui-import-dialog.component.spec.ts index 813149b4a..907ae73d6 100644 --- a/ui/ui-frontend/projects/referential/src/app/shared/vitamui-import-dialog/vitamui-import-dialog.component.spec.ts +++ b/ui/ui-frontend/projects/referential/src/app/shared/vitamui-import-dialog/vitamui-import-dialog.component.spec.ts @@ -39,15 +39,15 @@ import {ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing' import { HttpClientTestingModule } from '@angular/common/http/testing'; // tslint:disable-next-line: max-line-length +import { MatOptionModule } from '@angular/material/core'; +import { MAT_DIALOG_DATA, MatDialogModule, MatDialogRef } from '@angular/material/dialog'; +import { MatMenuModule } from '@angular/material/menu'; import { MatProgressBarModule } from '@angular/material/progress-bar'; +import { MatSidenavModule } from '@angular/material/sidenav'; +import { MatSnackBarModule } from '@angular/material/snack-bar'; import { NoopAnimationsModule } from '@angular/platform-browser/animations'; import { BASE_URL, LoggerModule, VitamUICommonModule } from 'ui-frontend-common'; import { VitamUIImportDialogComponent } from './vitamui-import-dialog.component'; -import { MatSidenavModule } from '@angular/material/sidenav'; -import { MatSnackBarModule } from '@angular/material/snack-bar'; -import { MatDialogModule, MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog'; -import { MatMenuModule } from '@angular/material/menu'; -import { MatOptionModule } from '@angular/material/core'; describe('VitamUIImportDialogComponent', () => { let component: VitamUIImportDialogComponent; diff --git a/ui/ui-frontend/projects/referential/src/app/shared/vitamui-snack-bar/vitamui-snack-bar.service.ts b/ui/ui-frontend/projects/referential/src/app/shared/vitamui-snack-bar/vitamui-snack-bar.service.ts index 031f2042e..a0b83b355 100644 --- a/ui/ui-frontend/projects/referential/src/app/shared/vitamui-snack-bar/vitamui-snack-bar.service.ts +++ b/ui/ui-frontend/projects/referential/src/app/shared/vitamui-snack-bar/vitamui-snack-bar.service.ts @@ -40,7 +40,7 @@ import {LiveAnnouncer} from '@angular/cdk/a11y'; import {BreakpointObserver, Breakpoints} from '@angular/cdk/layout'; import {Overlay, OverlayConfig, OverlayRef} from '@angular/cdk/overlay'; -import {ComponentPortal, ComponentType, PortalInjector, TemplatePortal} from '@angular/cdk/portal'; +import {ComponentPortal, ComponentType, TemplatePortal} from '@angular/cdk/portal'; import { ComponentRef, EmbeddedViewRef, @@ -174,9 +174,10 @@ export class VitamUISnackBar { config: MatSnackBarConfig): MatSnackBarContainer { const userInjector = config && config.viewContainerRef && config.viewContainerRef.injector; - const injector = new PortalInjector(userInjector || this._injector, new WeakMap([ - [MatSnackBarConfig, config], - ])); + const injector = Injector.create({ + parent: userInjector || this._injector, + providers: [{provide: MatSnackBarConfig, useValue: config}] + }); const containerPortal = new ComponentPortal(MatSnackBarContainer, config.viewContainerRef, injector); @@ -312,13 +313,16 @@ export class VitamUISnackBar { */ private _createInjector<T>( config: MatSnackBarConfig, - snackBarRef: MatSnackBarRef<T>): PortalInjector { + snackBarRef: MatSnackBarRef<T>): Injector { const userInjector = config && config.viewContainerRef && config.viewContainerRef.injector; - return new PortalInjector(userInjector || this._injector, new WeakMap<any, any>([ - [MatSnackBarRef, snackBarRef], - [MAT_SNACK_BAR_DATA, config.data], - ])); + return Injector.create({ + parent: userInjector || this._injector, + providers: [ + {provide: MatSnackBarRef, useValue: snackBarRef}, + {provide: MAT_SNACK_BAR_DATA, useValue: config.data} + ] + }); } } diff --git a/ui/ui-frontend/projects/starter-kit/src/app/app-routing.module.ts b/ui/ui-frontend/projects/starter-kit/src/app/app-routing.module.ts index cae774f63..4fe74a41b 100644 --- a/ui/ui-frontend/projects/starter-kit/src/app/app-routing.module.ts +++ b/ui/ui-frontend/projects/starter-kit/src/app/app-routing.module.ts @@ -41,13 +41,13 @@ import { ApplicationId } from 'ui-frontend-common'; import { ArraysComponent } from './components/arrays/arrays.component'; import { BreadcrumbComponent } from './components/breadcrumb/breadcrumb.component'; import { ButtonsComponent } from './components/buttons/buttons.component'; +import { ColorsComponent } from './components/colors/colors.component'; +import { IconsComponent } from './components/icons/icons.component'; import { InputsComponent } from './components/inputs/inputs.component'; import { MiscellaneousComponent } from './components/miscellaneous/miscellaneous.component'; import { ProgressBarComponent } from './components/progress-bar/progress-bar.component'; import { TooltipComponent } from './components/tooltip/tooltip.component'; import { TypographyComponent } from './components/typography/typography.component'; -import { ColorsComponent } from './components/colors/colors.component'; -import { IconsComponent } from './components/icons/icons.component'; import { StarterKitComponent } from './starter-kit/starter-kit.component'; diff --git a/ui/ui-frontend/projects/starter-kit/src/app/app.module.ts b/ui/ui-frontend/projects/starter-kit/src/app/app.module.ts index 2c4a28d35..fe70ebf72 100644 --- a/ui/ui-frontend/projects/starter-kit/src/app/app.module.ts +++ b/ui/ui-frontend/projects/starter-kit/src/app/app.module.ts @@ -39,9 +39,9 @@ import { HttpClient } from '@angular/common/http'; import { default as localeFr } from '@angular/common/locales/fr'; import { LOCALE_ID, NgModule } from '@angular/core'; import { MatCardModule } from '@angular/material/card'; +import { MatDialogModule } from '@angular/material/dialog'; import { MatListModule } from '@angular/material/list'; import { MatSidenavModule } from '@angular/material/sidenav'; -import { MatDialogModule } from '@angular/material/dialog'; import { MatSnackBarModule } from '@angular/material/snack-bar'; import { BrowserModule, Title } from '@angular/platform-browser'; import { BrowserAnimationsModule } from '@angular/platform-browser/animations'; @@ -55,13 +55,13 @@ import { AppComponent } from './app.component'; import { ArraysModule } from './components/arrays/arrays.module'; import { BreadcrumbModule } from './components/breadcrumb/breadcrumb.module'; import { ButtonsModule } from './components/buttons/buttons.module'; +import { ColorsModule } from './components/colors/colors.module'; +import { IconsModule } from './components/icons/icons.module'; import { InputsModule } from './components/inputs/inputs.module'; import { MiscellaneousModule } from './components/miscellaneous/miscellaneous.module'; import { ProgressBarModule } from './components/progress-bar/progress-bar.module'; import { TooltipModule } from './components/tooltip/tooltip.module'; import { TypographyModule } from './components/typography/typography.module'; -import { ColorsModule } from './components/colors/colors.module'; -import { IconsModule } from './components/icons/icons.module'; import { StarterKitModule } from './starter-kit/starter-kit.module'; registerLocaleData(localeFr, 'fr'); diff --git a/ui/ui-frontend/projects/starter-kit/src/app/components/icons/icons.module.ts b/ui/ui-frontend/projects/starter-kit/src/app/components/icons/icons.module.ts index 35ed57b65..e326b7371 100644 --- a/ui/ui-frontend/projects/starter-kit/src/app/components/icons/icons.module.ts +++ b/ui/ui-frontend/projects/starter-kit/src/app/components/icons/icons.module.ts @@ -1,7 +1,7 @@ -import { NgModule } from '@angular/core'; import { CommonModule } from '@angular/common'; -import { IconsComponent } from './icons.component'; +import { NgModule } from '@angular/core'; import { VitamUICommonModule } from 'ui-frontend-common'; +import { IconsComponent } from './icons.component'; @@ -11,6 +11,6 @@ import { VitamUICommonModule } from 'ui-frontend-common'; CommonModule, VitamUICommonModule ], - exports:[IconsComponent] + exports: [IconsComponent] }) export class IconsModule { } diff --git a/ui/ui-frontend/projects/starter-kit/src/app/components/inputs/inputs.component.ts b/ui/ui-frontend/projects/starter-kit/src/app/components/inputs/inputs.component.ts index d0e046c18..03c380c52 100644 --- a/ui/ui-frontend/projects/starter-kit/src/app/components/inputs/inputs.component.ts +++ b/ui/ui-frontend/projects/starter-kit/src/app/components/inputs/inputs.component.ts @@ -16,14 +16,14 @@ export class InputsComponent implements OnInit { public emailFirstPart = new FormControl('azerty', [Validators.maxLength(25)]); public email = new FormControl('azerty@test.fr', [Validators.maxLength(25)]); public domain = new FormControl('test.fr', [Validators.maxLength(10)]); - public emails = new FormControl(["azerty@test.fr" ,"azerty@test2.com"], [Validators.maxLength(30)]); - public list = new FormControl(["azerty1" ,"azerty2"], [Validators.maxLength(30)]); + public emails = new FormControl(['azerty@test.fr' , 'azerty@test2.com'], [Validators.maxLength(30)]); + public list = new FormControl(['azerty1' , 'azerty2'], [Validators.maxLength(30)]); public country = new FormControl('FR', [Validators.maxLength(10)]); public textarea = new FormControl('name\naddress\ncity', [Validators.maxLength((25))]); public level = new FormControl('LEVEL', [Validators.maxLength((10))]); public toggle = new FormControl('Value 3'); - public duration = new FormControl( {days: 5, hours:10, minutes:5}); - public file = new FormControl( new File(['test'],"test",{type: 'text/plain'})); + public duration = new FormControl( {days: 5, hours: 10, minutes: 5}); + public file = new FormControl( new File(['test'], 'test', {type: 'text/plain'})); constructor() { } diff --git a/ui/ui-frontend/projects/starter-kit/src/app/components/typography/typography.module.ts b/ui/ui-frontend/projects/starter-kit/src/app/components/typography/typography.module.ts index df23b1e5e..bcc156e31 100644 --- a/ui/ui-frontend/projects/starter-kit/src/app/components/typography/typography.module.ts +++ b/ui/ui-frontend/projects/starter-kit/src/app/components/typography/typography.module.ts @@ -1,5 +1,5 @@ -import { NgModule } from '@angular/core'; import { CommonModule } from '@angular/common'; +import { NgModule } from '@angular/core'; import { TypographyComponent } from './typography.component'; @NgModule({ diff --git a/ui/ui-frontend/projects/starter-kit/src/assets/i18n/en.json b/ui/ui-frontend/projects/starter-kit/src/assets/i18n/en.json index 1dcc7b3fb..e3e13163a 100644 --- a/ui/ui-frontend/projects/starter-kit/src/assets/i18n/en.json +++ b/ui/ui-frontend/projects/starter-kit/src/assets/i18n/en.json @@ -12,7 +12,8 @@ "Disabled_label": "disabled", "Disabled_outline": "Outline disabled", "Disabled_contrast": "Contrast disabled", - "Disabled_contrast_outline": "Contrast outline disabled" + "Disabled_contrast_outline": "Contrast outline disabled", + "CANCEL":"Cancel" }, "SAMPLE-DIALOG": { "Open": "Open the sample dialog", @@ -28,6 +29,7 @@ "Green": "Color green" }, "ICONS":{ - "Title": "Vitam-UI icons list" + "Title": "Vitam-UI icons list", + "Colors": "Available colors" } } \ No newline at end of file diff --git a/ui/ui-frontend/projects/starter-kit/src/assets/i18n/fr.json b/ui/ui-frontend/projects/starter-kit/src/assets/i18n/fr.json index 88e576613..d45ad7cce 100644 --- a/ui/ui-frontend/projects/starter-kit/src/assets/i18n/fr.json +++ b/ui/ui-frontend/projects/starter-kit/src/assets/i18n/fr.json @@ -12,7 +12,8 @@ "Disabled_label": "désactivé", "Disabled_outline": "Contour désactivé", "Disabled_contrast": "Contraste désactivé", - "Disabled_contrast_outline": "Contour contrasté désactivé" + "Disabled_contrast_outline": "Contour contrasté désactivé", + "CANCEL":"Annuler" }, "SAMPLE-DIALOG": { "Open": "Ouvrir la popup d'exemple", @@ -28,6 +29,7 @@ "Green": "Couleur verte" }, "ICONS":{ - "Title": "Liste des icônes de Vitam-UI" + "Title": "Liste des icônes de Vitam-UI", + "Colors": "Couleurs disponibles" } } \ No newline at end of file diff --git a/ui/ui-frontend/projects/vitamui-library/src/lib/components/application-select-content/application-select-content.component.spec.ts b/ui/ui-frontend/projects/vitamui-library/src/lib/components/application-select-content/application-select-content.component.spec.ts index 7c0d6b099..90909a9b5 100644 --- a/ui/ui-frontend/projects/vitamui-library/src/lib/components/application-select-content/application-select-content.component.spec.ts +++ b/ui/ui-frontend/projects/vitamui-library/src/lib/components/application-select-content/application-select-content.component.spec.ts @@ -35,13 +35,12 @@ * knowledge of the CeCILL-C license and that you accept its terms. */ import {Component, Input} from '@angular/core'; -import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; - +import {ComponentFixture, TestBed, waitForAsync} from '@angular/core/testing'; +import {AuthService, WINDOW_LOCATION} from 'ui-frontend-common'; import {UpdatedApplicationSelectContentComponent} from './application-select-content.component'; -import {AuthService, WINDOW_LOCATION} from "ui-frontend-common"; @Component({ - selector: 'vitamui-common-menu-tile-updated', + selector: 'lib-vitamui-common-menu-tile-updated', template: '' }) class VitamUIMenuTileStubComponent { diff --git a/ui/ui-frontend/projects/vitamui-library/src/lib/components/card-group/card-group.component.spec.ts b/ui/ui-frontend/projects/vitamui-library/src/lib/components/card-group/card-group.component.spec.ts index 4d969346a..9add96f1c 100644 --- a/ui/ui-frontend/projects/vitamui-library/src/lib/components/card-group/card-group.component.spec.ts +++ b/ui/ui-frontend/projects/vitamui-library/src/lib/components/card-group/card-group.component.spec.ts @@ -1,8 +1,8 @@ import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; import {MatCard} from '@angular/material/card'; -import {CardGroupComponent} from './card-group.component'; import {CardComponent} from '../card/card.component'; +import {CardGroupComponent} from './card-group.component'; describe('CardGroupComponent', () => { let component: CardGroupComponent; diff --git a/ui/ui-frontend/projects/vitamui-library/src/lib/components/filing-plan/filing-plan.component.spec.ts b/ui/ui-frontend/projects/vitamui-library/src/lib/components/filing-plan/filing-plan.component.spec.ts index 5e7cc6cb5..681182061 100644 --- a/ui/ui-frontend/projects/vitamui-library/src/lib/components/filing-plan/filing-plan.component.spec.ts +++ b/ui/ui-frontend/projects/vitamui-library/src/lib/components/filing-plan/filing-plan.component.spec.ts @@ -3,14 +3,15 @@ import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; import {MatProgressSpinnerModule} from '@angular/material/progress-spinner'; import {MatTreeModule} from '@angular/material/tree'; import {EMPTY, of} from 'rxjs'; - import {AuthService} from 'ui-frontend-common'; +import {FileType} from '../../models/file-type.enum'; +import {Node} from '../../models/node.interface'; import {FilingPlanComponent} from './filing-plan.component'; import {FilingPlanMode, FilingPlanService} from './filing-plan.service'; -import {Node} from '../../models/node.interface'; -import {FileType} from "../../models/file-type.enum"; -@Component({selector: 'vitamui-library-node', template: ''}) + + +@Component({selector: 'lib-vitamui-library-node', template: ''}) class NodeStubComponent { @Input() tenantIdentifier: any; @Input() node: any; @@ -22,7 +23,7 @@ class NodeStubComponent { describe('FilingPlanComponent', () => { let component: FilingPlanComponent; let fixture: ComponentFixture<FilingPlanComponent>; - let fillingPlanStub = { + const fillingPlanStub = { tree$: of([]), expandChange$: EMPTY, loadTree: () => of([]) @@ -61,7 +62,7 @@ describe('FilingPlanComponent', () => { beforeEach(() => { const rootNode: Node = { id: 'rootId', - label: "RootNode", + label: 'RootNode', type: FileType.FOLDER_HOLDING, children: [], ingestContractIdentifier: 'string', @@ -74,7 +75,7 @@ describe('FilingPlanComponent', () => { const rootChildren: Node[] = [ { id: 'rootChild-1', - label: "RootChild 1", + label: 'RootChild 1', type: FileType.FOLDER_HOLDING, children: [], ingestContractIdentifier: 'string', @@ -84,7 +85,7 @@ describe('FilingPlanComponent', () => { disabledChild: false }, { id: 'rootChild-2', - label: "RootChild 2", + label: 'RootChild 2', type: FileType.FOLDER_HOLDING, children: [], ingestContractIdentifier: 'string', @@ -97,7 +98,7 @@ describe('FilingPlanComponent', () => { rootNode.children = rootChildren; rootChildren[0].children = [{ id: 'leaf-1', - label: "Leaf 1", + label: 'Leaf 1', type: FileType.FOLDER_HOLDING, children: [], ingestContractIdentifier: 'string', @@ -107,7 +108,7 @@ describe('FilingPlanComponent', () => { disabledChild: false }, { id: 'leaf-2', - label: "Leaf 2", + label: 'Leaf 2', type: FileType.FOLDER_HOLDING, children: [], ingestContractIdentifier: 'string', @@ -285,8 +286,10 @@ describe('FilingPlanComponent', () => { // Then: Check selected and all children checked (and children disabled) expect(nodes[0].children[0].checked && !nodes[0].children[0].disabled).toBeTruthy('Child 1 should be Checked and not Disabled'); - expect(nodes[0].children[0].children[0].checked && nodes[0].children[0].children[0].disabled).toBeTruthy('Leaf 1 should be Checked and Disabled'); - expect(nodes[0].children[0].children[1].checked && nodes[0].children[0].children[1].disabled).toBeTruthy('Leaf 2 should be Checked and Disabled'); + expect(nodes[0].children[0].children[0].checked && nodes[0].children[0].children[0].disabled) + .toBeTruthy('Leaf 1 should be Checked and Disabled'); + expect(nodes[0].children[0].children[1].checked && nodes[0].children[0].children[1].disabled) + .toBeTruthy('Leaf 2 should be Checked and Disabled'); // Then: Check sibling and parent nodes not checked nor disabled expect(!nodes[0].checked && !nodes[0].disabled).toBeTruthy('Root node should not be Checked nor Disabled'); @@ -306,8 +309,10 @@ describe('FilingPlanComponent', () => { // Then: Check selected and all children checked (and children disabled) expect(nodes[0].children[0].checked && !nodes[0].children[0].disabled).toBeTruthy('Child 1 should be Checked and not Disabled'); - expect(nodes[0].children[0].children[0].checked && nodes[0].children[0].children[0].disabled).toBeTruthy('Leaf 1 should be Checked and Disabled'); - expect(nodes[0].children[0].children[1].checked && nodes[0].children[0].children[1].disabled).toBeTruthy('Leaf 2 should be Checked and Disabled'); + expect(nodes[0].children[0].children[0].checked && nodes[0].children[0].children[0].disabled) + .toBeTruthy('Leaf 1 should be Checked and Disabled'); + expect(nodes[0].children[0].children[1].checked && nodes[0].children[0].children[1].disabled) + .toBeTruthy('Leaf 2 should be Checked and Disabled'); expect(nodes[0].children[1].checked && !nodes[0].children[1].disabled).toBeTruthy('Child 2 should be Checked and not Disabled'); // Then: Check sibling and parent nodes not checked nor disabled @@ -334,8 +339,10 @@ describe('FilingPlanComponent', () => { // Then: Check sibling and parent nodes not checked nor disabled expect(!nodes[0].checked && !nodes[0].disabled).toBeTruthy('Root node should not be Checked nor Disabled'); expect(!nodes[0].children[0].checked && !nodes[0].children[0].disabled).toBeTruthy('Child 1 should not be Checked nor Disabled'); - expect(!nodes[0].children[0].children[0].checked && !nodes[0].children[0].children[0].disabled).toBeTruthy('Leaf 1 should not be Checked nor Disabled'); - expect(!nodes[0].children[0].children[1].checked && !nodes[0].children[0].children[1].disabled).toBeTruthy('Leaf 2 should not be Checked nor Disabled'); + expect(!nodes[0].children[0].children[0].checked && !nodes[0].children[0].children[0].disabled) + .toBeTruthy('Leaf 1 should not be Checked nor Disabled'); + expect(!nodes[0].children[0].children[1].checked && !nodes[0].children[0].children[1].disabled) + .toBeTruthy('Leaf 2 should not be Checked nor Disabled'); // Then: Check selected nodes expect(component.selectedNodes.included.length).toBe(1, 'only 1 node should be included'); @@ -357,8 +364,10 @@ describe('FilingPlanComponent', () => { expect(nodes[0].checked && !nodes[0].disabled).toBeTruthy('Root node should be Checked and not Disabled'); expect(nodes[0].children[0].checked && nodes[0].children[0].disabled).toBeTruthy('Child 1 should be Checked and Disabled'); expect(nodes[0].children[1].checked && nodes[0].children[1].disabled).toBeTruthy('Child 2 should be Checked and Disabled'); - expect(nodes[0].children[0].children[0].checked && nodes[0].children[0].children[0].disabled).toBeTruthy('Leaf 1 should be Checked and Disabled'); - expect(nodes[0].children[0].children[1].checked && nodes[0].children[0].children[1].disabled).toBeTruthy('Leaf 2 should be Checked and Disabled'); + expect(nodes[0].children[0].children[0].checked && nodes[0].children[0].children[0].disabled) + .toBeTruthy('Leaf 1 should be Checked and Disabled'); + expect(nodes[0].children[0].children[1].checked && nodes[0].children[0].children[1].disabled) + .toBeTruthy('Leaf 2 should be Checked and Disabled'); // Then: Check selected nodes expect(component.selectedNodes.included.length).toBe(1, 'only 1 node should be included'); @@ -424,7 +433,7 @@ describe('FilingPlanComponent', () => { expect(component.selectedNodes.included.length).toBe(1, 'only 1 node should be included'); expect(component.selectedNodes.included[0]).toBe('rootChild-2', 'rootChild-2 should be included'); }); - }) + }); - }) + }); }); diff --git a/ui/ui-frontend/projects/vitamui-library/src/lib/components/filing-plan/filing-plan.service.spec.ts b/ui/ui-frontend/projects/vitamui-library/src/lib/components/filing-plan/filing-plan.service.spec.ts index 495c355d6..63de56061 100644 --- a/ui/ui-frontend/projects/vitamui-library/src/lib/components/filing-plan/filing-plan.service.spec.ts +++ b/ui/ui-frontend/projects/vitamui-library/src/lib/components/filing-plan/filing-plan.service.spec.ts @@ -5,9 +5,9 @@ import {BASE_URL} from 'ui-frontend-common'; import {HttpClientTestingModule, HttpTestingController} from '@angular/common/http/testing'; import {Type} from '@angular/core'; import {inject, TestBed} from '@angular/core/testing'; -import {FilingPlanService} from './filing-plan.service'; import {FileType, Node} from 'projects/vitamui-library/src/public-api'; -import {DescriptionLevel} from "../../models/description-level.enum"; +import {DescriptionLevel} from '../../models/description-level.enum'; +import {FilingPlanService} from './filing-plan.service'; describe('FilingPlanService', () => { let httpTestingController: HttpTestingController; @@ -24,7 +24,7 @@ describe('FilingPlanService', () => { ] }); - httpTestingController = TestBed.get(HttpTestingController as Type<HttpTestingController>); + httpTestingController = TestBed.inject(HttpTestingController as Type<HttpTestingController>); }); it('should be created', inject([FilingPlanService], (service: FilingPlanService) => { diff --git a/ui/ui-frontend/projects/vitamui-library/src/lib/components/filing-plan/node.component.spec.ts b/ui/ui-frontend/projects/vitamui-library/src/lib/components/filing-plan/node.component.spec.ts index 76daecac3..3c19536d4 100644 --- a/ui/ui-frontend/projects/vitamui-library/src/lib/components/filing-plan/node.component.spec.ts +++ b/ui/ui-frontend/projects/vitamui-library/src/lib/components/filing-plan/node.component.spec.ts @@ -1,8 +1,8 @@ import {NO_ERRORS_SCHEMA} from '@angular/core'; import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; -import {NodeComponent} from './node.component'; import {FileType} from '../../models/file-type.enum'; +import {NodeComponent} from './node.component'; describe('NodeComponent', () => { let component: NodeComponent; @@ -21,12 +21,12 @@ describe('NodeComponent', () => { fixture = TestBed.createComponent(NodeComponent); component = fixture.componentInstance; component.node = { - id: "id", - label: "label", + id: 'id', + label: 'label', type: FileType.FOLDER_INGEST, children: [], - ingestContractIdentifier: "IC", - vitamId: "vitamId", + ingestContractIdentifier: 'IC', + vitamId: 'vitamId', parents: [], checked: true }; diff --git a/ui/ui-frontend/projects/vitamui-library/src/lib/components/vitamui-menu-tile/vitamui-menu-tile.component.spec.ts b/ui/ui-frontend/projects/vitamui-library/src/lib/components/vitamui-menu-tile/vitamui-menu-tile.component.spec.ts index b6abc5f78..dfdc8073f 100644 --- a/ui/ui-frontend/projects/vitamui-library/src/lib/components/vitamui-menu-tile/vitamui-menu-tile.component.spec.ts +++ b/ui/ui-frontend/projects/vitamui-library/src/lib/components/vitamui-menu-tile/vitamui-menu-tile.component.spec.ts @@ -37,7 +37,6 @@ import {HttpClientTestingModule} from '@angular/common/http/testing'; import {Directive, Input, NO_ERRORS_SCHEMA} from '@angular/core'; import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; -import {UpdatedVitamUIMenuTileComponent} from './vitamui-menu-tile.component'; import { Application, ApplicationId, @@ -45,13 +44,14 @@ import { LoggerModule, StartupService, SUBROGRATION_REFRESH_RATE_MS -} from "ui-frontend-common"; +} from 'ui-frontend-common'; +import {UpdatedVitamUIMenuTileComponent} from './vitamui-menu-tile.component'; @Directive({ - selector: '[vitamuiCommonTooltip]', + selector: '[libVitamuiCommonTooltip]', }) class TooltipStubDirective { - @Input() vitamuiCommonTooltip: any; + @Input() libVitamuiCommonTooltip: any; } describe('UpdatedVitamUIMenuTileComponent', () => { diff --git a/ui/ui-frontend/projects/vitamui-library/src/lib/components/vitamui-radio-group/vitamui-radio-group.service.spec.ts b/ui/ui-frontend/projects/vitamui-library/src/lib/components/vitamui-radio-group/vitamui-radio-group.service.spec.ts index 611a49f2b..d0a43c084 100644 --- a/ui/ui-frontend/projects/vitamui-library/src/lib/components/vitamui-radio-group/vitamui-radio-group.service.spec.ts +++ b/ui/ui-frontend/projects/vitamui-library/src/lib/components/vitamui-radio-group/vitamui-radio-group.service.spec.ts @@ -8,7 +8,7 @@ describe('VitamUIRadioGroupService', () => { })); it('should be created', () => { - const service: VitamUIRadioGroupService = TestBed.get(VitamUIRadioGroupService); + const service: VitamUIRadioGroupService = TestBed.inject(VitamUIRadioGroupService); expect(service).toBeTruthy(); }); }); diff --git a/ui/ui-frontend/projects/vitamui-library/src/lib/vitamui-library.service.spec.ts b/ui/ui-frontend/projects/vitamui-library/src/lib/vitamui-library.service.spec.ts index aabfb8214..f60b4dbfe 100644 --- a/ui/ui-frontend/projects/vitamui-library/src/lib/vitamui-library.service.spec.ts +++ b/ui/ui-frontend/projects/vitamui-library/src/lib/vitamui-library.service.spec.ts @@ -9,7 +9,7 @@ describe('VitamuiLibraryService', () => { })); it('should be created', () => { - const service: VitamuiLibraryService = TestBed.get(VitamuiLibraryService); + const service: VitamuiLibraryService = TestBed.inject(VitamuiLibraryService); expect(service).toBeTruthy(); }); }); -- GitLab