Fix issues from partitioning tests (#12523) (#12525)

* 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:
Vault Automation 2026-02-24 19:03:43 -07:00 committed by GitHub
parent 4d2ccaa86e
commit ad9144da7e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 5 additions and 1 deletions

View File

@ -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) {

View File

@ -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');