Skip to content

Commit

Permalink
kmip and control group flaky test fix (#16697)
Browse files Browse the repository at this point in the history
  • Loading branch information
Monkeychip authored Aug 12, 2022
1 parent 94e2dfe commit a9d59fa
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
7 changes: 3 additions & 4 deletions ui/tests/acceptance/enterprise-control-groups-test.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { settled, currentURL, currentRouteName, visit } from '@ember/test-helpers';
import { settled, currentURL, currentRouteName, visit, waitUntil } from '@ember/test-helpers';
import { module, test, skip } from 'qunit';
import { setupApplicationTest } from 'ember-qunit';
import { create } from 'ember-cli-page-object';
Expand Down Expand Up @@ -130,9 +130,8 @@ module('Acceptance | Enterprise | control groups', function(hooks) {
await settled();
await visit('/vault/secrets/kv-v2-mount/show/foo');
await settled();
assert.equal(
currentRouteName(),
'vault.cluster.access.control-group-accessor',
assert.ok(
await waitUntil(() => currentRouteName() === 'vault.cluster.access.control-group-accessor'),
'redirects to access control group route'
);
});
Expand Down
4 changes: 3 additions & 1 deletion ui/tests/acceptance/enterprise-kmip-test.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { currentURL, currentRouteName, settled, fillIn } from '@ember/test-helpers';
import { currentURL, currentRouteName, settled, fillIn, waitUntil, find } from '@ember/test-helpers';
import { module, test } from 'qunit';
import { setupApplicationTest } from 'ember-qunit';
import { create } from 'ember-cli-page-object';
Expand Down Expand Up @@ -132,6 +132,7 @@ module('Acceptance | Enterprise | KMIP secrets', function(hooks) {
await settled();
await credentialsPage.visitDetail({ backend: path, scope, role, serial });
await settled();
await waitUntil(() => find('[data-test-confirm-action-trigger]'));
assert.dom('[data-test-confirm-action-trigger]').exists('delete button exists');
await credentialsPage.delete().confirmDelete();
await settled();
Expand Down Expand Up @@ -241,6 +242,7 @@ module('Acceptance | Enterprise | KMIP secrets', function(hooks) {
await settled();
await rolesPage.visitDetail({ backend: path, scope, role });
await settled();
await waitUntil(() => find('[data-test-kmip-link-edit-role]'));
await rolesPage.detailEditLink();
await settled();
assert.equal(
Expand Down

0 comments on commit a9d59fa

Please sign in to comment.