mirror of https://github.com/status-im/consul.git
Acceptance test for using tokens from listing and detail pages
This commit is contained in:
parent
701d6a3a72
commit
649d777714
|
@ -35,7 +35,7 @@
|
|||
<button type="button" {{ action "clone" item }}>Clone token</button>
|
||||
{{#confirmation-dialog message='Are you sure you want to use this ACL token?'}}
|
||||
{{#block-slot 'action' as |confirm|}}
|
||||
<button type="button" {{ action confirm 'use' item }}>Use token</button>
|
||||
<button data-test-use type="button" {{ action confirm 'use' item }}>Use token</button>
|
||||
{{/block-slot}}
|
||||
{{#block-slot 'dialog' as |execute cancel message|}}
|
||||
<p>
|
||||
|
|
|
@ -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
|
||||
---
|
|
@ -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
|
||||
---
|
||||
|
|
|
@ -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);
|
||||
});
|
||||
}
|
|
@ -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)
|
||||
),
|
||||
|
|
|
@ -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'),
|
||||
})
|
||||
);
|
||||
}
|
||||
|
|
|
@ -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,
|
||||
|
|
Loading…
Reference in New Issue