2018-10-19 15:17:02 +00:00
|
|
|
@setupApplicationTest
|
2019-05-01 18:09:29 +00:00
|
|
|
Feature: dc / acls / roles / as many / add existing: Add existing
|
2018-10-19 15:17:02 +00:00
|
|
|
Scenario:
|
|
|
|
Given 1 datacenter model with the value "datacenter"
|
|
|
|
And 1 token model from yaml
|
|
|
|
---
|
|
|
|
AccessorID: key
|
|
|
|
Description: The Description
|
2019-05-01 18:09:29 +00:00
|
|
|
Roles: ~
|
2018-10-19 15:17:02 +00:00
|
|
|
---
|
2019-05-01 18:09:29 +00:00
|
|
|
And 2 role models from yaml
|
2018-10-19 15:17:02 +00:00
|
|
|
---
|
2019-05-01 18:09:29 +00:00
|
|
|
- ID: role-1
|
|
|
|
Name: Role 1
|
|
|
|
- ID: role-2
|
|
|
|
Name: Role 2
|
2018-10-19 15:17:02 +00:00
|
|
|
---
|
|
|
|
When I visit the token page for yaml
|
|
|
|
---
|
|
|
|
dc: datacenter
|
|
|
|
token: key
|
|
|
|
---
|
|
|
|
Then the url should be /datacenter/acls/tokens/key
|
2020-05-11 15:37:11 +00:00
|
|
|
And I click "form > #roles .ember-power-select-trigger"
|
2018-10-19 15:17:02 +00:00
|
|
|
And I click ".ember-power-select-option:first-child"
|
2019-05-01 18:09:29 +00:00
|
|
|
And I see 1 role model on the roles component
|
2020-05-11 15:37:11 +00:00
|
|
|
And I click "form > #roles .ember-power-select-trigger"
|
2018-10-19 15:17:02 +00:00
|
|
|
And I click ".ember-power-select-option:nth-child(1)"
|
2019-05-01 18:09:29 +00:00
|
|
|
And I see 2 role models on the roles component
|
2018-10-19 15:17:02 +00:00
|
|
|
Then I fill in with yaml
|
|
|
|
---
|
|
|
|
Description: The Description
|
|
|
|
---
|
|
|
|
And I submit
|
2020-01-24 12:26:28 +00:00
|
|
|
Then a PUT request was made to "/v1/acl/token/key?dc=datacenter" from yaml
|
|
|
|
---
|
|
|
|
body:
|
|
|
|
Namespace: @namespace
|
|
|
|
Description: The Description
|
|
|
|
Roles:
|
|
|
|
- ID: role-1
|
|
|
|
Name: Role 1
|
|
|
|
- ID: role-2
|
|
|
|
Name: Role 2
|
2018-10-19 15:17:02 +00:00
|
|
|
---
|
|
|
|
Then the url should be /datacenter/acls/tokens
|
|
|
|
And "[data-notification]" has the "notification-update" class
|
|
|
|
And "[data-notification]" has the "success" class
|