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?

@hashishaw hashishaw merged commit 3c58827 into main Jan 7, 2022
@hashishaw hashishaw deleted the ui/fix-kmip-role-form branch January 7, 2022 15:17
hashishaw added a commit that referenced this pull request Jan 7, 2022
* Conflicts fixed

* Fix info-table-row not rendering if alwaysRender=false and only block content present

* use defaultFields for form and nonOperationFields for adapter

* WIP: Move info table row template to addon component dir

* Refactor InfoTableRow to glimmer component

* Add changelog

* passthrough attributes, change @data-test-x to data-test-x on InfoTableRow invocations
heppu pushed a commit to heppu/vault that referenced this pull request Jan 13, 2022
* Fix info-table-row not rendering if alwaysRender=false and only block content present

* use defaultFields for form and nonOperationFields for adapter

* WIP: Move info table row template to addon component dir

* Refactor InfoTableRow to glimmer component

* Add changelog

* passthrough attributes, change @data-test-x to data-test-x on InfoTableRow invocations
joatmon08 pushed a commit that referenced this pull request Jan 25, 2022
* Fix info-table-row not rendering if alwaysRender=false and only block content present

* use defaultFields for form and nonOperationFields for adapter

* WIP: Move info table row template to addon component dir

* Refactor InfoTableRow to glimmer component

* Add changelog

* passthrough attributes, change @data-test-x to data-test-x on InfoTableRow invocations
qk4l pushed a commit to qk4l/vault that referenced this pull request Feb 4, 2022
* Fix info-table-row not rendering if alwaysRender=false and only block content present

* use defaultFields for form and nonOperationFields for adapter

* WIP: Move info table row template to addon component dir

* Refactor InfoTableRow to glimmer component

* Add changelog

* passthrough attributes, change @data-test-x to data-test-x on InfoTableRow invocations
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport bug Used to indicate a potential bug ui
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants