consul/ui/packages/consul-ui/tests/acceptance/page-navigation.feature
John Cowen fc14a412fd
ui: Partitions Application Layer (#11017)
* Add Partition to all our models

* Add partitions into our serializers/fingerprinting

* Make some amends to a few adapters ready for partitions

* Amend blueprints to avoid linting error

* Update all  our repositories to include partitions, also

Remove enabled/disable nspace repo and just use a nspace with
conditionals

* Ensure nspace and parition parameters always return '' no matter what

* Ensure data-sink finds the model properly

This will later be replaced by a @dataSink decorator but we are find
kicking that can down the road a little more

* Add all the new partition data layer

* Add a way to set the title of the page from inside the route

and make it accessibile via a route announcer

* Make the Consul Route the default/basic one

* Tweak nspace and partition abilities not to check the length

* Thread partition through all the components that need it

* Some ACL tweaks

* Move the entire app to use partitions

* Delete all the tests we no longer need

* Update some Unit tests to use partition

* Fix up KV title tests

* Fix up a few more acceptance tests

* Fixup and temporarily ignore some acceptance tests

* Stop using ember-cli-page-objects fillable as it doesn't seem to work

* Fix lint error

* Remove old ACL related test

* Add a tick after filling out forms

* Fix token warning modal

* Found some more places where we need a partition var

* Fixup some more acceptance tests

* Tokens still needs a repo service for CRUD

* Remove acceptance tests we no longer need

* Fixup and "FIXME ignore" a few tests

* Remove an s

* Disable blocking queries for KV to revert to previous release for now

* Fixup adapter tests to follow async/function resolving interface

* Fixup all the serializer integration tests

* Fixup service/repo integration tests

* Fixup deleting acceptance test

* Fixup some ent tests

* Make sure nspaces passes the dc through for when thats important

* ...aaaand acceptance nspaces with the extra dc param
2021-09-15 19:50:11 +01:00

129 lines
5.1 KiB
Gherkin

@setupApplicationTest
Feature: page-navigation
In order to view all the data in consul
As a user
I should be able to visit every page and view data in a HTML from the API
Background:
Given 1 datacenter model with the value "dc1"
Scenario: Visiting the index page
When I visit the index page for yaml
---
dc: dc1
---
Then the url should be /dc1/services
Then a GET request was made to "/v1/internal/ui/services?dc=dc1&ns=@namespace"
Scenario: Clicking [Link] in the navigation takes me to [URL]
When I visit the services page for yaml
---
dc: dc1
---
When I click [Link] on the navigation
Then the url should be [URL]
Then a GET request was made to "[Endpoint]"
Where:
-------------------------------------------------------------------------------------
| Link | URL | Endpoint |
| nodes | /dc1/nodes | /v1/internal/ui/nodes?dc=dc1&ns=@namespace |
# FIXME
# | kvs | /dc1/kv | /v1/kv/?keys&dc=dc1&separator=%2F&ns=@namespace |
| tokens | /dc1/acls/tokens | /v1/acl/tokens?dc=dc1&ns=@namespace |
# | settings | /settings | /v1/catalog/datacenters |
-------------------------------------------------------------------------------------
# FIXME
@ignore
Scenario: Clicking a [Item] in the [Model] listing and back again
When I visit the [Model] page for yaml
---
dc: dc1
---
When I click [Item] on the [Model]
Then the url should be [URL]
Then a GET request was made to "[Endpoint]"
And I click "[data-test-back]"
Then the url should be [Back]
Where:
-------------------------------------------------------------------------------------------------------------------------------------
| Item | Model | URL | Endpoint | Back |
| kv | kvs | /dc1/kv/0-key-value/edit | /v1/session/info/ee52203d-989f-4f7a-ab5a-2bef004164ca?dc=dc1&ns=@namespace | /dc1/kv |
-------------------------------------------------------------------------------------------------------------------------------------
Scenario: The node detail page calls the correct API endpoints
When I visit the node page for yaml
---
dc: dc1
node: node-0
---
Then the url should be /dc1/nodes/node-0/health-checks
Then the last GET requests included from yaml
---
- /v1/catalog/datacenters
- /v1/internal/ui/node/node-0?dc=dc1&ns=@namespace
- /v1/coordinate/nodes?dc=dc1
---
# FIXME
@ignore
Scenario: The kv detail page calls the correct API endpoints
When I visit the kv page for yaml
---
dc: dc1
kv: keyname
---
Then the url should be /dc1/kv/keyname/edit
Then the last GET requests included from yaml
---
- /v1/catalog/datacenters
- /v1/kv/keyname?dc=dc1&ns=@namespace
- /v1/session/info/ee52203d-989f-4f7a-ab5a-2bef004164ca?dc=dc1&ns=@namespace
---
Scenario: The policies page/tab calls the correct API endpoints
When I visit the policies page for yaml
---
dc: dc1
---
Then the url should be /dc1/acls/policies
Then the last GET requests included from yaml
---
- /v1/catalog/datacenters
- /v1/acl/policies?dc=dc1&ns=@namespace
---
# FIXME
@ignore
Scenario: Clicking a [Item] in the [Model] listing and cancelling
When I visit the [Model] page for yaml
---
dc: dc1
---
When I click [Item] on the [Model]
Then the url should be [URL]
And I click "[type=reset]"
Then the url should be [Back]
Where:
-----------------------------------------------------------------------------------------------
| Item | Model | URL | Back |
| kv | kvs | /dc1/kv/0-key-value/edit | /dc1/kv |
-----------------------------------------------------------------------------------------------
@ignore
Scenario: Clicking items in the listings, without depending on the salt ^
Then ok
Scenario: Clicking create in the [Model] listing
When I visit the [Model] page for yaml
---
dc: dc1
---
When I click create
Then the url should be [URL]
And I click "[data-test-back]"
Then the url should be [Back]
Where:
---------------------------------------------------------------------------
| Item | Model | URL | Back |
# FIXME
# | kv | kvs | /dc1/kv/create | /dc1/kv |
| intention | intentions | /dc1/intentions/create | /dc1/intentions |
| token | tokens | /dc1/acls/tokens/create | /dc1/acls/tokens |
| policy | policies | /dc1/acls/policies/create | /dc1/acls/policies |
---------------------------------------------------------------------------
@ignore
Scenario: Using I click on should change the currentPage ^
Then ok