mirror of
https://github.com/hashicorp/vault.git
synced 2026-05-28 04:10:44 -04:00
UI: fix failing policy test (#27430)
* add spy to assert flash * user general selector instead * attempt to stabilize oidc-config test
This commit is contained in:
parent
5517d0764c
commit
3fb78e39c0
2 changed files with 5 additions and 3 deletions
|
|
@ -4,7 +4,7 @@
|
|||
*/
|
||||
|
||||
import { module, test } from 'qunit';
|
||||
import { visit, click, fillIn, findAll, currentRouteName } from '@ember/test-helpers';
|
||||
import { visit, click, fillIn, findAll, currentRouteName, waitFor } from '@ember/test-helpers';
|
||||
import { setupApplicationTest } from 'ember-qunit';
|
||||
import { setupMirage } from 'ember-cli-mirage/test-support';
|
||||
import oidcConfigHandlers from 'vault/mirage/handlers/oidc-config';
|
||||
|
|
@ -89,6 +89,7 @@ module('Acceptance | oidc-config clients and keys', function (hooks) {
|
|||
'key edit form navigates back to details on cancel'
|
||||
);
|
||||
await click(SELECTORS.keyClientsTab);
|
||||
waitFor('[data-test-oidc-client-linked-block="client-with-default-key"]');
|
||||
assert
|
||||
.dom('[data-test-oidc-client-linked-block="client-with-default-key"]')
|
||||
.exists('lists correct app with default');
|
||||
|
|
|
|||
|
|
@ -20,6 +20,7 @@ import { v4 as uuidv4 } from 'uuid';
|
|||
import authPage from 'vault/tests/pages/auth';
|
||||
import { runCmd } from 'vault/tests/helpers/commands';
|
||||
import codemirror from 'vault/tests/helpers/codemirror';
|
||||
import { GENERAL } from 'vault/tests/helpers/general-selectors';
|
||||
|
||||
const SELECT = {
|
||||
policyByName: (name) => `[data-test-policy-link="${name}"]`,
|
||||
|
|
@ -33,6 +34,7 @@ const SELECT = {
|
|||
policyTitle: '[data-test-policy-name]',
|
||||
listBreadcrumb: '[data-test-policy-list-link] a',
|
||||
};
|
||||
|
||||
module('Acceptance | policies/acl', function (hooks) {
|
||||
setupApplicationTest(hooks);
|
||||
|
||||
|
|
@ -120,8 +122,7 @@ module('Acceptance | policies/acl', function (hooks) {
|
|||
'navigates to policy show on successful save'
|
||||
);
|
||||
assert.dom(SELECT.policyTitle).hasText(policyLower, 'displays the policy name on the show page');
|
||||
// will fail if you have a license about to expire.
|
||||
assert.dom('[data-test-flash-message].is-info').doesNotExist('no flash message is displayed on save');
|
||||
assert.dom(GENERAL.latestFlashContent).hasText(`ACL policy "${policyLower}" was successfully created.`);
|
||||
await click(SELECT.listBreadcrumb);
|
||||
|
||||
assert.strictEqual(currentURL(), `/vault/policies/acl`, 'navigates to policy list from breadcrumb');
|
||||
|
|
|
|||
Loading…
Reference in a new issue