Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 14 additions & 15 deletions ui/lib/core/addon/components/input-search.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,22 @@
SPDX-License-Identifier: BUSL-1.1
}}

<div class="field is-grouped" ...attributes>
<div class="control is-expanded">
<div class="field" ...attributes>
<Hds::Form::TextInput::Field
@type="text"
@id={{@id}}
@value={{this.searchInput}}
{{on "keyup" this.inputChanged}}
placeholder={{@placeholder}}
autocomplete="off"
data-test-input-search={{@id}}
as |F|
>
{{#if @label}}
<label for={{@id}} class="is-label">{{@label}}</label>
<F.Label>{{@label}}</F.Label>
{{/if}}
{{#if @subText}}
<p class="sub-text">{{@subText}}</p>
<F.HelperText>{{@subText}}</F.HelperText>
{{/if}}
<Input
id={{@id}}
class="input"
@type="text"
@value={{this.searchInput}}
{{on "keyup" this.inputChanged}}
placeholder={{@placeholder}}
autocomplete="off"
data-test-input-search={{@id}}
/>
</div>
</Hds::Form::TextInput::Field>
</div>
4 changes: 2 additions & 2 deletions ui/lib/core/addon/components/input-search.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export default class InputSearch extends Component {
}

@action
inputChanged() {
this.args.onChange(this.searchInput);
inputChanged(event) {
this.args.onChange(event.target.value);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ import logout from 'vault/tests/pages/logout';
import searchSelect from 'vault/tests/pages/components/search-select';
import { deleteEngineCmd, mountEngineCmd, runCmd, tokenWithPolicyCmd } from 'vault/tests/helpers/commands';

import { GENERAL } from 'vault/tests/helpers/general-selectors';

const searchSelectComponent = create(searchSelect);

const newConnection = async (
Expand Down Expand Up @@ -547,7 +549,7 @@ module('Acceptance | secrets/database/*', function (hooks) {
.doesNotExist('Roles card does not exist on overview w/ policy');
assert.dom('.overview-card h2').hasText('1', 'Lists the correct number of connections');
// confirm get credentials card is an option to select. Regression bug.
await typeIn('.ember-text-field', 'blah');
await typeIn(GENERAL.inputSearch('search-input-role'), 'blah');
assert.dom('[data-test-get-credentials]').isEnabled();
// [BANDAID] navigate away to fix test failing on capabilities-self check before teardown
await visit('/vault/secrets');
Expand Down
Loading