From 71d49266e26aac8c3af4ef8137ea9f1726d1307d Mon Sep 17 00:00:00 2001 From: Matthew Irish Date: Wed, 9 Jan 2019 12:16:58 -0600 Subject: [PATCH] fix acceptance test --- ui/tests/acceptance/policies/index-test.js | 6 +++--- ui/tests/pages/policies/index.js | 5 +++-- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/ui/tests/acceptance/policies/index-test.js b/ui/tests/acceptance/policies/index-test.js index 53d7a41c13e3..713b5dbf7258 100644 --- a/ui/tests/acceptance/policies/index-test.js +++ b/ui/tests/acceptance/policies/index-test.js @@ -31,11 +31,11 @@ module('Acceptance | policies/acl', function(hooks) { }); test('it allows deletion of policies with dots in names', async function(assert) { - const POLICY = `path "*" { capabilities = ["list"]}`; + const POLICY = 'path "*" { capabilities = ["list"]}'; let policyName = 'list.policy'; - await consoleComponent.runCommands(`write sys/policies/acl/${policyName} policy=${POLICY}`); + await consoleComponent.runCommands([`write sys/policies/acl/${policyName} policy='${POLICY}'`]); await page.visit({ type: 'acl' }); - let policy = page.findPolicyByName(policyName); + let policy = page.row.filterBy('name', policyName)[0]; assert.ok(policy, 'policy is shown in the list'); await policy.menu(); await page.delete().confirmDelete(); diff --git a/ui/tests/pages/policies/index.js b/ui/tests/pages/policies/index.js index f52cf56b3806..16b99d704d77 100644 --- a/ui/tests/pages/policies/index.js +++ b/ui/tests/pages/policies/index.js @@ -3,17 +3,18 @@ export default create({ visit: visitable('/vault/policies/:type'), policies: collection('[data-test-policy-item]', { name: text('[data-test-policy-name]'), + }), + row: collection('[data-test-policy-link]', { + name: text(), menu: clickable('[data-test-popup-menu-trigger]'), }), findPolicyByName(name) { return this.policies.filterBy('name', name)[0]; }, delete: clickable('[data-test-confirm-action-trigger]', { - scope: '[data-test-item-delete]', testContainer: '#ember-testing', }), confirmDelete: clickable('[data-test-confirm-button]', { - scope: '[data-test-item-delete]', testContainer: '#ember-testing', }), });