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

UI/fix kmip role form #13585

Merged
merged 7 commits into from
Jan 7, 2022
Merged

UI/fix kmip role form #13585

merged 7 commits into from
Jan 7, 2022

Conversation

hashishaw
Copy link
Collaborator

Before this fix, there was a bug where creating a KMIP role did not save any non-operator keys. There was also an issue where TLS info was not displayed on the show details page, due to an issue in InfoTableRow. As part of this work, I glimmerized InfoTableRow Component and added tests for various scenarios.

Before (key bits value does not save)
bad-role

After
kmip-role-after

@vercel vercel bot temporarily deployed to Preview – vault January 6, 2022 17:39 Inactive
@vercel vercel bot temporarily deployed to Preview – vault-storybook January 6, 2022 17:44 Inactive
@@ -1,4 +1,4 @@
<InfoTableRow @label="Name" @value={{@model.name}} @data-test-alias-name={{true}} />
<InfoTableRow @label="Name" @value={{@model.name}} data-test-alias-name={{true}} />
Copy link
Contributor

@Monkeychip Monkeychip Jan 6, 2022

Choose a reason for hiding this comment

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

Curious how that @data.... got in there!

Copy link
Contributor

Choose a reason for hiding this comment

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

Probably an upgrade maybe even back to the big one in 1.7

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I think it was the latest ember upgrade. I considered find-replacing all the @data-test instances, but we have a few cases where it looks like they're actually supposed to work that way (eg. ToolbarSecretLink 😱)

</InfoTableRow>`);

let block = document.querySelector('[data-test-value-div]').textContent.trim();
assert.equal(block, 'Block content is here', 'renders block passed through');
});

test('Row renders when block content even if alwaysRender = false', async function (assert) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Thank you for adding test coverage!

Copy link
Contributor

@Monkeychip Monkeychip 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!

@zofskeez
Copy link
Contributor

zofskeez commented Jan 6, 2022

I was wondering how the layout thing was going to work when glimmerizing addon components. Looks like the template has to be moved along side the component file and it just works?