mirror of
https://github.com/hashicorp/vault.git
synced 2025-09-19 04:41:09 +02:00
* include all destomatopm types in list filter VAULT-22916 * move refresh list and clear dataset to finally VAULT-22917 * make empty state link prettier; * update empty state message to show display name * update tests * wrap create destination CTA in enterprise conditional * include link in p tag
53 lines
1.6 KiB
JavaScript
53 lines
1.6 KiB
JavaScript
/**
|
|
* Copyright (c) HashiCorp, Inc.
|
|
* SPDX-License-Identifier: BUSL-1.1
|
|
*/
|
|
|
|
import { module, test } from 'qunit';
|
|
import { setupRenderingTest } from 'ember-qunit';
|
|
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';
|
|
|
|
module('Integration | Component | sync | Secrets::LandingCta', function (hooks) {
|
|
setupRenderingTest(hooks);
|
|
setupEngine(hooks, 'sync');
|
|
hooks.beforeEach(function () {
|
|
this.version = this.owner.lookup('service:version');
|
|
});
|
|
|
|
test('it should render promotional copy for community version', async function (assert) {
|
|
await render(
|
|
hbs`
|
|
<Secrets::LandingCta />
|
|
`,
|
|
{ owner: this.engine }
|
|
);
|
|
|
|
assert
|
|
.dom(PAGE.cta.summary)
|
|
.hasText(
|
|
'This enterprise feature allows you to sync secrets to platforms and tools across your stack to get secrets when and where you need them. Learn more about secrets sync'
|
|
);
|
|
assert.dom(PAGE.cta.link).hasText('Learn more about secrets sync');
|
|
});
|
|
|
|
test('it should render enterprise copy', async function (assert) {
|
|
this.version.type = 'enterprise';
|
|
await render(
|
|
hbs`
|
|
<Secrets::LandingCta />
|
|
`,
|
|
{ owner: this.engine }
|
|
);
|
|
|
|
assert
|
|
.dom(PAGE.cta.summary)
|
|
.hasText(
|
|
'Sync secrets to platforms and tools across your stack to get secrets when and where you need them. Secrets sync tutorial'
|
|
);
|
|
assert.dom(PAGE.cta.link).hasText('Secrets sync tutorial');
|
|
});
|
|
});
|