diff --git a/ui/lib/replication/addon/templates/index.hbs b/ui/lib/replication/addon/templates/index.hbs index bae4ef0ef..3eb52b43c 100644 --- a/ui/lib/replication/addon/templates/index.hbs +++ b/ui/lib/replication/addon/templates/index.hbs @@ -1,25 +1,23 @@
- {{#if this.model.replicationIsInitializing}} + {{#if (eq this.model.mode "unsupported")}} + + +

+ Replication unsupported +

+
+
+ + {{else if this.model.replicationIsInitializing}} {{else}} - {{#if (eq this.model.mode "unsupported")}} - - -

- Replication unsupported -

-
-
- - {{else}} - - {{/if}} + {{/if}}
\ No newline at end of file diff --git a/ui/tests/acceptance/enterprise-replication-unsupported-test.js b/ui/tests/acceptance/enterprise-replication-unsupported-test.js new file mode 100644 index 000000000..cfcb2a73c --- /dev/null +++ b/ui/tests/acceptance/enterprise-replication-unsupported-test.js @@ -0,0 +1,33 @@ +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: BUSL-1.1 + */ + +import { module, test } from 'qunit'; +import { setupApplicationTest } from 'ember-qunit'; +import { setupMirage } from 'ember-cli-mirage/test-support'; +import authPage from 'vault/tests/pages/auth'; +import { visit } from '@ember/test-helpers'; + +module('Acceptance | Enterprise | replication unsupported', function (hooks) { + setupApplicationTest(hooks); + setupMirage(hooks); + + hooks.beforeEach(async function () { + this.server.get('/sys/replication/status', function () { + return { + data: { + mode: 'unsupported', + }, + }; + }); + return authPage.login(); + }); + + test('replication page when unsupported', async function (assert) { + await visit('/vault/replication'); + assert + .dom('[data-test-replication-title]') + .hasText('Replication unsupported', 'it shows the unsupported view'); + }); +});