Skip to content

Commit

Permalink
fix acceptance test
Browse files Browse the repository at this point in the history
  • Loading branch information
meirish committed Jan 9, 2019
1 parent 17def3a commit 71d4926
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
6 changes: 3 additions & 3 deletions ui/tests/acceptance/policies/index-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
5 changes: 3 additions & 2 deletions ui/tests/pages/policies/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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',
}),
});

0 comments on commit 71d4926

Please sign in to comment.