github.com/sl1pm4t/consul@v1.4.5-0.20190325224627-74c31c540f9c/ui-v2/tests/acceptance/dc/acls/policies/update.feature (about)

     1  @setupApplicationTest
     2  Feature: dc / acls / policies / update: ACL Policy Update
     3    Background:
     4      Given 1 datacenter model with the value "datacenter"
     5      And 1 policy model from yaml
     6      ---
     7        ID: policy-id
     8      ---
     9      And 3 token models
    10      When I visit the policy page for yaml
    11      ---
    12        dc: datacenter
    13        policy: policy-id
    14      ---
    15      Then the url should be /datacenter/acls/policies/policy-id
    16      Then I see 3 token models
    17    Scenario: Update to [Name], [Rules], [Description]
    18      Then I fill in the policy form with yaml
    19      ---
    20        Name: [Name]
    21        Description: [Description]
    22        Rules: [Rules]
    23      ---
    24      And I submit
    25      Then a PUT request is made to "/v1/acl/policy/policy-id?dc=datacenter" with the body from yaml
    26      ---
    27        Name: [Name]
    28        Description: [Description]
    29        Rules: [Rules]
    30      ---
    31      Then the url should be /datacenter/acls/policies
    32      And "[data-notification]" has the "notification-update" class
    33      And "[data-notification]" has the "success" class
    34      Where:
    35        ------------------------------------------------------------------------------
    36        | Name          |  Rules                        | Description                |
    37        | policy-name   |  key "foo" {policy = "read"}  | policy-name description    |
    38        | policy_name   |  key "foo" {policy = "write"} | policy name description    |
    39        | policyName    |  key "foo" {policy = "read"}  | policy%20name description  |
    40        ------------------------------------------------------------------------------
    41    Scenario: There was an error saving the key
    42      Given the url "/v1/acl/policy/policy-id" responds with a 500 status
    43      And I submit
    44      Then the url should be /datacenter/acls/policies/policy-id
    45      Then "[data-notification]" has the "notification-update" class
    46      And "[data-notification]" has the "error" class