mirror of
https://github.com/optim-enterprises-bv/vault.git
synced 2025-11-01 11:08:10 +00:00
Bug Fix for Kymgmt keyType on default (#17407)
* the fix * add test coverage * changelog * removes comment
This commit is contained in:
3
changelog/17407.txt
Normal file
3
changelog/17407.txt
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
```release-note:bug
|
||||||
|
ui/keymgmt: Sets the defaultValue for type when creating a key.
|
||||||
|
```
|
||||||
@@ -24,6 +24,7 @@ export default class KeymgmtKeyModel extends Model {
|
|||||||
@attr('string', {
|
@attr('string', {
|
||||||
subText: 'The type of cryptographic key that will be created.',
|
subText: 'The type of cryptographic key that will be created.',
|
||||||
possibleValues: KEY_TYPES,
|
possibleValues: KEY_TYPES,
|
||||||
|
defaultValue: 'rsa-2048',
|
||||||
})
|
})
|
||||||
type;
|
type;
|
||||||
|
|
||||||
|
|||||||
@@ -75,4 +75,13 @@ module('Integration | Component | keymgmt/key-edit', function (hooks) {
|
|||||||
assert.dom('[data-test-tab="Details"]').doesNotExist('Details tab does not exist');
|
assert.dom('[data-test-tab="Details"]').doesNotExist('Details tab does not exist');
|
||||||
assert.dom('[data-test-tab="Versions"]').doesNotExist('Versions tab does not exist');
|
assert.dom('[data-test-tab="Versions"]').doesNotExist('Versions tab does not exist');
|
||||||
});
|
});
|
||||||
|
|
||||||
|
test('it defaults to keyType rsa-2048', async function (assert) {
|
||||||
|
assert.expect(1);
|
||||||
|
const store = this.owner.lookup('service:store');
|
||||||
|
this.model = store.createRecord('keymgmt/key');
|
||||||
|
this.set('mode', 'create');
|
||||||
|
await render(hbs`<Keymgmt::KeyEdit @model={{model}} @mode={{mode}} /><div id="modal-wormhole" />`);
|
||||||
|
assert.dom('[data-test-input="type"]').hasValue('rsa-2048', 'Has type rsa-2048 by default');
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user