{{#if (eq this.model.mode "unsupported")}}
{{! Replication is unsupported in non-enterprise or when using non-transactional storage (eg inmem) }}
-
@@ -112,13 +102,7 @@
{{else}}
{{! Renders when at least one mode is not enabled }}
-
-
-
- Replication
-
-
-
+
{{else}}
{{#if this.model.replicationAttrs.replicationEnabled}}
-
-
-
-
-
-
-
-
-
- {{this.model.replicationModeForDisplay}}
-
-
-
-
+
+ <:breadcrumbs>
+
+
+ <:badges>
+
+
+
+
diff --git a/ui/lib/sync/addon/components/secrets/landing-cta.hbs b/ui/lib/sync/addon/components/secrets/landing-cta.hbs
index bb7d400f6e..11d8da976c 100644
--- a/ui/lib/sync/addon/components/secrets/landing-cta.hbs
+++ b/ui/lib/sync/addon/components/secrets/landing-cta.hbs
@@ -3,14 +3,19 @@
SPDX-License-Identifier: BUSL-1.1
}}
-
+
+ <:badges>
+ {{#if this.flags.isHvdManaged}}
+
+ {{/if}}
+
<:actions>
{{! Only allow users who have activated the feature to create a destination. }}
{{#if @isActivated}}
{{/if}}
-
+
{{! One cta message regardless of OSS vs Enterprise with/without secrets sync or managed cluster. }}
diff --git a/ui/lib/sync/addon/components/secrets/landing-cta.ts b/ui/lib/sync/addon/components/secrets/landing-cta.ts
new file mode 100644
index 0000000000..3a58e8d070
--- /dev/null
+++ b/ui/lib/sync/addon/components/secrets/landing-cta.ts
@@ -0,0 +1,17 @@
+/**
+ * Copyright IBM Corp. 2016, 2025
+ * SPDX-License-Identifier: BUSL-1.1
+ */
+
+import Component from '@glimmer/component';
+import { service } from '@ember/service';
+
+import type FlagsService from 'vault/services/flags';
+
+interface Args {
+ isActivated: boolean;
+}
+
+export default class LandingCtaComponent extends Component
{
+ @service declare readonly flags: FlagsService;
+}
diff --git a/ui/lib/sync/addon/components/sync-header.hbs b/ui/lib/sync/addon/components/sync-header.hbs
index 91f423124c..a6e936f016 100644
--- a/ui/lib/sync/addon/components/sync-header.hbs
+++ b/ui/lib/sync/addon/components/sync-header.hbs
@@ -3,26 +3,15 @@
SPDX-License-Identifier: BUSL-1.1
}}
-
- {{#if @breadcrumbs}}
-
+
+ <:breadcrumbs>
+ {{#if @breadcrumbs}}
-
- {{/if}}
-
-
-
- {{#if @icon}}
-
- {{/if}}
- {{@title}}
- {{#if this.flags.isHvdManaged}}
-
- {{/if}}
-
-
-
-
- {{yield to="actions"}}
-
-
\ No newline at end of file
+ {{/if}}
+
+ <:badges>
+ {{#if this.flags.isHvdManaged}}
+
+ {{/if}}
+
+
\ No newline at end of file
diff --git a/ui/tests/acceptance/enterprise-replication-dr-secondaries-test.js b/ui/tests/acceptance/enterprise-replication-dr-secondaries-test.js
index 98a147afb1..baea2cdc08 100644
--- a/ui/tests/acceptance/enterprise-replication-dr-secondaries-test.js
+++ b/ui/tests/acceptance/enterprise-replication-dr-secondaries-test.js
@@ -143,7 +143,7 @@ module('Acceptance | Enterprise | replication-secondaries', function (hooks) {
'Promote this cluster to a Disaster Recovery primary',
'shows the correct description for a DR secondary'
);
- assert.dom('[data-test-mode]').includesText('secondary', 'shows the DR secondary mode badge');
+ assert.dom(GENERAL.badge('secondary')).includesText('secondary', 'shows the DR secondary mode badge');
await click(GENERAL.linkTo('Details'));
assert
diff --git a/ui/tests/acceptance/enterprise-replication-modes-test.js b/ui/tests/acceptance/enterprise-replication-modes-test.js
index 66d75e3909..b22afa036d 100644
--- a/ui/tests/acceptance/enterprise-replication-modes-test.js
+++ b/ui/tests/acceptance/enterprise-replication-modes-test.js
@@ -21,10 +21,9 @@ const s = {
};
// wait for specific title selector as an attempt to stabilize flaky tests
-async function assertTitle(assert, title, altSelector) {
- const selector = altSelector || title;
- await waitFor(s.title(selector));
- assert.dom(s.title(selector)).hasText(title);
+async function assertTitle(assert, title) {
+ await waitFor(GENERAL.hdsPageHeaderTitle);
+ assert.dom(GENERAL.hdsPageHeaderTitle).hasText(title);
}
module('Acceptance | Enterprise | replication modes', function (hooks) {
@@ -124,7 +123,8 @@ module('Acceptance | Enterprise | replication modes', function (hooks) {
assert.dom(s.enableForm).exists('it shows the enable view for performance');
await click(GENERAL.navLink('Disaster Recovery'));
- await assertTitle(assert, 'Disaster Recovery primary', 'Disaster Recovery');
+ await assertTitle(assert, 'Disaster Recovery', 'Disaster Recovery');
+ assert.dom(GENERAL.badge('primary')).exists('shows primary badge for dr');
assert.dom(s.dashboard).exists(`it shows the replication dashboard`);
});
@@ -134,15 +134,18 @@ module('Acceptance | Enterprise | replication modes', function (hooks) {
performance: mockReplicationBlock('primary'),
});
await visit('/vault/replication');
- await assertTitle(assert, 'Disaster Recovery & Performance primary', 'Disaster Recovery & Performance');
+ await assertTitle(assert, 'Disaster Recovery & Performance', 'Disaster Recovery & Performance');
+ assert.dom(GENERAL.badge('primary')).exists('shows primary badge for dr');
assert.dom(s.summaryCard).exists({ count: 2 }, 'shows 2 summary cards');
await click(GENERAL.navLink('Performance'));
- await assertTitle(assert, 'Performance primary', 'Performance');
+ await assertTitle(assert, 'Performance', 'Performance');
+ assert.dom(GENERAL.badge('primary')).exists('shows primary badge for dr');
assert.dom(s.enableForm).doesNotExist();
await click(GENERAL.navLink('Disaster Recovery'));
- await assertTitle(assert, 'Disaster Recovery primary', 'Disaster Recovery');
+ await assertTitle(assert, 'Disaster Recovery', 'Disaster Recovery');
+ assert.dom(GENERAL.badge('primary')).exists('shows primary badge for dr');
assert.dom(s.enableForm).doesNotExist();
});
});
diff --git a/ui/tests/acceptance/enterprise-replication-test.js b/ui/tests/acceptance/enterprise-replication-test.js
index c52bcf5cbf..ee95cab4f9 100644
--- a/ui/tests/acceptance/enterprise-replication-test.js
+++ b/ui/tests/acceptance/enterprise-replication-test.js
@@ -39,11 +39,9 @@ module('Acceptance | Enterprise | replication', function (hooks) {
await pollCluster(this.owner);
await settled();
assert
- .dom('[data-test-replication-title="Disaster Recovery"]')
+ .dom(GENERAL.hdsPageHeaderTitle)
.includesText('Disaster Recovery', 'it displays the replication type correctly');
- assert
- .dom('[data-test-replication-mode-display]')
- .includesText('primary', 'it displays the cluster mode correctly');
+ assert.dom(GENERAL.badge('primary')).includesText('primary', 'it displays the cluster mode correctly');
await addSecondary(secondaryName);
// modal for copying the token appears
@@ -258,7 +256,7 @@ module('Acceptance | Enterprise | replication', function (hooks) {
assert.dom('[data-test-replication-dashboard]').exists();
assert.dom('[data-test-selectable-card-container="secondary"]').exists();
assert
- .dom('[data-test-replication-mode-display]')
+ .dom(GENERAL.badge('secondary'))
.hasText('secondary', 'it displays the cluster mode correctly in header');
});
@@ -283,10 +281,10 @@ module('Acceptance | Enterprise | replication', function (hooks) {
await settled();
// Breadcrumbs only load once we're in the summary mode after enabling
- await waitFor('[data-test-replication-breadcrumb]');
+ await waitFor(GENERAL.breadcrumb);
// navigate using breadcrumbs back to replication.index
- assert.dom('[data-test-replication-breadcrumb]').exists('shows the replication breadcrumb (flaky)');
- await click('[data-test-replication-breadcrumb] a');
+ assert.dom(GENERAL.currentBreadcrumb('Replication')).exists('shows the replication breadcrumb (flaky)');
+ await click(GENERAL.breadcrumbLink('Replication'));
assert
.dom('[data-test-replication-summary-card]')
diff --git a/ui/tests/acceptance/replication-nav-test.js b/ui/tests/acceptance/replication-nav-test.js
index 731408f39f..c917d82c50 100644
--- a/ui/tests/acceptance/replication-nav-test.js
+++ b/ui/tests/acceptance/replication-nav-test.js
@@ -31,18 +31,21 @@ module('Acceptance | Enterprise | replication navigation', function (hooks) {
test('navigate between replication types updates page', async function (assert) {
await click(SELECTORS.navReplication);
- assert.dom(SELECTORS.title).hasText('Disaster Recovery & Performance primary');
+ assert.dom(GENERAL.hdsPageHeaderTitle).hasText('Disaster Recovery & Performance');
+ assert.dom(GENERAL.badge('primary')).exists('shows primary badge for dr');
await click(SELECTORS.navPerformance);
// Ensure data is expected for performance
- assert.dom(SELECTORS.title).hasText('Performance primary');
+ assert.dom(GENERAL.hdsPageHeaderTitle).hasText('Performance');
+ assert.dom(GENERAL.badge('primary')).exists('shows primary badge for performance');
assert.dom(SELECTORS.primaryCluster).hasText('perf-foobar');
assert.dom(SELECTORS.replicationSet).hasText('perf-cluster-id');
assert.dom(SELECTORS.knownSecondariesTitle).hasText('0 Known secondaries');
// Nav to DR and see updated data
await click(SELECTORS.navDR);
- assert.dom(SELECTORS.title).hasText('Disaster Recovery primary');
+ assert.dom(GENERAL.hdsPageHeaderTitle).hasText('Disaster Recovery');
+ assert.dom(GENERAL.badge('primary')).exists('shows primary badge for dr');
assert.dom(SELECTORS.primaryCluster).hasText('dr-foobar');
assert.dom(SELECTORS.replicationSet).hasText('dr-cluster-id');
assert.dom(SELECTORS.knownSecondariesTitle).hasText('1 Known secondaries');
diff --git a/ui/tests/acceptance/secrets/backend/kv/secret-test.js b/ui/tests/acceptance/secrets/backend/kv/secret-test.js
index b9b08713ac..78a0e20c7e 100644
--- a/ui/tests/acceptance/secrets/backend/kv/secret-test.js
+++ b/ui/tests/acceptance/secrets/backend/kv/secret-test.js
@@ -361,7 +361,7 @@ module('Acceptance | secrets/secret/create, read, delete', function (hooks) {
'vault.cluster.secrets.backend.show',
`${path}: show page renders correctly`
);
- assert.dom('h1.title').hasText(`${path}/2`, 'shows correct page title');
+ assert.dom(GENERAL.hdsPageHeaderTitle).hasText(`${path}/2`, 'shows correct page title');
}
});
diff --git a/ui/tests/integration/components/kubernetes/page/credentials-test.js b/ui/tests/integration/components/kubernetes/page/credentials-test.js
index f7051be168..c56f9f63f1 100644
--- a/ui/tests/integration/components/kubernetes/page/credentials-test.js
+++ b/ui/tests/integration/components/kubernetes/page/credentials-test.js
@@ -65,7 +65,7 @@ module('Integration | Component | kubernetes | Page::Credentials', function (hoo
test('it should display generate credentials form', async function (assert) {
await this.renderComponent();
- assert.dom('[data-test-credentials-header]').hasText('Generate credentials');
+ assert.dom(GENERAL.hdsPageHeaderTitle).hasText('Generate credentials');
assert
.dom('[data-test-generate-credentials] p')
.hasText(`This will generate credentials using the role ${this.roleName}.`);
@@ -118,7 +118,7 @@ module('Integration | Component | kubernetes | Page::Credentials', function (hoo
this.generateStub.calledWith(this.roleName, this.backend, payload),
'Generate credentials request made'
);
- assert.dom('[data-test-credentials-header]').hasText('Credentials');
+ assert.dom(GENERAL.hdsPageHeaderTitle).hasText('Credentials');
assert.dom('[data-test-k8-alert-title]').hasText('Warning');
assert
.dom('[data-test-k8-alert-message]')
diff --git a/ui/tests/integration/components/replication-header-test.js b/ui/tests/integration/components/replication-header-test.js
index 4c83c1e133..18501560bd 100644
--- a/ui/tests/integration/components/replication-header-test.js
+++ b/ui/tests/integration/components/replication-header-test.js
@@ -7,6 +7,7 @@ import { module, test } from 'qunit';
import { setupRenderingTest } from 'ember-qunit';
import { render } from '@ember/test-helpers';
import hbs from 'htmlbars-inline-precompile';
+import { GENERAL } from 'vault/tests/helpers/general-selectors';
const DATA = {
anyReplicationEnabled: true,
@@ -37,7 +38,7 @@ module('Integration | Component | replication-header', function (hooks) {
`);
- assert.dom('[data-test-replication-header]').exists();
+ assert.dom(GENERAL.hdsPageHeaderTitle).exists();
});
test('it renders with mode and secondaryId when set', async function (assert) {
@@ -45,8 +46,8 @@ module('Integration | Component | replication-header', function (hooks) {
`);
- assert.dom('[data-test-secondaryId]').includesText(SECONDARY_ID, `shows the correct secondaryId value`);
- assert.dom('[data-test-mode]').includesText('secondary', `shows the correct mode value`);
+ assert.dom(GENERAL.badge(SECONDARY_ID)).includesText(SECONDARY_ID, `shows the correct secondaryId value`);
+ assert.dom(GENERAL.badge('secondary')).includesText('secondary', `shows the correct mode value`);
});
test('it does not render mode or secondaryId when replication is not enabled', async function (assert) {
@@ -60,7 +61,7 @@ module('Integration | Component | replication-header', function (hooks) {
`);
assert.dom('[data-test-secondaryId]').doesNotExist();
- assert.dom('[data-test-mode]').doesNotExist();
+ assert.dom(GENERAL.badge('secondary')).doesNotExist();
});
test('it does not show tabs when showTabs is not set', async function (assert) {
diff --git a/ui/tests/integration/components/replication-page-test.js b/ui/tests/integration/components/replication-page-test.js
index b88ea1308e..f50fe7a208 100644
--- a/ui/tests/integration/components/replication-page-test.js
+++ b/ui/tests/integration/components/replication-page-test.js
@@ -8,6 +8,7 @@ import { setupRenderingTest } from 'ember-qunit';
import { render } from '@ember/test-helpers';
import hbs from 'htmlbars-inline-precompile';
import { setupMirage } from 'ember-cli-mirage/test-support';
+import { GENERAL } from 'vault/tests/helpers/general-selectors';
module('Integration | Component | replication-page', function (hooks) {
setupRenderingTest(hooks);
@@ -60,13 +61,13 @@ module('Integration | Component | replication-page', function (hooks) {
await render(
hbs` `
);
- assert.dom('[data-test-replication-title="Disaster Recovery"]').hasText('Disaster Recovery');
+ assert.dom(GENERAL.hdsPageHeaderTitle).hasText('Disaster Recovery');
this.model.replicationMode = 'performance';
await render(
hbs` `
);
- assert.dom('[data-test-replication-title="Performance"]').hasText('Performance');
+ assert.dom(GENERAL.hdsPageHeaderTitle).hasText('Performance');
});
});
diff --git a/ui/tests/integration/components/secret-list-header-test.js b/ui/tests/integration/components/secret-list-header-test.js
index d05cd67043..f031a75265 100644
--- a/ui/tests/integration/components/secret-list-header-test.js
+++ b/ui/tests/integration/components/secret-list-header-test.js
@@ -9,6 +9,7 @@ import { getContext, render } from '@ember/test-helpers';
import hbs from 'htmlbars-inline-precompile';
import { supportedSecretBackends } from 'vault/helpers/supported-secret-backends';
import { setupMirage } from 'ember-cli-mirage/test-support';
+import { GENERAL } from 'vault/tests/helpers/general-selectors';
const mirageToModels = (data) => {
const context = getContext();
@@ -39,17 +40,18 @@ module('Integration | Component | secret-list-header', function (hooks) {
@model={{this.model}}
/>
`);
- const selector = '[data-test-kv-version-badge]';
if (['kv', 'generic'].includes(type)) {
assert
- .dom(selector)
+ .dom(GENERAL.badge('kv version'))
.hasText(
`version ${this.model.version || 1}`,
`Badge renders with correct version for ${type} engine type`
);
} else {
- assert.dom(selector).doesNotExist(`Version badge does not render for ${type} engine type`);
+ assert
+ .dom(GENERAL.badge('kv version'))
+ .doesNotExist(`Version badge does not render for ${type} engine type`);
}
}
});
diff --git a/ui/tests/integration/components/sync/secrets/destination-header-test.js b/ui/tests/integration/components/sync/secrets/destination-header-test.js
index a7667818b3..278ef35de6 100644
--- a/ui/tests/integration/components/sync/secrets/destination-header-test.js
+++ b/ui/tests/integration/components/sync/secrets/destination-header-test.js
@@ -12,6 +12,7 @@ import hbs from 'htmlbars-inline-precompile';
import { click, fillIn, render } from '@ember/test-helpers';
import { PAGE } from 'vault/tests/helpers/sync/sync-selectors';
import sinon from 'sinon';
+import { GENERAL } from 'vault/tests/helpers/general-selectors';
module('Integration | Component | sync | Secrets::DestinationHeader', function (hooks) {
setupRenderingTest(hooks);
@@ -33,7 +34,7 @@ module('Integration | Component | sync | Secrets::DestinationHeader', function (
test('it should render SyncHeader component', async function (assert) {
await this.renderComponent();
- assert.dom(PAGE.title).includesText('destination-aws', 'SyncHeader component renders');
+ assert.dom(GENERAL.hdsPageHeaderTitle).includesText('destination-aws', 'SyncHeader component renders');
});
test('it should render tabs', async function (assert) {
diff --git a/ui/tests/integration/components/sync/secrets/page/destinations-test.js b/ui/tests/integration/components/sync/secrets/page/destinations-test.js
index 74e1c9f831..6b9e28421d 100644
--- a/ui/tests/integration/components/sync/secrets/page/destinations-test.js
+++ b/ui/tests/integration/components/sync/secrets/page/destinations-test.js
@@ -14,7 +14,7 @@ import sinon from 'sinon';
import { PAGE } from 'vault/tests/helpers/sync/sync-selectors';
import { GENERAL } from 'vault/tests/helpers/general-selectors';
-const { title, tab, filter, searchSelect, emptyStateTitle, destinations, confirmButton } = PAGE;
+const { tab, filter, searchSelect, emptyStateTitle, destinations, confirmButton } = PAGE;
module('Integration | Component | sync | Page::Destinations', function (hooks) {
setupRenderingTest(hooks);
@@ -64,7 +64,7 @@ module('Integration | Component | sync | Page::Destinations', function (hooks) {
test('it should render header and tabs', async function (assert) {
await this.renderComponent();
- assert.dom(title).hasText('Secrets Sync', 'Page title renders');
+ assert.dom(GENERAL.hdsPageHeaderTitle).hasText('Secrets Sync', 'Page title renders');
assert.dom(tab('Overview')).exists('Overview tab renders');
assert.dom(tab('Destinations')).exists('Destinations tab renders');
});
diff --git a/ui/tests/integration/components/sync/secrets/page/destinations/create-and-edit-test.js b/ui/tests/integration/components/sync/secrets/page/destinations/create-and-edit-test.js
index 8ed229f888..48f3e2c666 100644
--- a/ui/tests/integration/components/sync/secrets/page/destinations/create-and-edit-test.js
+++ b/ui/tests/integration/components/sync/secrets/page/destinations/create-and-edit-test.js
@@ -267,7 +267,7 @@ module('Integration | Component | sync | Secrets::Page::Destinations::CreateAndE
await this.renderComponent();
- assert.dom(PAGE.title).hasTextContaining(`Create Destination for ${name}`);
+ assert.dom(GENERAL.hdsPageHeaderTitle).hasTextContaining(`Create Destination for ${name}`);
for (const field of this.formFields) {
assert.dom(PAGE.fieldByAttr(field.name)).exists();
@@ -401,7 +401,7 @@ module('Integration | Component | sync | Secrets::Page::Destinations::CreateAndE
await this.renderComponent(false, type);
- assert.dom(PAGE.title).hasTextContaining(`Edit ${this.form.name}`);
+ assert.dom(GENERAL.hdsPageHeaderTitle).hasTextContaining(`Edit ${this.form.name}`);
for (const field of this.formFields) {
if (editable.includes(field.name)) {
diff --git a/ui/tests/integration/components/sync/secrets/page/destinations/destination/details-test.js b/ui/tests/integration/components/sync/secrets/page/destinations/destination/details-test.js
index be97b56b09..347bccca2d 100644
--- a/ui/tests/integration/components/sync/secrets/page/destinations/destination/details-test.js
+++ b/ui/tests/integration/components/sync/secrets/page/destinations/destination/details-test.js
@@ -13,6 +13,7 @@ import { PAGE } from 'vault/tests/helpers/sync/sync-selectors';
import { syncDestinations, findDestination } from 'vault/helpers/sync-destinations';
import { toLabel } from 'vault/helpers/to-label';
import { setupDataStubs } from 'vault/tests/helpers/sync/setup-hooks';
+import { GENERAL } from 'vault/tests/helpers/general-selectors';
const SYNC_DESTINATIONS = syncDestinations();
module(
@@ -119,7 +120,7 @@ module(
assert
.dom(PAGE.destinations.details.sectionHeader)
.doesNotExist('does not render Custom tags header');
- assert.dom(PAGE.title).hasTextContaining(this.destination.name);
+ assert.dom(GENERAL.hdsPageHeaderTitle).hasTextContaining(this.destination.name);
assert.dom(PAGE.icon(findDestination(destination.type).icon)).exists();
assert.dom(PAGE.infoRowValue('Name')).hasText(this.destination.name);
diff --git a/ui/tests/integration/components/sync/secrets/page/destinations/destination/secrets-test.js b/ui/tests/integration/components/sync/secrets/page/destinations/destination/secrets-test.js
index 699fab39ae..c0595078d1 100644
--- a/ui/tests/integration/components/sync/secrets/page/destinations/destination/secrets-test.js
+++ b/ui/tests/integration/components/sync/secrets/page/destinations/destination/secrets-test.js
@@ -15,6 +15,7 @@ import sinon from 'sinon';
import { Response } from 'miragejs';
import { PAGE } from 'vault/tests/helpers/sync/sync-selectors';
+import { GENERAL } from 'vault/tests/helpers/general-selectors';
module(
'Integration | Component | sync | Secrets::Page::Destinations::Destination::Secrets',
@@ -41,7 +42,9 @@ module(
});
test('it should render DestinationHeader component', async function (assert) {
- assert.dom(PAGE.title).includesText('destination-aws', 'DestinationHeader component renders');
+ assert
+ .dom(GENERAL.hdsPageHeaderTitle)
+ .includesText('destination-aws', 'DestinationHeader component renders');
});
test('it should render empty list state', async function (assert) {
diff --git a/ui/tests/integration/components/sync/secrets/page/overview-test.js b/ui/tests/integration/components/sync/secrets/page/overview-test.js
index fb1e2a9a8b..e61ca9b818 100644
--- a/ui/tests/integration/components/sync/secrets/page/overview-test.js
+++ b/ui/tests/integration/components/sync/secrets/page/overview-test.js
@@ -18,8 +18,9 @@ import { Response } from 'miragejs';
import { dateFormat } from 'core/helpers/date-format';
import { allowAllCapabilitiesStub } from 'vault/tests/helpers/stubs';
import { listDestinationsTransform } from 'sync/utils/api-transforms';
+import { GENERAL } from 'vault/tests/helpers/general-selectors';
-const { title, tab, overviewCard, cta, overview, emptyStateTitle, emptyStateMessage } = PAGE;
+const { tab, overviewCard, cta, overview, emptyStateTitle, emptyStateMessage } = PAGE;
module('Integration | Component | sync | Page::Overview', function (hooks) {
setupRenderingTest(hooks);
@@ -94,7 +95,7 @@ module('Integration | Component | sync | Page::Overview', function (hooks) {
});
await this.renderComponent();
- assert.dom(title).hasText('Secrets Sync', 'Page title renders');
+ assert.dom(GENERAL.hdsPageHeaderTitle).hasText('Secrets Sync', 'Page title renders');
assert.dom(cta.summary).doesNotExist('CTA does not render');
assert.dom(tab('Overview')).hasText('Overview', 'Overview tab renders');
assert.dom(tab('Destinations')).hasText('Destinations', 'Destinations tab renders');
@@ -114,7 +115,8 @@ module('Integration | Component | sync | Page::Overview', function (hooks) {
await this.renderComponent();
assert.dom(overview.optInBanner.container).doesNotExist('Opt-in banner is not shown');
- assert.dom(title).hasText('Secrets Sync Plus feature');
+ assert.dom(GENERAL.hdsPageHeaderTitle).hasText('Secrets Sync');
+ assert.dom(GENERAL.badge('Plus feature')).hasText('Plus feature', 'Plus feature badge renders');
assert.dom(cta.button).hasText('Create first destination', 'CTA action renders');
assert.dom(cta.summary).exists();
});
@@ -156,7 +158,7 @@ module('Integration | Component | sync | Page::Overview', function (hooks) {
this.isActivated = true;
await this.renderComponent();
- assert.dom(title).hasText('Secrets Sync');
+ assert.dom(GENERAL.hdsPageHeaderTitle).hasText('Secrets Sync');
assert.dom(cta.button).hasText('Create first destination', 'CTA action renders');
assert.dom(cta.summary).exists();
});
diff --git a/ui/tests/integration/components/sync/sync-header-test.js b/ui/tests/integration/components/sync/sync-header-test.js
index 556cb626f7..8427bf6e52 100644
--- a/ui/tests/integration/components/sync/sync-header-test.js
+++ b/ui/tests/integration/components/sync/sync-header-test.js
@@ -9,8 +9,9 @@ import { setupEngine } from 'ember-engines/test-support';
import hbs from 'htmlbars-inline-precompile';
import { render } from '@ember/test-helpers';
import { PAGE } from 'vault/tests/helpers/sync/sync-selectors';
+import { GENERAL } from 'vault/tests/helpers/general-selectors';
-const { title, breadcrumb } = PAGE;
+const { breadcrumb } = PAGE;
module('Integration | Component | sync | SyncHeader', function (hooks) {
setupRenderingTest(hooks);
@@ -42,7 +43,7 @@ module('Integration | Component | sync | SyncHeader', function (hooks) {
this.version.features = ['Secrets Sync'];
await this.renderComponent();
- assert.dom(title).hasText('Secrets Sync');
+ assert.dom(GENERAL.hdsPageHeaderTitle).hasText('Secrets Sync');
});
});
@@ -54,22 +55,8 @@ module('Integration | Component | sync | SyncHeader', function (hooks) {
test('it should render title and plus badge', async function (assert) {
await this.renderComponent();
- assert.dom(title).hasText('Secrets Sync Plus feature');
+ assert.dom(GENERAL.hdsPageHeaderTitle).hasText('Secrets Sync');
+ assert.dom(GENERAL.badge('Plus feature')).hasText('Plus feature', 'Plus feature badge renders');
});
});
-
- test('it should yield actions block', async function (assert) {
- await render(
- hbs`
-
- <:actions>
- Test
-
-
- `,
- { owner: this.engine }
- );
-
- assert.dom('[data-test-action-block]').exists('Component yields block for actions');
- });
});
diff --git a/ui/tests/integration/components/upgrade-page-test.js b/ui/tests/integration/components/upgrade-page-test.js
index a2ef728e4d..290483e513 100644
--- a/ui/tests/integration/components/upgrade-page-test.js
+++ b/ui/tests/integration/components/upgrade-page-test.js
@@ -7,6 +7,7 @@ import { module, test } from 'qunit';
import { setupRenderingTest } from 'ember-qunit';
import { render } from '@ember/test-helpers';
import hbs from 'htmlbars-inline-precompile';
+import { GENERAL } from 'vault/tests/helpers/general-selectors';
module('Integration | Component | upgrade page', function (hooks) {
setupRenderingTest(hooks);
@@ -16,7 +17,7 @@ module('Integration | Component | upgrade page', function (hooks) {
{{upgrade-page}}
`);
- assert.dom('.page-header .title').hasText('Vault Enterprise', 'renders default page title');
+ assert.dom(GENERAL.hdsPageHeaderTitle).hasText('Vault Enterprise', 'renders default page title');
assert
.dom('[data-test-empty-state-title]')
.hasText('Upgrade to use this feature', 'renders default title');
@@ -34,7 +35,7 @@ module('Integration | Component | upgrade page', function (hooks) {
{{upgrade-page title="Test Feature Title" minimumEdition="Vault Enterprise Premium"}}
`);
- assert.dom('.page-header .title').hasText('Test Feature Title', 'renders custom page title');
+ assert.dom(GENERAL.hdsPageHeaderTitle).hasText('Test Feature Title', 'renders custom page title');
assert
.dom('[data-test-empty-state-title]')
.hasText('Upgrade to use Test Feature Title', 'renders custom title');