github.com/DerekStrickland/consul@v1.4.5/ui-v2/tests/acceptance/page-navigation.feature (about)

     1  @setupApplicationTest
     2  Feature: Page Navigation
     3    In order to view all the data in consul
     4    As a user
     5    I should be able to visit every page and view data in a HTML from the API
     6    Background:
     7      Given 1 datacenter model with the value "dc-1"
     8    Scenario: Visiting the index page
     9      When I visit the index page for yaml
    10      ---
    11        dc: dc-1
    12      ---
    13      Then the url should be /dc-1/services
    14      Then the last GET request was made to "/v1/internal/ui/services?dc=dc-1"
    15    Scenario: Clicking [Link] in the navigation takes me to [URL]
    16      When I visit the services page for yaml
    17      ---
    18        dc: dc-1
    19      ---
    20      When I click [Link] on the navigation
    21      Then the url should be [URL]
    22      Then the last GET request was made to "[Endpoint]"
    23    Where:
    24      -----------------------------------------------------------------------
    25      | Link       | URL               | Endpoint                           |
    26      | nodes      | /dc-1/nodes       | /v1/internal/ui/nodes?dc=dc-1      |
    27      | kvs        | /dc-1/kv          | /v1/kv/?keys&dc=dc-1&separator=%2F |
    28      | acls       | /dc-1/acls/tokens | /v1/acl/tokens?dc=dc-1             |
    29      | intentions | /dc-1/intentions  | /v1/connect/intentions?dc=dc-1     |
    30      # | settings   | /settings         | /v1/catalog/datacenters            |
    31      -----------------------------------------------------------------------
    32    Scenario: Clicking a [Item] in the [Model] listing and back again
    33      When I visit the [Model] page for yaml
    34      ---
    35        dc: dc-1
    36      ---
    37      When I click [Item] on the [Model]
    38      Then the url should be [URL]
    39      Then the last GET request was made to "[Endpoint]"
    40      And I click "[data-test-back]"
    41      Then the url should be [Back]
    42    Where:
    43      --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
    44      | Item      | Model      | URL                                                      | Endpoint                                                           | Back                |
    45      | service   | services   | /dc-1/services/service-0                                 | /v1/health/service/service-0?dc=dc-1                               | /dc-1/services      |
    46      | node      | nodes      | /dc-1/nodes/node-0                                       | /v1/session/node/node-0?dc=dc-1                                    | /dc-1/nodes         |
    47      | kv        | kvs        | /dc-1/kv/necessitatibus-0/edit                           | /v1/session/info/ee52203d-989f-4f7a-ab5a-2bef004164ca?dc=dc-1      | /dc-1/kv            |
    48      # | acl       | acls       | /dc-1/acls/anonymous                                     | /v1/acl/info/anonymous?dc=dc-1                                    | /dc-1/acls         |
    49      | intention | intentions | /dc-1/intentions/ee52203d-989f-4f7a-ab5a-2bef004164ca    | /v1/internal/ui/services?dc=dc-1                                   | /dc-1/intentions    |
    50      | token     | tokens     | /dc-1/acls/tokens/ee52203d-989f-4f7a-ab5a-2bef004164ca   | /v1/acl/policies?dc=dc-1                                           | /dc-1/acls/tokens   |
    51      | policy    | policies   | /dc-1/acls/policies/ee52203d-989f-4f7a-ab5a-2bef004164ca | /v1/acl/tokens?policy=ee52203d-989f-4f7a-ab5a-2bef004164ca&dc=dc-1 | /dc-1/acls/policies |
    52      # | token     | tokens     | /dc-1/acls/tokens/00000000-0000-0000-0000-000000000000   | /v1/acl/token/00000000-0000-0000-0000-000000000000?dc=dc-1    | /dc-1/acls/tokens |
    53      # | policy    | policies   | /dc-1/acls/policies/ee52203d-989f-4f7a-ab5a-2bef004164ca | /v1/acl/policy/ee52203d-989f-4f7a-ab5a-2bef004164ca?dc=dc-1   | /dc-1/acls/policies |
    54      --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
    55    Scenario: The node detail page calls the correct API endpoints
    56      When I visit the node page for yaml
    57      ---
    58        dc: dc-1
    59        node: node-0
    60        ---
    61      Then the url should be /dc-1/nodes/node-0
    62      Then the last GET requests were like yaml
    63      ---
    64        - /v1/catalog/datacenters
    65        - /v1/internal/ui/node/node-0?dc=dc-1
    66        - /v1/coordinate/nodes?dc=dc-1
    67        - /v1/session/node/node-0?dc=dc-1
    68      ---
    69    Scenario: The kv detail page calls the correct API endpoints
    70      When I visit the kv page for yaml
    71      ---
    72        dc: dc-1
    73        kv: keyname
    74        ---
    75      Then the url should be /dc-1/kv/keyname/edit
    76      Then the last GET requests were like yaml
    77      ---
    78        - /v1/catalog/datacenters
    79        - /v1/kv/keyname?dc=dc-1
    80        - /v1/session/info/ee52203d-989f-4f7a-ab5a-2bef004164ca?dc=dc-1
    81      ---
    82    Scenario: The policies page/tab calls the correct API endpoints
    83      When I visit the policies page for yaml
    84      ---
    85        dc: dc-1
    86      ---
    87      Then the url should be /dc-1/acls/policies
    88      Then the last GET requests were like yaml
    89      ---
    90        - /v1/catalog/datacenters
    91        - /v1/acl/policies?dc=dc-1
    92      ---
    93    Scenario: The intention detail page calls the correct API endpoints
    94      When I visit the intention page for yaml
    95      ---
    96        dc: dc-1
    97        intention: intention
    98      ---
    99      Then the url should be /dc-1/intentions/intention
   100      Then the last GET requests were like yaml
   101      ---
   102        - /v1/catalog/datacenters
   103        - /v1/connect/intentions/intention?dc=dc-1
   104        - /v1/internal/ui/services?dc=dc-1
   105      ---
   106  
   107    Scenario: Clicking a [Item] in the [Model] listing and cancelling
   108      When I visit the [Model] page for yaml
   109      ---
   110        dc: dc-1
   111      ---
   112      When I click [Item] on the [Model]
   113      Then the url should be [URL]
   114      And I click "[type=reset]"
   115      Then the url should be [Back]
   116    Where:
   117      --------------------------------------------------------------------------------------------------------
   118      | Item      | Model      | URL                                                      | Back             |
   119      | kv        | kvs        | /dc-1/kv/necessitatibus-0/edit                           | /dc-1/kv         |
   120      # | acl       | acls       | /dc-1/acls/anonymous                                     | /dc-1/acls       |
   121      | intention | intentions | /dc-1/intentions/ee52203d-989f-4f7a-ab5a-2bef004164ca    | /dc-1/intentions |
   122      --------------------------------------------------------------------------------------------------------
   123  @ignore
   124    Scenario: Clicking items in the listings, without depending on the salt ^
   125      Then ok
   126    Scenario: Clicking create in the [Model] listing
   127      When I visit the [Model] page for yaml
   128      ---
   129        dc: dc-1
   130      ---
   131      When I click create
   132      Then the url should be [URL]
   133      And I click "[data-test-back]"
   134      Then the url should be [Back]
   135    Where:
   136      -----------------------------------------------------------------------------
   137      | Item      | Model      | URL                        | Back                |
   138      | kv        | kvs        | /dc-1/kv/create            | /dc-1/kv            |
   139      # | acl       | acls       | /dc-1/acls/create         | /dc-1/acls         |
   140      | intention | intentions | /dc-1/intentions/create    | /dc-1/intentions    |
   141      | token     | tokens     | /dc-1/acls/tokens/create   | /dc-1/acls/tokens   |
   142      | policy    | policies   | /dc-1/acls/policies/create | /dc-1/acls/policies |
   143      -----------------------------------------------------------------------------
   144  @ignore
   145    Scenario: Using I click on should change the currentPage ^
   146      Then ok