mirror of
https://github.com/optim-enterprises-bv/vault.git
synced 2025-11-01 11:08:10 +00:00
UI: KV version 2 advanced secret updates (#25235)
* Show JSON editor by default if secret data is complex, but do not disable JSON toggle * Add text object warning to kv object editor * a11y fix: do not disable show diff toggle * test and language cleanup * update language * Update tests for expected behavior * language! * Add changelog
This commit is contained in:
@@ -110,4 +110,17 @@ module('Integration | Component | kv-object-editor', function (hooks) {
|
||||
await click('[data-test-kv-delete-row="0"]');
|
||||
assert.dom('[data-test-kv-whitespace-warning="0"]').doesNotExist();
|
||||
});
|
||||
|
||||
test('it should display object warning for values when warnNonStringValues true', async function (assert) {
|
||||
const objValue = `{
|
||||
"a": "b"
|
||||
}`;
|
||||
await render(hbs`<KvObjectEditor @onChange={{this.spy}} @warnNonStringValues={{true}} />`);
|
||||
await fillIn('[data-test-kv-value="0"]', objValue);
|
||||
assert.dom('[data-test-kv-object-warning="0"]').exists();
|
||||
await fillIn('[data-test-kv-value="0"]', 'test ');
|
||||
assert.dom('[data-test-kv-object-warning="0"]').doesNotExist();
|
||||
await fillIn('[data-test-kv-value="0"]', 7);
|
||||
assert.dom('[data-test-kv-object-warning="0"]').exists();
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user