Bug Fix for Kymgmt keyType on default (#17407)
* the fix * add test coverage * changelog * removes comment
This commit is contained in:
parent
805843beaa
commit
345c65ff04
|
@ -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', {
|
||||
subText: 'The type of cryptographic key that will be created.',
|
||||
possibleValues: KEY_TYPES,
|
||||
defaultValue: 'rsa-2048',
|
||||
})
|
||||
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="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');
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue