diff --git a/ui-v2/app/templates/dc/acls/edit.hbs b/ui-v2/app/templates/dc/acls/edit.hbs index 9ab41201bd..e63de26726 100644 --- a/ui-v2/app/templates/dc/acls/edit.hbs +++ b/ui-v2/app/templates/dc/acls/edit.hbs @@ -35,7 +35,7 @@ {{#confirmation-dialog message='Are you sure you want to use this ACL token?'}} {{#block-slot 'action' as |confirm|}} - + {{/block-slot}} {{#block-slot 'dialog' as |execute cancel message|}}

diff --git a/ui-v2/tests/acceptance/dc/acls/use.feature b/ui-v2/tests/acceptance/dc/acls/use.feature new file mode 100644 index 0000000000..6ad7224872 --- /dev/null +++ b/ui-v2/tests/acceptance/dc/acls/use.feature @@ -0,0 +1,40 @@ +@setupApplicationTest +Feature: dc / acls / use: Using an ACL token + Background: + Given 1 datacenter model with the value "datacenter" + And 1 acl model from yaml + --- + ID: token + --- + Scenario: Using an ACL token from the listing page + When I visit the acls page for yaml + --- + dc: datacenter + --- + Then I have settings like yaml + --- + token: ~ + --- + And I click actions on the acls + And I click use on the acls + And I click confirmUse on the acls + Then I have settings like yaml + --- + token: token + --- + Scenario: Using an ACL token from the detail page + When I visit the acl page for yaml + --- + dc: datacenter + acl: token + --- + Then I have settings like yaml + --- + token: ~ + --- + And I click use + And I click confirmUse + Then I have settings like yaml + --- + token: token + --- diff --git a/ui-v2/tests/acceptance/settings/update.feature b/ui-v2/tests/acceptance/settings/update.feature index 98ac584d0b..300a9123a9 100644 --- a/ui-v2/tests/acceptance/settings/update.feature +++ b/ui-v2/tests/acceptance/settings/update.feature @@ -7,6 +7,10 @@ Feature: settings / update: Update Settings Given 1 datacenter model with the value "datacenter" When I visit the settings page Then the url should be /settings + Then I have settings like yaml + --- + token: ~ + --- And I submit Then I have settings like yaml --- diff --git a/ui-v2/tests/acceptance/steps/dc/acls/use-steps.js b/ui-v2/tests/acceptance/steps/dc/acls/use-steps.js new file mode 100644 index 0000000000..a7eff3228b --- /dev/null +++ b/ui-v2/tests/acceptance/steps/dc/acls/use-steps.js @@ -0,0 +1,10 @@ +import steps from '../../steps'; + +// step definitions that are shared between features should be moved to the +// tests/acceptance/steps/steps.js file + +export default function(assert) { + return steps(assert).then('I should find a file', function() { + assert.ok(true, this.step); + }); +} diff --git a/ui-v2/tests/pages.js b/ui-v2/tests/pages.js index 175a4dd1c7..f72772b223 100644 --- a/ui-v2/tests/pages.js +++ b/ui-v2/tests/pages.js @@ -35,7 +35,7 @@ export default { kvs: create(kvs(visitable, deletable, clickable, attribute, collection)), kv: create(kv(visitable, submitable, deletable)), acls: create(acls(visitable, deletable, clickable, attribute, collection, aclFilter)), - acl: create(acl(visitable, submitable, deletable)), + acl: create(acl(visitable, submitable, deletable, clickable)), intentions: create( intentions(visitable, deletable, clickable, attribute, collection, intentionFilter) ), diff --git a/ui-v2/tests/pages/dc/acls/edit.js b/ui-v2/tests/pages/dc/acls/edit.js index 1164d4c0ce..53ede15259 100644 --- a/ui-v2/tests/pages/dc/acls/edit.js +++ b/ui-v2/tests/pages/dc/acls/edit.js @@ -1,7 +1,9 @@ -export default function(visitable, submitable, deletable, triggerable) { +export default function(visitable, submitable, deletable, clickable) { return submitable( deletable({ visit: visitable(['/:dc/acls/:acl', '/:dc/acls/create']), + use: clickable('[data-test-use]'), + confirmUse: clickable('button.type-delete'), }) ); } diff --git a/ui-v2/tests/pages/dc/acls/index.js b/ui-v2/tests/pages/dc/acls/index.js index 7c567840e1..d96d935478 100644 --- a/ui-v2/tests/pages/dc/acls/index.js +++ b/ui-v2/tests/pages/dc/acls/index.js @@ -7,6 +7,8 @@ export default function(visitable, deletable, clickable, attribute, collection, name: attribute('data-test-acl', '[data-test-acl]'), acl: clickable('a'), actions: clickable('label'), + use: clickable('[data-test-use]'), + confirmUse: clickable('button.type-delete'), }) ), filter: filter,