From b78884f23d8cf23899fd71e817f058c79fbf8df4 Mon Sep 17 00:00:00 2001 From: "clairebontempo@gmail.com" Date: Thu, 28 Sep 2023 12:12:35 -0700 Subject: [PATCH 1/6] upgrade HDS library (adds support for snippet containers --- ui/package.json | 2 +- ui/yarn.lock | 52 ++++++++++++++++++++++++++++--------------------- 2 files changed, 31 insertions(+), 23 deletions(-) diff --git a/ui/package.json b/ui/package.json index b85b1a85531e..b13d0f403922 100644 --- a/ui/package.json +++ b/ui/package.json @@ -248,7 +248,7 @@ ] }, "dependencies": { - "@hashicorp/design-system-components": "^2.9.0", + "@hashicorp/design-system-components": "^2.12.2", "handlebars": "4.7.7", "highlight.js": "^10.4.1", "node-notifier": "^8.0.1", diff --git a/ui/yarn.lock b/ui/yarn.lock index 7e3f68c2d8fe..01c402c69cf3 100644 --- a/ui/yarn.lock +++ b/ui/yarn.lock @@ -4977,14 +4977,14 @@ __metadata: languageName: node linkType: hard -"@hashicorp/design-system-components@npm:^2.9.0": - version: 2.9.0 - resolution: "@hashicorp/design-system-components@npm:2.9.0" +"@hashicorp/design-system-components@npm:^2.12.2": + version: 2.12.2 + resolution: "@hashicorp/design-system-components@npm:2.12.2" dependencies: "@ember/render-modifiers": ^2.0.5 "@ember/test-waiters": ^3.0.2 - "@hashicorp/design-system-tokens": ^1.7.0 - "@hashicorp/ember-flight-icons": ^3.0.9 + "@hashicorp/design-system-tokens": ^1.8.0 + "@hashicorp/ember-flight-icons": ^3.1.3 dialog-polyfill: ^0.5.6 ember-a11y-refocus: ^3.0.2 ember-auto-import: ^2.6.3 @@ -4996,20 +4996,19 @@ __metadata: ember-composable-helpers: ^4.5.0 ember-focus-trap: ^1.0.2 ember-keyboard: ^8.2.0 - ember-named-blocks-polyfill: ^0.2.5 ember-stargate: ^0.4.3 ember-style-modifier: ^3.0.1 ember-truth-helpers: ^3.1.1 sass: ^1.62.1 tippy.js: ^6.3.7 - checksum: b7fb3026f6c73f370dc34032d57b292081e5f3a89c16d5a884e9ce778fe77173c9a243ebe6bff76c4eadc0ebd2954169ab56eb181d504ac1204be796a72760cf + checksum: 064f54a290523c8421a9f5a9e52f5f88f6a8e88fe457216e5a30a4b27393c339ca9e886c7aeeb55c535badd4d0615096a1ed204beaca7f576eec4281cd71f43f languageName: node linkType: hard -"@hashicorp/design-system-tokens@npm:^1.7.0": - version: 1.7.0 - resolution: "@hashicorp/design-system-tokens@npm:1.7.0" - checksum: fafddf1f4534d34dbe03ee3345064ddb19e06314a9a8b5fed074cc1b768ab56c72b477ab9a75a036ce521d883bf7e09e0509ecdc284556a9ffae418dcac8adbc +"@hashicorp/design-system-tokens@npm:^1.8.0": + version: 1.8.0 + resolution: "@hashicorp/design-system-tokens@npm:1.8.0" + checksum: 9cc65907defb1bb6e2d91a9f8c778d592c9aa391b186e38bbf14353b532fee2f018fd53138b514360eea857f440efb870ac1b264b56efc7a4766bd55ca83b5a8 languageName: node linkType: hard @@ -5025,6 +5024,18 @@ __metadata: languageName: node linkType: hard +"@hashicorp/ember-flight-icons@npm:^3.1.3": + version: 3.1.3 + resolution: "@hashicorp/ember-flight-icons@npm:3.1.3" + dependencies: + "@hashicorp/flight-icons": ^2.20.0 + ember-auto-import: ^2.6.3 + ember-cli-babel: ^7.26.11 + ember-cli-htmlbars: ^6.2.0 + checksum: 196dec75deb983cbfeae6738c5bba7482f645d8ad419b1ab79c0f12f64d0f06e9c7ffb01ce13540e80aabb5ceb490c05c6cd56a7b25ceb3413ebe8274889a298 + languageName: node + linkType: hard + "@hashicorp/flight-icons@npm:^2.17.0": version: 2.17.0 resolution: "@hashicorp/flight-icons@npm:2.17.0" @@ -5032,6 +5043,13 @@ __metadata: languageName: node linkType: hard +"@hashicorp/flight-icons@npm:^2.20.0": + version: 2.20.0 + resolution: "@hashicorp/flight-icons@npm:2.20.0" + checksum: 4ec750e46cd780f007a5046e4cd2cf9e69f946ef131d30b3090c24616c2c0a407f327d0135ebbb0af6578cfdbbb65ab59b18c6ab95599ec04ed2a04827aa24ec + languageName: node + linkType: hard + "@hashicorp/structure-icons@npm:^1.3.0": version: 1.8.1 resolution: "@hashicorp/structure-icons@npm:1.8.1" @@ -13751,16 +13769,6 @@ __metadata: languageName: node linkType: hard -"ember-named-blocks-polyfill@npm:^0.2.5": - version: 0.2.5 - resolution: "ember-named-blocks-polyfill@npm:0.2.5" - dependencies: - ember-cli-babel: ^7.19.0 - ember-cli-version-checker: ^5.1.1 - checksum: f3ca8eeb61a208bf4690d423806b35371b5f01c58028404c9065d7d6e289d2220f40232756718a784fe0d0a65ed9c5a66a3df76f4abd222d07fca35886f5c583 - languageName: node - linkType: hard - "ember-native-dom-helpers@npm:^0.7.0": version: 0.7.0 resolution: "ember-native-dom-helpers@npm:0.7.0" @@ -25918,7 +25926,7 @@ __metadata: "@ember/test-waiters": ^3.0.0 "@glimmer/component": ^1.1.2 "@glimmer/tracking": ^1.1.2 - "@hashicorp/design-system-components": ^2.9.0 + "@hashicorp/design-system-components": ^2.12.2 "@hashicorp/ember-flight-icons": ^3.0.9 "@hashicorp/structure-icons": ^1.3.0 "@icholy/duration": ^5.1.0 From 5cbc7023cfeeaa9135d90505b10a0a79b62b364e Mon Sep 17 00:00:00 2001 From: "clairebontempo@gmail.com" Date: Thu, 28 Sep 2023 12:22:55 -0700 Subject: [PATCH 2/6] cleanup flight icons --- ui/package.json | 2 +- ui/yarn.lock | 21 +-------------------- 2 files changed, 2 insertions(+), 21 deletions(-) diff --git a/ui/package.json b/ui/package.json index b13d0f403922..89da00168ac3 100644 --- a/ui/package.json +++ b/ui/package.json @@ -65,7 +65,6 @@ "@ember/test-waiters": "^3.0.0", "@glimmer/component": "^1.1.2", "@glimmer/tracking": "^1.1.2", - "@hashicorp/ember-flight-icons": "^3.0.9", "@hashicorp/structure-icons": "^1.3.0", "@icholy/duration": "^5.1.0", "@tsconfig/ember": "^1.0.1", @@ -249,6 +248,7 @@ }, "dependencies": { "@hashicorp/design-system-components": "^2.12.2", + "@hashicorp/ember-flight-icons": "^3.1.3", "handlebars": "4.7.7", "highlight.js": "^10.4.1", "node-notifier": "^8.0.1", diff --git a/ui/yarn.lock b/ui/yarn.lock index 01c402c69cf3..276d3f8abe16 100644 --- a/ui/yarn.lock +++ b/ui/yarn.lock @@ -5012,18 +5012,6 @@ __metadata: languageName: node linkType: hard -"@hashicorp/ember-flight-icons@npm:^3.0.9": - version: 3.0.9 - resolution: "@hashicorp/ember-flight-icons@npm:3.0.9" - dependencies: - "@hashicorp/flight-icons": ^2.17.0 - ember-auto-import: ^2.6.3 - ember-cli-babel: ^7.26.11 - ember-cli-htmlbars: ^6.2.0 - checksum: b909a45059fbb8bcabe59103a6fa323b0baee4f09ad97d9c7f92251da680704724de469031b3ea83517026ecd4c6754155f9d5f3160640ffac83841c5e0a00e0 - languageName: node - linkType: hard - "@hashicorp/ember-flight-icons@npm:^3.1.3": version: 3.1.3 resolution: "@hashicorp/ember-flight-icons@npm:3.1.3" @@ -5036,13 +5024,6 @@ __metadata: languageName: node linkType: hard -"@hashicorp/flight-icons@npm:^2.17.0": - version: 2.17.0 - resolution: "@hashicorp/flight-icons@npm:2.17.0" - checksum: 7df3e08ac8d814a661ff39a81421d586279091c83a742434dfc24a7f5381d000bbfa9a6b10aefbe138e2543a17e0643aadea8fe1004128e989c59dd74bfdc9e6 - languageName: node - linkType: hard - "@hashicorp/flight-icons@npm:^2.20.0": version: 2.20.0 resolution: "@hashicorp/flight-icons@npm:2.20.0" @@ -25927,7 +25908,7 @@ __metadata: "@glimmer/component": ^1.1.2 "@glimmer/tracking": ^1.1.2 "@hashicorp/design-system-components": ^2.12.2 - "@hashicorp/ember-flight-icons": ^3.0.9 + "@hashicorp/ember-flight-icons": ^3.1.3 "@hashicorp/structure-icons": ^1.3.0 "@icholy/duration": ^5.1.0 "@tsconfig/ember": ^1.0.1 From 2980633ce665331f4512fdda798aed0906edf39c Mon Sep 17 00:00:00 2001 From: "clairebontempo@gmail.com" Date: Thu, 28 Sep 2023 13:01:00 -0700 Subject: [PATCH 3/6] replace transit key action modals --- .../components/transit-key-action/datakey.hbs | 31 ++++++++++------ .../components/transit-key-action/decrypt.hbs | 30 +++++++++------- .../components/transit-key-action/encrypt.hbs | 33 +++++++++-------- .../components/transit-key-action/export.hbs | 25 +++++++------ .../components/transit-key-action/hmac.hbs | 28 +++++++++------ .../components/transit-key-action/rewrap.hbs | 23 ++++++------ .../components/transit-key-action/sign.hbs | 33 +++++++++-------- .../components/transit-key-action/verify.hbs | 35 ++++++++++++------- 8 files changed, 142 insertions(+), 96 deletions(-) diff --git a/ui/app/templates/components/transit-key-action/datakey.hbs b/ui/app/templates/components/transit-key-action/datakey.hbs index 3ea93d06f4df..87dd2e98f4ec 100644 --- a/ui/app/templates/components/transit-key-action/datakey.hbs +++ b/ui/app/templates/components/transit-key-action/datakey.hbs @@ -74,19 +74,28 @@ - - -
- -
-
\ No newline at end of file + + + + + + +{{/if}} \ No newline at end of file diff --git a/ui/app/templates/components/transit-key-action/decrypt.hbs b/ui/app/templates/components/transit-key-action/decrypt.hbs index 411d9acbb717..133635666e97 100644 --- a/ui/app/templates/components/transit-key-action/decrypt.hbs +++ b/ui/app/templates/components/transit-key-action/decrypt.hbs @@ -56,16 +56,22 @@ {{#if @isModalActive}} - - -
- -
-
+ + + Copy your unwrapped data + + +

Plaintext

+

Plaintext is base64 encoded

+ +
+ + + +
{{/if}} \ No newline at end of file diff --git a/ui/app/templates/components/transit-key-action/encrypt.hbs b/ui/app/templates/components/transit-key-action/encrypt.hbs index 3f95aeea2b15..82483bc045b9 100644 --- a/ui/app/templates/components/transit-key-action/encrypt.hbs +++ b/ui/app/templates/components/transit-key-action/encrypt.hbs @@ -69,19 +69,22 @@ - - -
- -
-
\ No newline at end of file + + + + + + +{{/if}} \ No newline at end of file diff --git a/ui/app/templates/components/transit-key-action/export.hbs b/ui/app/templates/components/transit-key-action/export.hbs index ae51b0ffe8c5..b14b2d67f88a 100644 --- a/ui/app/templates/components/transit-key-action/export.hbs +++ b/ui/app/templates/components/transit-key-action/export.hbs @@ -65,15 +65,19 @@ - - -
- -
-
\ No newline at end of file + + + + + +{{/if}} \ No newline at end of file diff --git a/ui/app/templates/components/transit-key-action/hmac.hbs b/ui/app/templates/components/transit-key-action/hmac.hbs index 2e30c93376fe..05c674a897d2 100644 --- a/ui/app/templates/components/transit-key-action/hmac.hbs +++ b/ui/app/templates/components/transit-key-action/hmac.hbs @@ -51,14 +51,22 @@ - - -
- -
-
\ No newline at end of file + + + + + + +{{/if}} \ No newline at end of file diff --git a/ui/app/templates/components/transit-key-action/rewrap.hbs b/ui/app/templates/components/transit-key-action/rewrap.hbs index ac70546aba3d..7d75bd2ce5d4 100644 --- a/ui/app/templates/components/transit-key-action/rewrap.hbs +++ b/ui/app/templates/components/transit-key-action/rewrap.hbs @@ -63,14 +63,17 @@ - - -
- -
-
\ No newline at end of file + + + + + + +{{/if}} \ No newline at end of file diff --git a/ui/app/templates/components/transit-key-action/sign.hbs b/ui/app/templates/components/transit-key-action/sign.hbs index 7bc00e5b4ae5..b14eb7a26c04 100644 --- a/ui/app/templates/components/transit-key-action/sign.hbs +++ b/ui/app/templates/components/transit-key-action/sign.hbs @@ -120,19 +120,22 @@ - - -
- -
-
\ No newline at end of file + + + + + + +{{/if}} \ No newline at end of file diff --git a/ui/app/templates/components/transit-key-action/verify.hbs b/ui/app/templates/components/transit-key-action/verify.hbs index 2f6d8809f79b..2fdbd63a04db 100644 --- a/ui/app/templates/components/transit-key-action/verify.hbs +++ b/ui/app/templates/components/transit-key-action/verify.hbs @@ -192,16 +192,25 @@ - - - \ No newline at end of file +{{#if @isModalActive}} + + + Results + + + + The input is + {{if @valid "valid" "not valid"}} + for the given + {{if @signature "signature." "HMAC."}} + + + + + +{{/if}} \ No newline at end of file From 0cb33dce7f60dfc53a6b981b555f6f0172563f68 Mon Sep 17 00:00:00 2001 From: "clairebontempo@gmail.com" Date: Thu, 28 Sep 2023 13:12:59 -0700 Subject: [PATCH 4/6] re-add deps as devDeps --- ui/package.json | 4 +- ui/yarn.lock | 126 ++++++++++++++++++++++++------------------------ 2 files changed, 64 insertions(+), 66 deletions(-) diff --git a/ui/package.json b/ui/package.json index 89da00168ac3..e8bb1028575d 100644 --- a/ui/package.json +++ b/ui/package.json @@ -65,6 +65,8 @@ "@ember/test-waiters": "^3.0.0", "@glimmer/component": "^1.1.2", "@glimmer/tracking": "^1.1.2", + "@hashicorp/design-system-components": "^2.12.2", + "@hashicorp/ember-flight-icons": "^3.1.3", "@hashicorp/structure-icons": "^1.3.0", "@icholy/duration": "^5.1.0", "@tsconfig/ember": "^1.0.1", @@ -247,8 +249,6 @@ ] }, "dependencies": { - "@hashicorp/design-system-components": "^2.12.2", - "@hashicorp/ember-flight-icons": "^3.1.3", "handlebars": "4.7.7", "highlight.js": "^10.4.1", "node-notifier": "^8.0.1", diff --git a/ui/yarn.lock b/ui/yarn.lock index 276d3f8abe16..600c28893920 100644 --- a/ui/yarn.lock +++ b/ui/yarn.lock @@ -3822,11 +3822,11 @@ __metadata: linkType: hard "@babel/runtime@npm:^7.17.8": - version: 7.21.0 - resolution: "@babel/runtime@npm:7.21.0" + version: 7.23.1 + resolution: "@babel/runtime@npm:7.23.1" dependencies: - regenerator-runtime: ^0.13.11 - checksum: 7b33e25bfa9e0e1b9e8828bb61b2d32bdd46b41b07ba7cb43319ad08efc6fda8eb89445193e67d6541814627df0ca59122c0ea795e412b99c5183a0540d338ab + regenerator-runtime: ^0.14.0 + checksum: 0cd0d43e6e7dc7f9152fda8c8312b08321cda2f56ef53d6c22ebdd773abdc6f5d0a69008de90aa41908d00e2c1facb24715ff121274e689305c858355ff02c70 languageName: node linkType: hard @@ -4393,15 +4393,19 @@ __metadata: linkType: hard "@ember/render-modifiers@npm:^2.0.0, @ember/render-modifiers@npm:^2.0.5": - version: 2.0.5 - resolution: "@ember/render-modifiers@npm:2.0.5" + version: 2.1.0 + resolution: "@ember/render-modifiers@npm:2.1.0" dependencies: "@embroider/macros": ^1.0.0 ember-cli-babel: ^7.26.11 ember-modifier-manager-polyfill: ^1.2.0 peerDependencies: - ember-source: ^3.8 || ^4.0.0 - checksum: ebeb4d573968f46490f8f5618b9d85f2c7ca39cee5b854bb497a3aee7dee3d710ab02b9677df30f1e2a484e712dd89171045118da563d9d9a6c316ccdccc2671 + "@glint/template": ^1.0.2 + ember-source: ^3.8 || ^4.0.0 || ^5.0.0 + peerDependenciesMeta: + "@glint/template": + optional: true + checksum: 6c4d617b67ee52e8e29e9a2b9f42a30e8ea333a7b7a4c5a61fdf5f15623da11f40d82218aeddfbe32bee1f508c569740e842a8233f4a372728d18b66bbc197d5 languageName: node linkType: hard @@ -4469,25 +4473,25 @@ __metadata: languageName: node linkType: hard -"@embroider/addon-shim@npm:^1.0.0, @embroider/addon-shim@npm:^1.2.0, @embroider/addon-shim@npm:^1.5.0, @embroider/addon-shim@npm:^1.8.4": - version: 1.8.4 - resolution: "@embroider/addon-shim@npm:1.8.4" +"@embroider/addon-shim@npm:^1.0.0, @embroider/addon-shim@npm:^1.2.0, @embroider/addon-shim@npm:^1.8.3": + version: 1.8.6 + resolution: "@embroider/addon-shim@npm:1.8.6" dependencies: - "@embroider/shared-internals": ^2.0.0 + "@embroider/shared-internals": ^2.2.3 broccoli-funnel: ^3.0.8 semver: ^7.3.8 - checksum: 107220e97bbd46ead81dfbbfc6cf7daa61731096a6e81b989659a9a0b29b48b3c97ebdd446b6dc0636c4be369f3744e514b7f5e5c0fdc54c1c0e026f54404cc2 + checksum: 63214fbc1b3f333b052791cdfc0c278c348dd6ca4ec2b53c96183150e3d5fe9882cdd3065853e3d6a2c964c962d718b87f2fd8a17414b53fc3a3997d5eedb30e languageName: node linkType: hard -"@embroider/addon-shim@npm:^1.8.3": - version: 1.8.6 - resolution: "@embroider/addon-shim@npm:1.8.6" +"@embroider/addon-shim@npm:^1.8.4": + version: 1.8.4 + resolution: "@embroider/addon-shim@npm:1.8.4" dependencies: - "@embroider/shared-internals": ^2.2.3 + "@embroider/shared-internals": ^2.0.0 broccoli-funnel: ^3.0.8 semver: ^7.3.8 - checksum: 63214fbc1b3f333b052791cdfc0c278c348dd6ca4ec2b53c96183150e3d5fe9882cdd3065853e3d6a2c964c962d718b87f2fd8a17414b53fc3a3997d5eedb30e + checksum: 107220e97bbd46ead81dfbbfc6cf7daa61731096a6e81b989659a9a0b29b48b3c97ebdd446b6dc0636c4be369f3744e514b7f5e5c0fdc54c1c0e026f54404cc2 languageName: node linkType: hard @@ -5358,9 +5362,9 @@ __metadata: linkType: hard "@popperjs/core@npm:^2.9.0": - version: 2.11.7 - resolution: "@popperjs/core@npm:2.11.7" - checksum: 5b6553747899683452a1d28898c1b39173a4efd780e74360bfcda8eb42f1c5e819602769c81a10920fc68c881d07fb40429604517d499567eac079cfa6470f19 + version: 2.11.8 + resolution: "@popperjs/core@npm:2.11.8" + checksum: e5c69fdebf52a4012f6a1f14817ca8e9599cb1be73dd1387e1785e2ed5e5f0862ff817f420a87c7fc532add1f88a12e25aeb010ffcbdc98eace3d55ce2139cf0 languageName: node linkType: hard @@ -12347,16 +12351,16 @@ __metadata: linkType: hard "ember-arg-types@npm:^1.0.0": - version: 1.0.0 - resolution: "ember-arg-types@npm:1.0.0" + version: 1.1.0 + resolution: "ember-arg-types@npm:1.1.0" dependencies: "@embroider/macros": ^1.8.1 ember-auto-import: ^2.4.2 ember-cli-babel: ^7.26.11 ember-cli-typescript: ^5.1.1 ember-get-config: ^2.1.1 - prop-types: ^15.7.2 - checksum: 8313a4a2644daeedcbd6d097b9cbd1d19045117b76814d33552f207d33111454379c38cdcfc478cdca85c0b956727371ba4bee83cc89cdb438463a0b2f5e72bd + prop-types: ^15.8.1 + checksum: f31733f7749c51f1751673afd450106faac3cad61cc0406abc0ef2938d7623416e35794a80636f02a082aac047e4321a037c5f61796ec30baaf156216ba6d87b languageName: node linkType: hard @@ -12675,17 +12679,18 @@ __metadata: linkType: hard "ember-cli-clipboard@npm:^1.0.0": - version: 1.0.0 - resolution: "ember-cli-clipboard@npm:1.0.0" + version: 1.1.0 + resolution: "ember-cli-clipboard@npm:1.1.0" dependencies: + "@embroider/macros": ^1.10.0 clipboard: ^2.0.11 ember-arg-types: ^1.0.0 ember-auto-import: ^2.4.2 ember-cli-babel: ^7.26.11 ember-cli-htmlbars: ^6.1.0 - ember-modifier: ^3.2.7 + ember-modifier: ^3.2.7 || ^4.1.0 prop-types: ^15.8.1 - checksum: 448891dcd9db44dfd6621434a5158a226a7cf572fd6359b08c7f486bdeb6380dedb031e21bdad12e9db78b422a365b26e98160c472fb6605cd0efe9936cc037c + checksum: 8977ddf744de59662012421feed13e2cd14f6658bc2742504dd5972d0c1181abd8be30085f8dfaaa4f8478fac162eb6ede912ef5c69159d03dac9cb5a6c0bd31 languageName: node linkType: hard @@ -13584,12 +13589,14 @@ __metadata: linkType: hard "ember-focus-trap@npm:^1.0.2": - version: 1.0.2 - resolution: "ember-focus-trap@npm:1.0.2" + version: 1.1.0 + resolution: "ember-focus-trap@npm:1.1.0" dependencies: "@embroider/addon-shim": ^1.0.0 focus-trap: ^6.7.1 - checksum: 1940405edcbff3997eb3d9f15314ded20f676e25a07adee5e306c0816ed0743849798c5bd69c1e7e35a5b32c44d0b4995a2d46cc14adc97eab899167fc51a968 + peerDependencies: + ember-source: ^4.0.0 || ^5.0.0 + checksum: 1f19c50b92c56f04681cd59ac3a88a520a53403278105aab2f4edc64df6ce3d0ceb53409e3309822bd4ced60063d9e8657117c708f90da9038c8140737e8d831 languageName: node linkType: hard @@ -13636,19 +13643,19 @@ __metadata: linkType: hard "ember-keyboard@npm:^8.2.0": - version: 8.2.0 - resolution: "ember-keyboard@npm:8.2.0" + version: 8.2.1 + resolution: "ember-keyboard@npm:8.2.1" dependencies: - "@embroider/addon-shim": ^1.5.0 + "@embroider/addon-shim": ^1.8.4 ember-destroyable-polyfill: ^2.0.3 ember-modifier: ^2.1.2 || ^3.1.0 || ^4.0.0 ember-modifier-manager-polyfill: ^1.2.0 peerDependencies: - "@ember/test-helpers": ^2.6.0 + "@ember/test-helpers": ^2.6.0 || ^3.0.0 peerDependenciesMeta: "@ember/test-helpers": optional: true - checksum: d8e9c8d78175b411c40b88288ef91902278011d242ed0775e64df492089210e0b3dfc0eee7de4fe11a33d918d40639fc5aee7ba26ba9695b507cabb5e52fa844 + checksum: cfb4120aaf3b1ff3aba8ba1619b0597c6738abde31d1e0719d8bbf69512fb9967fc76bc85557351ec42856bb9b6c47354634f22f0accab0e15743d9f0e3f2be4 languageName: node linkType: hard @@ -13705,9 +13712,9 @@ __metadata: languageName: node linkType: hard -"ember-modifier@npm:^2.1.2 || ^3.1.0 || ^4.0.0": - version: 4.0.0 - resolution: "ember-modifier@npm:4.0.0" +"ember-modifier@npm:^2.1.2 || ^3.1.0 || ^4.0.0, ember-modifier@npm:^3.2.7 || ^4.0.0, ember-modifier@npm:^3.2.7 || ^4.1.0, ember-modifier@npm:^4.1.0": + version: 4.1.0 + resolution: "ember-modifier@npm:4.1.0" dependencies: "@embroider/addon-shim": ^1.8.4 ember-cli-normalize-entity-name: ^1.0.0 @@ -13717,7 +13724,7 @@ __metadata: peerDependenciesMeta: ember-source: optional: true - checksum: 8970eee22666426abed22414fc12f1547b4c02618297648ace0c22ec3db5299afe522ac2130148e6daeded0c70ad7005418c21888b8e4198e0c6b04c5f751312 + checksum: 5e14a864de2184c07e59fb9bc76a09ae25d1bd37722a94751a3cef6165df22027007696c4dda03e1862cb3bbeefb046772810dda3104d05c7fe8476389c34a77 languageName: node linkType: hard @@ -13734,22 +13741,6 @@ __metadata: languageName: node linkType: hard -"ember-modifier@npm:^3.2.7 || ^4.0.0, ember-modifier@npm:^4.1.0": - version: 4.1.0 - resolution: "ember-modifier@npm:4.1.0" - dependencies: - "@embroider/addon-shim": ^1.8.4 - ember-cli-normalize-entity-name: ^1.0.0 - ember-cli-string-utils: ^1.1.0 - peerDependencies: - ember-source: "*" - peerDependenciesMeta: - ember-source: - optional: true - checksum: 5e14a864de2184c07e59fb9bc76a09ae25d1bd37722a94751a3cef6165df22027007696c4dda03e1862cb3bbeefb046772810dda3104d05c7fe8476389c34a77 - languageName: node - linkType: hard - "ember-native-dom-helpers@npm:^0.7.0": version: 0.7.0 resolution: "ember-native-dom-helpers@npm:0.7.0" @@ -13834,8 +13825,8 @@ __metadata: linkType: hard "ember-resources@npm:^5.0.1": - version: 5.6.3 - resolution: "ember-resources@npm:5.6.3" + version: 5.6.4 + resolution: "ember-resources@npm:5.6.4" dependencies: "@babel/runtime": ^7.17.8 "@embroider/addon-shim": ^1.2.0 @@ -13854,7 +13845,7 @@ __metadata: optional: true ember-concurrency: optional: true - checksum: e548c00336ad970b77a7da016798061f648f7105848d508a66dbed9c70c3939c921772df59a14656e8974559c86148ed550407722e20b1d8bb18ae3dba95e881 + checksum: 9edb126ee307251080380d421aba42f330f76c6e295046ae59b48c3162d27e83223732e398f8373f933d120f38831e791e0fd31e63c70315982166db399d2b33 languageName: node linkType: hard @@ -21960,7 +21951,7 @@ __metadata: languageName: node linkType: hard -"prop-types@npm:^15.7.2, prop-types@npm:^15.8.1": +"prop-types@npm:^15.8.1": version: 15.8.1 resolution: "prop-types@npm:15.8.1" dependencies: @@ -22421,6 +22412,13 @@ __metadata: languageName: node linkType: hard +"regenerator-runtime@npm:^0.14.0": + version: 0.14.0 + resolution: "regenerator-runtime@npm:0.14.0" + checksum: 1c977ad82a82a4412e4f639d65d22be376d3ebdd30da2c003eeafdaaacd03fc00c2320f18120007ee700900979284fc78a9f00da7fb593f6e6eeebc673fba9a3 + languageName: node + linkType: hard + "regenerator-transform@npm:^0.10.0": version: 0.10.1 resolution: "regenerator-transform@npm:0.10.1" @@ -23285,15 +23283,15 @@ __metadata: linkType: hard "sass@npm:^1.62.1": - version: 1.65.1 - resolution: "sass@npm:1.65.1" + version: 1.68.0 + resolution: "sass@npm:1.68.0" dependencies: chokidar: ">=3.0.0 <4.0.0" immutable: ^4.0.0 source-map-js: ">=0.6.2 <2.0.0" bin: sass: sass.js - checksum: 33e325fc80cd07489992e0814cd4929496f87493ffe78c423c2dbafa5746a574e6f3bde20c2a3e4ea47b16ee3d6bc5afcf1d36b405227b829d6c4c9ddcc7f8e2 + checksum: 65ccede83c96768beeb8dcaf67957b7c76b12ff1276bfd2849d7be151d46ba1400048a67717e6e5e4969bc75e87348e5530f5f272833f2e60a891c21a33d8ab0 languageName: node linkType: hard From d8a0b072851fd53b5fce64b0a5551e2bd6a424c0 Mon Sep 17 00:00:00 2001 From: "clairebontempo@gmail.com" Date: Thu, 28 Sep 2023 13:54:51 -0700 Subject: [PATCH 5/6] remove line --- ui/app/templates/components/transit-key-action/datakey.hbs | 1 - 1 file changed, 1 deletion(-) diff --git a/ui/app/templates/components/transit-key-action/datakey.hbs b/ui/app/templates/components/transit-key-action/datakey.hbs index 87dd2e98f4ec..24b8d8cbf2c9 100644 --- a/ui/app/templates/components/transit-key-action/datakey.hbs +++ b/ui/app/templates/components/transit-key-action/datakey.hbs @@ -74,7 +74,6 @@ - {{#if @isModalActive}} From f3a63c9c214e0403091c7c7523f8ab10a04ee6dd Mon Sep 17 00:00:00 2001 From: "clairebontempo@gmail.com" Date: Thu, 28 Sep 2023 15:04:32 -0700 Subject: [PATCH 6/6] address transit tests --- .../components/transit-key-action/decrypt.hbs | 2 +- ui/tests/acceptance/transit-test.js | 35 +++++++------- .../components/transit-key-actions-test.js | 46 ++++++------------- 3 files changed, 32 insertions(+), 51 deletions(-) diff --git a/ui/app/templates/components/transit-key-action/decrypt.hbs b/ui/app/templates/components/transit-key-action/decrypt.hbs index 133635666e97..84d8f90c7a55 100644 --- a/ui/app/templates/components/transit-key-action/decrypt.hbs +++ b/ui/app/templates/components/transit-key-action/decrypt.hbs @@ -56,7 +56,7 @@ {{#if @isModalActive}} - + Copy your unwrapped data diff --git a/ui/tests/acceptance/transit-test.js b/ui/tests/acceptance/transit-test.js index 85d14d6ddfb3..a75553109523 100644 --- a/ui/tests/acceptance/transit-test.js +++ b/ui/tests/acceptance/transit-test.js @@ -37,14 +37,14 @@ const testConvergentEncryption = async function (assert, keyName) { encodePlaintext: false, encodeContext: false, assertAfterEncrypt: (key) => { - assert.dom('.modal.is-active').exists(`${key}: Modal opens after encrypt`); + assert.dom('[data-test-encrypt-modal]').exists(`${key}: Modal opens after encrypt`); assert.ok( /vault:/.test(find('[data-test-encrypted-value="ciphertext"]').innerText), `${key}: ciphertext shows a vault-prefixed ciphertext` ); }, assertBeforeDecrypt: (key) => { - assert.dom('.modal.is-active').doesNotExist(`${key}: Modal not open before decrypt`); + assert.dom('[data-test-decrypt-modal]').doesNotExist(`${key}: Modal not open before decrypt`); assert .dom('[data-test-transit-input="context"]') .hasValue( @@ -52,9 +52,8 @@ const testConvergentEncryption = async function (assert, keyName) { `${key}: the ui shows the base64-encoded context` ); }, - assertAfterDecrypt: (key) => { - assert.dom('.modal.is-active').exists(`${key}: Modal opens after decrypt`); + assert.dom('[data-test-decrypt-modal]').exists(`${key}: Modal opens after decrypt`); assert.strictEqual( find('[data-test-encrypted-value="plaintext"]').innerText, 'NaXud2QW7KjyK6Me9ggh+zmnCeBGdG93LQED49PtoOI=', @@ -69,20 +68,20 @@ const testConvergentEncryption = async function (assert, keyName) { encodePlaintext: false, encodeContext: false, assertAfterEncrypt: (key) => { - assert.dom('.modal.is-active').exists(`${key}: Modal opens after encrypt`); + assert.dom('[data-test-encrypt-modal]').exists(`${key}: Modal opens after encrypt`); assert.ok( /vault:/.test(find('[data-test-encrypted-value="ciphertext"]').innerText), `${key}: ciphertext shows a vault-prefixed ciphertext` ); }, assertBeforeDecrypt: (key) => { - assert.dom('.modal.is-active').doesNotExist(`${key}: Modal not open before decrypt`); + assert.dom('[data-test-decrypt-modal]').doesNotExist(`${key}: Modal not open before decrypt`); assert .dom('[data-test-transit-input="context"]') .hasValue(encodeString('context'), `${key}: the ui shows the input context`); }, assertAfterDecrypt: (key) => { - assert.dom('.modal.is-active').exists(`${key}: Modal opens after decrypt`); + assert.dom('[data-test-decrypt-modal]').exists(`${key}: Modal opens after decrypt`); assert.strictEqual( find('[data-test-encrypted-value="plaintext"]').innerText, 'NaXud2QW7KjyK6Me9ggh+zmnCeBGdG93LQED49PtoOI=', @@ -97,20 +96,20 @@ const testConvergentEncryption = async function (assert, keyName) { encodePlaintext: false, encodeContext: false, assertAfterEncrypt: (key) => { - assert.dom('.modal.is-active').exists(`${key}: Modal opens after encrypt`); + assert.dom('[data-test-encrypt-modal]').exists(`${key}: Modal opens after encrypt`); assert.ok( /vault:/.test(find('[data-test-encrypted-value="ciphertext"]').innerText), `${key}: ciphertext shows a vault-prefixed ciphertext` ); }, assertBeforeDecrypt: (key) => { - assert.dom('.modal.is-active').doesNotExist(`${key}: Modal not open before decrypt`); + assert.dom('[data-test-decrypt-modal]').doesNotExist(`${key}: Modal not open before decrypt`); assert .dom('[data-test-transit-input="context"]') .hasValue(encodeString('context'), `${key}: the ui shows the input context`); }, assertAfterDecrypt: (key) => { - assert.dom('.modal.is-active').exists(`${key}: Modal opens after decrypt`); + assert.dom('[data-test-decrypt-modal]').exists(`${key}: Modal opens after decrypt`); assert.strictEqual( find('[data-test-encrypted-value="plaintext"]').innerText, encodeString('This is the secret'), @@ -125,20 +124,20 @@ const testConvergentEncryption = async function (assert, keyName) { encodePlaintext: true, encodeContext: true, assertAfterEncrypt: (key) => { - assert.dom('.modal.is-active').exists(`${key}: Modal opens after encrypt`); + assert.dom('[data-test-encrypt-modal]').exists(`${key}: Modal opens after encrypt`); assert.ok( /vault:/.test(find('[data-test-encrypted-value="ciphertext"]').innerText), `${key}: ciphertext shows a vault-prefixed ciphertext` ); }, assertBeforeDecrypt: (key) => { - assert.dom('.modal.is-active').doesNotExist(`${key}: Modal not open before decrypt`); + assert.dom('[data-test-decrypt-modal]').doesNotExist(`${key}: Modal not open before decrypt`); assert .dom('[data-test-transit-input="context"]') .hasValue(encodeString('secret 2'), `${key}: the ui shows the encoded context`); }, assertAfterDecrypt: (key) => { - assert.dom('.modal.is-active').exists(`${key}: Modal opens after decrypt`); + assert.dom('[data-test-decrypt-modal]').exists(`${key}: Modal opens after decrypt`); assert.strictEqual( find('[data-test-encrypted-value="plaintext"]').innerText, encodeString('There are many secrets 🤐'), @@ -161,7 +160,7 @@ const testConvergentEncryption = async function (assert, keyName) { if (testCase.encodeContext) { await click('[data-test-transit-b64-toggle="context"]'); } - assert.dom('.modal.is-active').doesNotExist(`${name}: is not open before encrypt`); + assert.dom('[data-test-encrypt-modal]').doesNotExist(`${name}: is not open before encrypt`); await click('[data-test-button-encrypt]'); if (testCase.assertAfterEncrypt) { @@ -170,9 +169,9 @@ const testConvergentEncryption = async function (assert, keyName) { } // store ciphertext for decryption step const copiedCiphertext = find('[data-test-encrypted-value="ciphertext"]').innerText; - await click('.modal.is-active [data-test-modal-background]'); + await click('dialog button'); - assert.dom('.modal.is-active').doesNotExist(`${name}: Modal closes after background clicked`); + assert.dom('dialog.hds-modal').doesNotExist(`${name}: Modal closes after background clicked`); await click('[data-test-transit-action-link="decrypt"]'); if (testCase.assertBeforeDecrypt) { @@ -187,9 +186,9 @@ const testConvergentEncryption = async function (assert, keyName) { testCase.assertAfterDecrypt(keyName); } - await click('.modal.is-active [data-test-modal-background]'); + await click('dialog button'); - assert.dom('.modal.is-active').doesNotExist(`${name}: Modal closes after background clicked`); + assert.dom('dialog.hds-modal').doesNotExist(`${name}: Modal closes after background clicked`); } }; diff --git a/ui/tests/integration/components/transit-key-actions-test.js b/ui/tests/integration/components/transit-key-actions-test.js index 5f3ace403264..99765e1cff14 100644 --- a/ui/tests/integration/components/transit-key-actions-test.js +++ b/ui/tests/integration/components/transit-key-actions-test.js @@ -51,9 +51,7 @@ module('Integration | Component | transit key actions', function (hooks) { test('it requires `key`', async function (assert) { const promise = waitForError(); render(hbs` - {{transit-key-actions}} - - `); + {{transit-key-actions}}`); const err = await promise; assert.ok(err.message.includes('`key` is required for'), 'asserts without key'); }); @@ -61,9 +59,7 @@ module('Integration | Component | transit key actions', function (hooks) { test('it renders', async function (assert) { this.set('key', { backend: 'transit', supportedActions: ['encrypt'] }); await render(hbs` - {{transit-key-actions selectedAction="encrypt" key=this.key}} - - `); + {{transit-key-actions selectedAction="encrypt" key=this.key}}`); assert.dom('[data-test-transit-action="encrypt"]').exists({ count: 1 }, 'renders encrypt'); this.set('key', { backend: 'transit', supportedActions: ['sign'] }); @@ -77,9 +73,7 @@ module('Integration | Component | transit key actions', function (hooks) { this.set('key', { backend: 'transit', supportsSigning: true, supportedActions: ['sign', 'verify'] }); this.set('selectedAction', 'sign'); await render(hbs` - {{transit-key-actions selectedAction=this.selectedAction key=this.key}} - - `); + {{transit-key-actions selectedAction=this.selectedAction key=this.key}}`); assert .dom('[data-test-signature-algorithm]') .doesNotExist('does not render signature_algorithm field on sign'); @@ -107,9 +101,7 @@ module('Integration | Component | transit key actions', function (hooks) { test('it renders: rotate', async function (assert) { this.set('key', { backend: 'transit', id: 'akey', supportedActions: ['rotate'] }); await render(hbs` - {{transit-key-actions selectedAction="rotate" key=this.key}} - - `); + {{transit-key-actions selectedAction="rotate" key=this.key}}`); assert.dom('*').hasText('', 'renders an empty div'); @@ -127,9 +119,7 @@ module('Integration | Component | transit key actions', function (hooks) { this.set('selectedAction', 'encrypt'); this.set('storeService.keyActionReturnVal', { ciphertext: 'secret' }); await render(hbs` - {{transit-key-actions selectedAction=this.selectedAction key=this.key}} - - `); + {{transit-key-actions selectedAction=this.selectedAction key=this.key}}`); find('#plaintext-control .CodeMirror').CodeMirror.setValue('plaintext'); await click('button[type="submit"]'); @@ -149,7 +139,7 @@ module('Integration | Component | transit key actions', function (hooks) { assert.strictEqual(find('[data-test-encrypted-value="ciphertext"]').innerText, 'secret'); // exit modal - await click('[data-test-modal-background]'); + await click('dialog button'); // Encrypt again, with pre-encoded value and checkbox selected const preEncodedValue = encodeString('plaintext'); find('#plaintext-control .CodeMirror').CodeMirror.setValue(preEncodedValue); @@ -179,9 +169,7 @@ module('Integration | Component | transit key actions', function (hooks) { this.set('key', key); this.set('storeService.keyActionReturnVal', { ciphertext: 'secret' }); await render(hbs` - {{transit-key-actions selectedAction="encrypt" key=this.key}} - - `); + {{transit-key-actions selectedAction="encrypt" key=this.key}}`); findAll('.CodeMirror')[0].CodeMirror.setValue('plaintext'); assert.dom('#key_version').exists({ count: 1 }, 'it renders the key version selector'); @@ -210,9 +198,7 @@ module('Integration | Component | transit key actions', function (hooks) { this.set('key', key); this.set('storeService.keyActionReturnVal', { ciphertext: 'secret' }); await render(hbs` - {{transit-key-actions selectedAction="encrypt" key=this.key}} - - `); + {{transit-key-actions selectedAction="encrypt" key=this.key}}`); // await fillIn('#plaintext', 'plaintext'); find('#plaintext-control .CodeMirror').CodeMirror.setValue('plaintext'); @@ -242,9 +228,7 @@ module('Integration | Component | transit key actions', function (hooks) { validKeyVersions: [1], }); await render(hbs` - {{transit-key-actions key=this.key}} - - `); + {{transit-key-actions key=this.key}}`); }; test('it can export a key:default behavior', async function (assert) { @@ -278,9 +262,9 @@ module('Integration | Component | transit key actions', function (hooks) { await setupExport.call(this); await click('[data-test-toggle-label="Wrap response"]'); await click('button[type="submit"]'); - assert.dom('.modal.is-active').exists('Modal opens after export'); + assert.dom('#transit-export-modal').exists('Modal opens after export'); assert.deepEqual( - JSON.parse(find('.modal [data-test-encrypted-value="export"]').innerText), + JSON.parse(find('[data-test-encrypted-value="export"]').innerText), response, 'prints json response' ); @@ -294,9 +278,9 @@ module('Integration | Component | transit key actions', function (hooks) { await click('#exportVersion'); await triggerEvent('#exportVersion', 'change'); await click('button[type="submit"]'); - assert.dom('.modal.is-active').exists('Modal opens after export'); + assert.dom('#transit-export-modal').exists('Modal opens after export'); assert.deepEqual( - JSON.parse(find('.modal [data-test-encrypted-value="export"]').innerText), + JSON.parse(find('[data-test-encrypted-value="export"]').innerText), response, 'prints json response' ); @@ -322,9 +306,7 @@ module('Integration | Component | transit key actions', function (hooks) { validKeyVersions: [1], }); await render(hbs` - {{transit-key-actions key=this.key}} - - `); + {{transit-key-actions key=this.key}}`); await fillIn('#algorithm', 'sha2-384'); await blur('#algorithm'); await fillIn('[data-test-component="code-mirror-modifier"] textarea', 'plaintext');