Skip to content

Commit

Permalink
Revert Namespace Test Fix Attempt (#23888)
Browse files Browse the repository at this point in the history
* Revert "attempts to fix flaky namespace test (#23867)"

This reverts commit 0e36973.

* skips flaky namespace test

* fixes typo in comment

* adds comment as to why test is being skipped
  • Loading branch information
zofskeez authored Oct 27, 2023
1 parent 04676c0 commit fdfbc25
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions ui/tests/acceptance/enterprise-namespaces-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
* SPDX-License-Identifier: BUSL-1.1
*/

import { click, visit, fillIn, currentURL } from '@ember/test-helpers';
import { module, test } from 'qunit';
import { click, settled, visit, fillIn, currentURL } from '@ember/test-helpers';
import { module, test, skip } from 'qunit';
import { setupApplicationTest } from 'ember-qunit';
import { create } from 'ember-cli-page-object';
import consoleClass from 'vault/tests/pages/components/console/ui-panel';
Expand Down Expand Up @@ -34,14 +34,19 @@ module('Acceptance | Enterprise | namespaces', function (hooks) {
assert.dom('[data-test-namespace-link]').doesNotExist('Additional namespace have been cleared');
});

test('it shows nested namespaces if you log in with a namespace starting with a /', async function (assert) {
// this test is flaky and is intentionally being skipped for now
// after seeing it fail both in CI and locally, an attempt at stabilizing it was made in https://github.com/hashicorp/vault/pull/23867
// this seemed to make it consistently pass locally while continuing to fail sporadically in CI
// that fix attempt was reverted in favor of skipping until it can be reworked to reliably pass
skip('it shows nested namespaces if you log in with a namespace starting with a /', async function (assert) {
assert.expect(5);

await click('[data-test-namespace-toggle]');

const nses = ['beep', 'boop', 'bop'];
for (const [i, ns] of nses.entries()) {
await createNS(ns);
await settled();
// the namespace path will include all of the namespaces up to this point
const targetNamespace = nses.slice(0, i + 1).join('/');
const url = `/vault/secrets?namespace=${targetNamespace}`;
Expand All @@ -56,8 +61,11 @@ module('Acceptance | Enterprise | namespaces', function (hooks) {
}

await logout.visit();
await settled();
await authPage.visit({ namespace: '/beep/boop' });
await settled();
await authPage.tokenInput('root').submit();
await settled();
await click('[data-test-namespace-toggle]');

assert.dom('[data-test-current-namespace]').hasText('/beep/boop/', 'current namespace begins with a /');
Expand Down

0 comments on commit fdfbc25

Please sign in to comment.