Pass encodeBase64 param to transit-key-actions (#19429)

* fix and test coverage

* changelog
This commit is contained in:
Angel Garbarino 2023-03-06 11:28:49 -07:00 committed by GitHub
parent ac36b31846
commit be2454ec1b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 12 additions and 1 deletions

3
changelog/19429.txt Normal file
View File

@ -0,0 +1,3 @@
```release-note:bug
ui: pass encodeBase64 param to HMAC transit-key-actions.
```

View File

@ -1,4 +1,9 @@
<form onsubmit={{action @doSubmit (hash input=@input algorithm=@algorithm key_version=@key_version)}}> <form
onsubmit={{action
@doSubmit
(hash input=@input algorithm=@algorithm key_version=@key_version encodedBase64=@encodedBase64)
}}
>
<div class="box is-sideless is-fullwidth is-marginless"> <div class="box is-sideless is-fullwidth is-marginless">
<NamespaceReminder @mode="perform" @noun="HMAC creation" /> <NamespaceReminder @mode="perform" @noun="HMAC creation" />
<div class="content"> <div class="content">

View File

@ -322,6 +322,8 @@ module('Integration | Component | transit key actions', function (hooks) {
`); `);
await fillIn('#algorithm', 'sha2-384'); await fillIn('#algorithm', 'sha2-384');
await blur('#algorithm'); await blur('#algorithm');
await fillIn('[data-test-component="code-mirror-modifier"] textarea', 'plaintext');
await click('input[data-test-transit-input="encodedBase64"]');
await click('button[type="submit"]'); await click('button[type="submit"]');
assert.deepEqual( assert.deepEqual(
this.storeService.callArgs, this.storeService.callArgs,
@ -331,6 +333,7 @@ module('Integration | Component | transit key actions', function (hooks) {
id: 'akey', id: 'akey',
payload: { payload: {
algorithm: 'sha2-384', algorithm: 'sha2-384',
input: 'plaintext',
}, },
}, },
'passes expected args to the adapter' 'passes expected args to the adapter'