Skip to content

Commit dff1d5d

Browse files
authored
fixes flaky policies test (#23798)
1 parent 3623dfc commit dff1d5d

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

ui/tests/acceptance/policies/index-test.js

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* SPDX-License-Identifier: BUSL-1.1
44
*/
55

6-
import { currentURL, currentRouteName, settled, find, findAll, click } from '@ember/test-helpers';
6+
import { currentURL, currentRouteName, settled, fillIn } from '@ember/test-helpers';
77
import { module, test } from 'qunit';
88
import { setupApplicationTest } from 'ember-qunit';
99
import { create } from 'ember-cli-page-object';
@@ -23,14 +23,10 @@ module('Acceptance | policies/acl', function (hooks) {
2323

2424
test('it lists default and root acls', async function (assert) {
2525
await page.visit({ type: 'acl' });
26-
await settled();
2726
assert.strictEqual(currentURL(), '/vault/policies/acl');
27+
await fillIn('[data-test-component="navigate-input"]', 'default');
2828
assert.ok(page.findPolicyByName('default'), 'default policy shown in the list');
29-
if (find('nav.pagination')) {
30-
// Root ACL is always last in the list
31-
const paginationLinks = findAll('.pagination-link');
32-
await click(paginationLinks[paginationLinks.length - 1]);
33-
}
29+
await fillIn('[data-test-component="navigate-input"]', 'root');
3430
assert.ok(page.findPolicyByName('root'), 'root policy shown in the list');
3531
});
3632

0 commit comments

Comments
 (0)