ui: handle error messages for when filtering doesn't return matches (#14048)
* refact: add conditional logic to variables.index * refact: add conditional logic to variables.path * refact: update query selectors in assertions
This commit is contained in:
parent
94c16eda16
commit
f97b677928
|
@ -41,12 +41,24 @@
|
|||
/>
|
||||
{{else}}
|
||||
<div class="empty-message">
|
||||
<h3 data-test-empty-variables-list-headline class="empty-message-headline">
|
||||
No Secure Variables
|
||||
</h3>
|
||||
<p class="empty-message-body">
|
||||
Get started by <LinkTo @route="variables.new">creating a new secure variable</LinkTo>
|
||||
</p>
|
||||
{{#if (eq this.namespaceSelection "*")}}
|
||||
<h3 data-test-empty-variables-list-headline class="empty-message-headline">
|
||||
No Secure Variables
|
||||
</h3>
|
||||
<p class="empty-message-body">
|
||||
Get started by <LinkTo @route="variables.new">creating a new secure variable</LinkTo>
|
||||
</p>
|
||||
{{else}}
|
||||
<h3 data-test-no-matching-variables-list-headline class="empty-message-headline">
|
||||
No Matches
|
||||
</h3>
|
||||
<p class="empty-message-body">
|
||||
No paths or variables match the namespace
|
||||
<strong>
|
||||
{{this.namespaceSelection}}
|
||||
</strong>
|
||||
</p>
|
||||
{{/if}}
|
||||
</div>
|
||||
{{/if}}
|
||||
</section>
|
||||
|
|
|
@ -43,12 +43,24 @@
|
|||
/>
|
||||
{{else}}
|
||||
<div class="empty-message">
|
||||
<h3 data-test-empty-variables-list-headline class="empty-message-headline">
|
||||
Path /{{this.model.absolutePath}} contains no variables
|
||||
</h3>
|
||||
<p class="empty-message-body">
|
||||
To get started, <LinkTo @route="variables.new" @query={{hash path=(concat this.model.absolutePath "/")}}>create a new secure variable here</LinkTo>, or <LinkTo @route="variables">go back to the Secure Variables root directory</LinkTo>.
|
||||
</p>
|
||||
{{#if (eq this.namespaceSelection "*")}}
|
||||
<h3 data-test-empty-variables-list-headline class="empty-message-headline">
|
||||
Path /{{this.model.absolutePath}} contains no variables
|
||||
</h3>
|
||||
<p class="empty-message-body">
|
||||
To get started, <LinkTo @route="variables.new" @query={{hash path=(concat this.model.absolutePath "/")}}>create a new secure variable here</LinkTo>, or <LinkTo @route="variables">go back to the Secure Variables root directory</LinkTo>.
|
||||
</p>
|
||||
{{else}}
|
||||
<h3 data-test-no-matching-variables-list-headline class="empty-message-headline">
|
||||
No Matches
|
||||
</h3>
|
||||
<p class="empty-message-body">
|
||||
No paths or variables match the namespace
|
||||
<strong>
|
||||
{{this.namespaceSelection}}
|
||||
</strong>
|
||||
</p>
|
||||
{{/if}}
|
||||
</div>
|
||||
{{/if}}
|
||||
</section>
|
||||
|
|
|
@ -648,7 +648,7 @@ module('Acceptance | secure variables', function (hooks) {
|
|||
await selectChoose('[data-test-variable-namespace-filter]', 'default');
|
||||
|
||||
assert
|
||||
.dom('[data-test-empty-variables-list-headline]')
|
||||
.dom('[data-test-no-matching-variables-list-headline]')
|
||||
.exists('Renders an empty list.');
|
||||
});
|
||||
|
||||
|
@ -710,7 +710,7 @@ module('Acceptance | secure variables', function (hooks) {
|
|||
await selectChoose('[data-test-variable-namespace-filter]', 'default');
|
||||
|
||||
assert
|
||||
.dom('[data-test-empty-variables-list-headline]')
|
||||
.dom('[data-test-no-matching-variables-list-headline]')
|
||||
.exists('Renders an empty list.');
|
||||
});
|
||||
|
||||
|
|
Loading…
Reference in a new issue