github.com/sl1pm4t/consul@v1.4.5-0.20190325224627-74c31c540f9c/ui-v2/tests/acceptance/dc/acls/tokens/policies/add-existing.feature (about) 1 @setupApplicationTest 2 Feature: dc / acls / tokens / policies: ACL Token add existing policy 3 Scenario: 4 Given 1 datacenter model with the value "datacenter" 5 And 1 token model from yaml 6 --- 7 AccessorID: key 8 Description: The Description 9 Policies: ~ 10 --- 11 And 2 policy models from yaml 12 --- 13 - ID: policy-1 14 Name: Policy 1 15 - ID: policy-2 16 Name: Policy 2 17 --- 18 When I visit the token page for yaml 19 --- 20 dc: datacenter 21 token: key 22 --- 23 Then the url should be /datacenter/acls/tokens/key 24 And I click "[data-test-policy-element] .ember-power-select-trigger" 25 And I click ".ember-power-select-option:first-child" 26 And I see 1 policy model 27 And I click "[data-test-policy-element] .ember-power-select-trigger" 28 And I click ".ember-power-select-option:nth-child(1)" 29 And I see 2 policy models 30 Then I fill in with yaml 31 --- 32 Description: The Description 33 --- 34 And I submit 35 Then a PUT request is made to "/v1/acl/token/key?dc=datacenter" with the body from yaml 36 --- 37 Description: The Description 38 Policies: 39 - ID: policy-1 40 Name: Policy 1 41 - ID: policy-2 42 Name: Policy 2 43 --- 44 Then the url should be /datacenter/acls/tokens 45 And "[data-notification]" has the "notification-update" class 46 And "[data-notification]" has the "success" class