Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug Fix for Kymgmt keyType on default #17407

Merged
merged 4 commits into from
Oct 4, 2022

Conversation

Monkeychip
Copy link
Contributor

Fixes a bug where the first possibleValue was being populated in the dropdown Key Type but because no change event was triggered on init the defaultValue of rsa-2048 was being sent, not the value shown. Setting the defaultValue to match the API fixes this.

Note: defaultValue is a attr on the ember data model. So though our form-field.hbs component does not set the defaultValue if one is specified, the model automatically adds it because it's an ember attribute.

Ran enterprise test locally and all are passing.

@Monkeychip Monkeychip added ui bug Used to indicate a potential bug backport/1.11.x labels Oct 4, 2022
@Monkeychip Monkeychip added this to the 1.13.0-rc1 milestone Oct 4, 2022
@Monkeychip Monkeychip marked this pull request as ready for review October 4, 2022 17:07
Copy link
Contributor

@zofskeez zofskeez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work and thanks for adding a test!

Comment on lines +79 to +86
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');
});
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Used to indicate a potential bug ui
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants