-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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: [VAULT-20186] decode uri for all attributes in the table #23695
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good to me but maybe a test to cover the specific case would be good to ensure an encoded connection url is decoded as expected?
Build Results: |
@zofskeez Just added the test! 😬 |
test('connection_url must be decoded', async function (assert) { | ||
const backend = this.backend; | ||
const connection = await newConnection( | ||
backend, | ||
'mongodb-database-plugin', | ||
'{{username}}/{{password}}@oracle-xe:1521/XEPDB1' | ||
); | ||
await navToConnection(backend, connection); | ||
assert | ||
.dom('[data-test-row-value="Connection URL"]') | ||
.hasText('{{username}}/{{password}}@oracle-xe:1521/XEPDB1'); | ||
}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just to verify, if you remove the decode-uri
helper from the template this test fails?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perfect thanks for adding this test!
test('connection_url must be decoded', async function (assert) { | ||
const backend = this.backend; | ||
const connection = await newConnection( | ||
backend, | ||
'mongodb-database-plugin', | ||
'{{username}}/{{password}}@oracle-xe:1521/XEPDB1' | ||
); | ||
await navToConnection(backend, connection); | ||
assert | ||
.dom('[data-test-row-value="Connection URL"]') | ||
.hasText('{{username}}/{{password}}@oracle-xe:1521/XEPDB1'); | ||
}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perfect thanks for adding this test!
Description
connection_url
was being displayed with encoded characters. I added adecode_uri
helper to decode_uri's in templates.Bug:
After decoding: