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

     1  @setupApplicationTest
     2  Feature: dc / acls / tokens / legacy / update: ACL Token Update
     3    Background:
     4      Given 1 datacenter model with the value "datacenter"
     5      And 1 token model from yaml
     6      ---
     7        AccessorID: key
     8        SecretID: secret
     9        Rules: 'key {}'
    10        Type: client
    11        Policies: ~
    12      ---
    13      When I visit the token page for yaml
    14      ---
    15        dc: datacenter
    16        token: key
    17      ---
    18      Then the url should be /datacenter/acls/tokens/key
    19    Scenario: Update to [Name]
    20      Then I fill in with yaml
    21      ---
    22        name: [Name]
    23      ---
    24      # TODO: Remove this when I'm 100% sure token types are gone
    25      # And I click "[value=[Type]]"
    26      And I submit
    27      Then a PUT request is made to "/v1/acl/update?dc=datacenter" with the body from yaml
    28      # You can no longer edit Type but make sure it gets sent
    29      ---
    30        ID: secret
    31        Name: [Name]
    32        Type: client
    33      ---
    34      Then the url should be /datacenter/acls/tokens
    35      And "[data-notification]" has the "notification-update" class
    36      And "[data-notification]" has the "success" class
    37      Where:
    38        ---------------------------------------------
    39        | Name       |  Rules                       |
    40        | key-name   |  node "0" {policy = "read"}  |
    41        | key name   |  node "0" {policy = "write"} |
    42        | key%20name |  node "0" {policy = "read"}  |
    43        | utf8?      |  node "0" {policy = "write"} |
    44        ---------------------------------------------
    45    Scenario: There was an error saving the key
    46      Given the url "/v1/acl/update" responds with a 500 status
    47      And I submit
    48      Then the url should be /datacenter/acls/tokens/key
    49      Then "[data-notification]" has the "notification-update" class
    50      And "[data-notification]" has the "error" class
    51  # @ignore
    52    # Scenario: Rules can be edited/updated
    53    #   Then ok
    54  # @ignore
    55    # Scenario: The feedback dialog says success or failure
    56    #   Then ok