mirror of
https://github.com/hashicorp/vault.git
synced 2025-08-17 12:07:02 +02:00
* Adding explicit MPL license for sub-package. This directory and its subdirectories (packages) contain files licensed with the MPLv2 `LICENSE` file in this directory and are intentionally licensed separately from the BSL `LICENSE` file at the root of this repository. * Adding explicit MPL license for sub-package. This directory and its subdirectories (packages) contain files licensed with the MPLv2 `LICENSE` file in this directory and are intentionally licensed separately from the BSL `LICENSE` file at the root of this repository. * Updating the license from MPL to Business Source License. Going forward, this project will be licensed under the Business Source License v1.1. Please see our blog post for more details at https://hashi.co/bsl-blog, FAQ at www.hashicorp.com/licensing-faq, and details of the license at www.hashicorp.com/bsl. * add missing license headers * Update copyright file headers to BUS-1.1 * Fix test that expected exact offset on hcl file --------- Co-authored-by: hashicorp-copywrite[bot] <110428419+hashicorp-copywrite[bot]@users.noreply.github.com> Co-authored-by: Sarah Thompson <sthompson@hashicorp.com> Co-authored-by: Brian Kassouf <bkassouf@hashicorp.com>
68 lines
2.7 KiB
JavaScript
68 lines
2.7 KiB
JavaScript
/**
|
|
* Copyright (c) HashiCorp, Inc.
|
|
* SPDX-License-Identifier: BUSL-1.1
|
|
*/
|
|
|
|
import { module, test } from 'qunit';
|
|
import { setupApplicationTest } from 'ember-qunit';
|
|
import { click, currentURL, fillIn } from '@ember/test-helpers';
|
|
import { setupMirage } from 'ember-cli-mirage/test-support';
|
|
import authPage from 'vault/tests/pages/auth';
|
|
|
|
const link = (label) => `[data-test-sidebar-nav-link="${label}"]`;
|
|
const panel = (label) => `[data-test-sidebar-nav-panel="${label}"]`;
|
|
|
|
module('Acceptance | Enterprise | sidebar navigation', function (hooks) {
|
|
setupApplicationTest(hooks);
|
|
setupMirage(hooks);
|
|
|
|
hooks.beforeEach(function () {
|
|
return authPage.login();
|
|
});
|
|
|
|
// common links are tested in the sidebar-nav test and will not be covered here
|
|
test('it should render enterprise only navigation links', async function (assert) {
|
|
assert.dom(panel('Cluster')).exists('Cluster nav panel renders');
|
|
|
|
await click(link('Replication'));
|
|
assert.strictEqual(currentURL(), '/vault/replication', 'Replication route renders');
|
|
await click('[data-test-replication-enable]');
|
|
|
|
await click(link('Performance'));
|
|
assert.strictEqual(
|
|
currentURL(),
|
|
'/vault/replication/performance',
|
|
'Replication performance route renders'
|
|
);
|
|
|
|
await click(link('Disaster Recovery'));
|
|
assert.strictEqual(currentURL(), '/vault/replication/dr', 'Replication dr route renders');
|
|
// disable replication now that we have checked the links
|
|
await click('[data-test-replication-link="manage"]');
|
|
await click('[data-test-replication-action-trigger]');
|
|
await fillIn('[data-test-confirmation-modal-input="Disable Replication?"]', 'Disaster Recovery');
|
|
await click('[data-test-confirm-button="Disable Replication?"]');
|
|
|
|
await click(link('Client Count'));
|
|
assert.strictEqual(currentURL(), '/vault/clients/dashboard', 'Client counts route renders');
|
|
|
|
await click(link('License'));
|
|
assert.strictEqual(currentURL(), '/vault/license', 'License route renders');
|
|
|
|
await click(link('Access'));
|
|
await click(link('Control Groups'));
|
|
assert.strictEqual(currentURL(), '/vault/access/control-groups', 'Control groups route renders');
|
|
|
|
await click(link('Namespaces'));
|
|
assert.strictEqual(currentURL(), '/vault/access/namespaces?page=1', 'Replication route renders');
|
|
|
|
await click(link('Back to main navigation'));
|
|
await click(link('Policies'));
|
|
await click(link('Role-Governing Policies'));
|
|
assert.strictEqual(currentURL(), '/vault/policies/rgp', 'Role-Governing Policies route renders');
|
|
|
|
await click(link('Endpoint Governing Policies'));
|
|
assert.strictEqual(currentURL(), '/vault/policies/egp', 'Endpoint Governing Policies route renders');
|
|
});
|
|
});
|