diff --git a/addons/core/translations/actions/en-us.yaml b/addons/core/translations/actions/en-us.yaml index f23351b08..0eefc7a68 100644 --- a/addons/core/translations/actions/en-us.yaml +++ b/addons/core/translations/actions/en-us.yaml @@ -62,3 +62,5 @@ yes: Yes no: No narrow-results: Narrow results overflow-options: Overflow Options +show-errors: Show Errors +hide-errors: Hide Errors diff --git a/ui/desktop/app/components/settings-card/application/index.hbs b/ui/desktop/app/components/settings-card/application/index.hbs index b8539a6b1..4828b0214 100644 --- a/ui/desktop/app/components/settings-card/application/index.hbs +++ b/ui/desktop/app/components/settings-card/application/index.hbs @@ -47,14 +47,19 @@ {{t 'settings.alerts.cache-daemon'}} - {{#each @model.cacheDaemonStatus.errors as |error|}} - - {{#if error.name}} - {{error.name}}: - {{/if}} - {{error.message}} - - {{/each}} + + {{#each @model.cacheDaemonStatus.errors as |error|}} + + {{#if error.name}} + {{error.name}}: + {{/if}} + {{error.message}} + + {{/each}} + {{/if}} diff --git a/ui/desktop/app/components/settings-card/client-agent/index.hbs b/ui/desktop/app/components/settings-card/client-agent/index.hbs index b04aec8b9..4daedad10 100644 --- a/ui/desktop/app/components/settings-card/client-agent/index.hbs +++ b/ui/desktop/app/components/settings-card/client-agent/index.hbs @@ -37,11 +37,16 @@ {{t 'settings.alerts.client-agent'}} - {{#each @model.clientAgentStatus.errors as |error|}} - - {{error.message}} - - {{/each}} + + {{#each @model.clientAgentStatus.errors as |error|}} + + {{error.message}} + + {{/each}} + {{/if}} diff --git a/ui/desktop/app/templates/scopes/scope/projects/settings/index.hbs b/ui/desktop/app/templates/scopes/scope/projects/settings/index.hbs index d7b5cd04a..5220d737d 100644 --- a/ui/desktop/app/templates/scopes/scope/projects/settings/index.hbs +++ b/ui/desktop/app/templates/scopes/scope/projects/settings/index.hbs @@ -3,8 +3,8 @@ SPDX-License-Identifier: BUSL-1.1 }} - - + + \ No newline at end of file diff --git a/ui/desktop/tests/integration/components/settings-card/application-test.js b/ui/desktop/tests/integration/components/settings-card/application-test.js index 2c59ecd37..a5ac67e80 100644 --- a/ui/desktop/tests/integration/components/settings-card/application-test.js +++ b/ui/desktop/tests/integration/components/settings-card/application-test.js @@ -5,14 +5,15 @@ import { module, test } from 'qunit'; import { setupRenderingTest } from 'ember-qunit'; -import { render } from '@ember/test-helpers'; +import { click, render } from '@ember/test-helpers'; import { hbs } from 'ember-cli-htmlbars'; import { setupIntl } from 'ember-intl/test-support'; const CACHE_DAEMON_VERSION = '[data-test-cache-version]'; -const ERROR_MESSAGES = '.hds-alert__description > p'; -const FIRST_ERROR_MESSAGE = '.hds-alert__description > p:first-child'; -const LAST_ERROR_MESSAGE = '.hds-alert__description > p:last-child'; +const ERROR_MESSAGES = '.hds-reveal__content > p'; +const REVEAL_BUTTON = '.hds-reveal button'; +const FIRST_ERROR_MESSAGE = '.hds-reveal__content > p:first-child'; +const LAST_ERROR_MESSAGE = '.hds-reveal__content > p:last-child'; module('Integration | Component | settings-card/application', function (hooks) { setupRenderingTest(hooks); @@ -59,6 +60,10 @@ module('Integration | Component | settings-card/application', function (hooks) { hbs``, ); + assert.dom(ERROR_MESSAGES).doesNotExist(); + + await click(REVEAL_BUTTON); + assert.dom(ERROR_MESSAGES).isVisible({ count: 2 }); assert .dom(FIRST_ERROR_MESSAGE) diff --git a/ui/desktop/tests/integration/components/settings-card/client-agent-test.js b/ui/desktop/tests/integration/components/settings-card/client-agent-test.js index 45e8ae6af..f8208ddcc 100644 --- a/ui/desktop/tests/integration/components/settings-card/client-agent-test.js +++ b/ui/desktop/tests/integration/components/settings-card/client-agent-test.js @@ -5,15 +5,16 @@ import { module, test } from 'qunit'; import { setupRenderingTest } from 'ember-qunit'; -import { render } from '@ember/test-helpers'; +import { click, render } from '@ember/test-helpers'; import { hbs } from 'ember-cli-htmlbars'; import { setupIntl } from 'ember-intl/test-support'; const STATUS_BADGE = '.hds-badge'; const ACTION_BUTTON = 'button'; +const REVEAL_BUTTON = '.hds-reveal button'; const CARD_CONTAINER = 'hds-card__container'; -const ERROR_MESSAGES = '.hds-alert__description > p'; -const LAST_ERROR_MESSAGE = '.hds-alert__description > p:last-child'; +const ERROR_MESSAGES = '.hds-reveal__content > p'; +const LAST_ERROR_MESSAGE = '.hds-reveal__content > p:last-child'; module( 'Integration | Component | settings-card/client-agent', @@ -77,6 +78,10 @@ module( await render(hbs``); + assert.dom(ERROR_MESSAGES).doesNotExist(); + + await click(REVEAL_BUTTON); + assert.dom(ERROR_MESSAGES).isVisible({ count: 3 }); assert.dom(LAST_ERROR_MESSAGE).hasText('big oof'); });