mirror of
https://github.com/hashicorp/vault.git
synced 2026-05-04 20:06:27 +02:00
* lets add some waits * maybe its the wizard? * clear logout state Co-authored-by: claire bontempo <68122737+hellobontempo@users.noreply.github.com>
This commit is contained in:
parent
4d2ccaa86e
commit
ad9144da7e
@ -18,6 +18,7 @@ module('Acceptance | Enterprise | Managed namespace root', function (hooks) {
|
||||
this.server.get('/sys/internal/ui/feature-flags', () => {
|
||||
return { feature_flags: ['VAULT_CLOUD_ADMIN_NAMESPACE'] };
|
||||
});
|
||||
window.localStorage.clear();
|
||||
});
|
||||
|
||||
test('it shows the managed namespace toolbar when feature flag exists', async function (assert) {
|
||||
|
||||
@ -3,11 +3,12 @@
|
||||
* SPDX-License-Identifier: BUSL-1.1
|
||||
*/
|
||||
|
||||
import { click, currentURL, currentRouteName, visit, fillIn } from '@ember/test-helpers';
|
||||
import { click, currentURL, currentRouteName, visit, fillIn, waitFor } from '@ember/test-helpers';
|
||||
import { module, test } from 'qunit';
|
||||
import { setupApplicationTest } from 'ember-qunit';
|
||||
import { login } from 'vault/tests/helpers/auth/auth-helpers';
|
||||
import { GENERAL } from 'vault/tests/helpers/general-selectors';
|
||||
import localStorage from 'vault/lib/local-storage';
|
||||
|
||||
module('Acceptance | policies', function (hooks) {
|
||||
setupApplicationTest(hooks);
|
||||
@ -40,8 +41,10 @@ module('Acceptance | policies', function (hooks) {
|
||||
|
||||
test('it navigates to and from policy show page from sidebar', async function (assert) {
|
||||
await visit('/vault/dashboard');
|
||||
localStorage.setItem('dismissed-wizards', ['acl-policy']);
|
||||
await click(GENERAL.navLink('Access control'));
|
||||
assert.strictEqual(currentURL(), '/vault/policies/acl', 'currentURL is /vault/policies/acl');
|
||||
await waitFor('[data-test-component="navigate-input"]');
|
||||
await fillIn('[data-test-component="navigate-input"]', 'default'); // filter for the policy in case there are many on this view and the default policy is on the second page
|
||||
await click('[data-test-policy-link="default"]');
|
||||
assert.strictEqual(currentURL(), '/vault/policy/acl/default');
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user