2018-05-11 12:47:21 +00:00
|
|
|
@setupApplicationTest
|
|
|
|
Feature: Page Navigation
|
2018-10-19 15:17:02 +00:00
|
|
|
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
|
2018-05-11 12:47:21 +00:00
|
|
|
Background:
|
|
|
|
Given 1 datacenter model with the value "dc-1"
|
|
|
|
Scenario: Visiting the index page
|
|
|
|
When I visit the index page for yaml
|
|
|
|
---
|
|
|
|
dc: dc-1
|
|
|
|
---
|
|
|
|
Then the url should be /dc-1/services
|
2018-07-30 16:55:44 +00:00
|
|
|
Then the last GET request was made to "/v1/internal/ui/services?dc=dc-1"
|
2018-07-04 16:23:33 +00:00
|
|
|
Scenario: Clicking [Link] in the navigation takes me to [URL]
|
2018-05-11 12:47:21 +00:00
|
|
|
When I visit the services page for yaml
|
|
|
|
---
|
|
|
|
dc: dc-1
|
|
|
|
---
|
|
|
|
When I click [Link] on the navigation
|
2018-07-04 16:23:33 +00:00
|
|
|
Then the url should be [URL]
|
2018-07-30 16:55:44 +00:00
|
|
|
Then the last GET request was made to "[Endpoint]"
|
2018-05-11 12:47:21 +00:00
|
|
|
Where:
|
2018-10-19 15:17:02 +00:00
|
|
|
-----------------------------------------------------------------------
|
|
|
|
| Link | URL | Endpoint |
|
ui: UI Release Merge (ui-staging merge) (#6527)
## HTTPAdapter (#5637)
## Ember upgrade 2.18 > 3.12 (#6448)
### Proxies can no longer get away with not calling _super
This means that we can't use create anymore to define dynamic methods.
Therefore we dynamically make 2 extended Proxies on demand, and then
create from those. Therefore we can call _super in the init method of
the extended Proxies.
### We aren't allowed to reset a service anymore
We never actually need to now anyway, this is a remnant of the refactor
from browser based confirmations. We fix it as simply as possible here
but will revisit and remove the old browser confirm functionality at a
later date
### Revert classes to use ES5 style to workaround babel transp. probs
Using a mixture of ES6 classes (and hence super) and arrow functions
means that when babel transpiles the arrow functions down to ES5, a
reference to this is moved before the call to super, hence causing a js
error.
Furthermore, we the testing environment no longer lets use use
apply/call on the constructor.
These errors only manifests during testing (only in the testing
environment), the application itself runs fine with no problems without
this change.
Using ES5 style class definitions give us freedom to do all of the above
without causing any errors, so we reverted these classes back to ES5
class definitions
### Skip test that seems to have changed due to a change in RSVP timing
This test tests a usecase/area of the API that will probably never ever
be used, it was more testing out the API. We've skipped the test for now
as this doesn't affect the application itself, but left a note to come
back here later to investigate further
### Remove enumerableContentDidChange
Initial testing looks like we don't need to call this function anymore,
the function no longer exists
### Rework Changeset.isSaving to take into account new ember APIs
Setting/hanging a computedProperty of an instantiated object no longer
works. Move to setting it on the prototype/class definition instead
### Change how we detect whether something requires listening
New ember API's have changed how you can detect whether something is a
computedProperty or not. It's not immediately clear if its even possible
now. Therefore we change how we detect whether something should be
listened to or not by just looking for presence of `addEventListener`
### Potentially temporary change of ci test scripts to ensure deps exist
All our tooling scripts run through a Makefile (for people familiar with
only using those), which then call yarn scripts which can be called
independently (for people familar with only using yarn).
The Makefile targets always check to make sure all the dependencies are
installed before running anything that requires them (building, testing
etc).
The CI scripts/targets didn't follow this same route and called the yarn
scripts directly (usually CI builds a cache of the dependencies first).
For some reason this cache isn't doing what it usually does, and it
looks as though, in CI, ember isn't installed.
This commit makes the CI scripts consistently use the same method as all
of the other tooling scripts (Makefile target > Install Deps if
required > call yarn script). This should install the dependencies if
for some reason the CI cache building doesn't complete/isn't successful.
Potentially this commit may be reverted if, the root of the problem is
elsewhere, although consistency is always good, so it might be a good
idea to leave this commit as is even if we need to debug and fix things
elsewhere.
### Make test-parallel consistent with the rest of the tooling scripts
As we are here making changes for CI purposes (making test-ci
consistent), we spotted that test-parallel is also inconsistent and also
the README manual instructions won't work without `ember` installed
globally.
This commit makes everything consistent and changes the manual
instructions to use the local ember instance that gets installed via
yarn
### Re-wrangle catchable to fit with new ember 3.12 APIs
In the upgrade from ember 3.8 > 3.12 the public interfaces for
ComputedProperties have changed slightly. `meta` is no longer a public
property of ComputedProperty but of a ComputedDecoratorImpl mixin
instead.
https://github.com/emberjs/ember.js/blob/7e4ba1096e3c2e3e0dde186d5ca52ff19cb8720a/packages/%40ember/-internals/metal/lib/computed.ts#L725
There seems to be no way, by just using publically available
methods, to replicate this behaviour so that we can create our own
'ComputedProperty` factory via injecting the ComputedProperty class as
we did previously.
https://github.com/hashicorp/consul/blob/3f333bada181aaf6340523ca2268a28d1a7db214/ui-v2/app/utils/computed/factory.js#L1-L18
Instead we dynamically hang our `Catchable` `catch` method off the
instantiated ComputedProperty. In doing it like this `ComputedProperty`
has already has its `meta` method mixed in so we don't have to manually
mix it in ourselves (which doesn't seem possible)
This functionality is only used during our work in trying to ensure
our EventSource/BlockingQuery work was as 'ember-like' as possible (i.e.
using the traditional Route.model hooks and ember-like Controller
properties). Our ongoing/upcoming work on a componentized approach to
data a.k.a `<DataSource />` means we will be able to remove the majority
of the code involved here now that it seems to be under an amount of
flux in ember.
### Build bindata_assetfs.go with new UI changes
2019-09-30 13:47:49 +00:00
|
|
|
| nodes | /dc-1/nodes | /v1/internal/ui/nodes?dc=dc-1 |
|
2018-10-19 15:17:02 +00:00
|
|
|
| kvs | /dc-1/kv | /v1/kv/?keys&dc=dc-1&separator=%2F |
|
|
|
|
| acls | /dc-1/acls/tokens | /v1/acl/tokens?dc=dc-1 |
|
|
|
|
| intentions | /dc-1/intentions | /v1/connect/intentions?dc=dc-1 |
|
|
|
|
# | settings | /settings | /v1/catalog/datacenters |
|
|
|
|
-----------------------------------------------------------------------
|
2018-07-04 16:23:33 +00:00
|
|
|
Scenario: Clicking a [Item] in the [Model] listing and back again
|
2018-05-11 12:47:21 +00:00
|
|
|
When I visit the [Model] page for yaml
|
|
|
|
---
|
|
|
|
dc: dc-1
|
|
|
|
---
|
|
|
|
When I click [Item] on the [Model]
|
2018-07-04 16:23:33 +00:00
|
|
|
Then the url should be [URL]
|
2019-12-17 18:47:37 +00:00
|
|
|
Then a GET request was made to "[Endpoint]"
|
2018-07-04 16:23:33 +00:00
|
|
|
And I click "[data-test-back]"
|
|
|
|
Then the url should be [Back]
|
2018-05-11 12:47:21 +00:00
|
|
|
Where:
|
2018-10-19 15:17:02 +00:00
|
|
|
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
|
|
|
| Item | Model | URL | Endpoint | Back |
|
|
|
|
| service | services | /dc-1/services/service-0 | /v1/health/service/service-0?dc=dc-1 | /dc-1/services |
|
2019-12-17 18:47:37 +00:00
|
|
|
| node | nodes | /dc-1/nodes/node-0 | /v1/coordinate/nodes?dc=dc-1 | /dc-1/nodes |
|
2019-02-21 10:36:15 +00:00
|
|
|
| kv | kvs | /dc-1/kv/0-key-value/edit | /v1/session/info/ee52203d-989f-4f7a-ab5a-2bef004164ca?dc=dc-1 | /dc-1/kv |
|
2018-10-19 15:17:02 +00:00
|
|
|
# | acl | acls | /dc-1/acls/anonymous | /v1/acl/info/anonymous?dc=dc-1 | /dc-1/acls |
|
2019-12-17 18:47:37 +00:00
|
|
|
| intention | intentions | /dc-1/intentions/ee52203d-989f-4f7a-ab5a-2bef004164ca | /v1/internal/ui/services?dc=dc-1&ns=* | /dc-1/intentions |
|
2019-05-01 18:09:29 +00:00
|
|
|
# These Endpoints will be datacenters due to the datacenters checkbox selectors
|
|
|
|
| token | tokens | /dc-1/acls/tokens/ee52203d-989f-4f7a-ab5a-2bef004164ca | /v1/catalog/datacenters | /dc-1/acls/tokens |
|
|
|
|
| policy | policies | /dc-1/acls/policies/ee52203d-989f-4f7a-ab5a-2bef004164ca | /v1/catalog/datacenters | /dc-1/acls/policies |
|
2018-10-19 15:17:02 +00:00
|
|
|
# | 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 |
|
|
|
|
# | 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 |
|
|
|
|
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
2018-07-30 16:55:44 +00:00
|
|
|
Scenario: The node detail page calls the correct API endpoints
|
|
|
|
When I visit the node page for yaml
|
|
|
|
---
|
|
|
|
dc: dc-1
|
|
|
|
node: node-0
|
|
|
|
---
|
2018-10-19 15:17:02 +00:00
|
|
|
Then the url should be /dc-1/nodes/node-0
|
2019-12-17 18:47:37 +00:00
|
|
|
Then the last GET requests included from yaml
|
2018-07-30 16:55:44 +00:00
|
|
|
---
|
|
|
|
- /v1/catalog/datacenters
|
2019-12-17 18:47:37 +00:00
|
|
|
- /v1/namespaces
|
2018-07-30 16:55:44 +00:00
|
|
|
- /v1/internal/ui/node/node-0?dc=dc-1
|
|
|
|
- /v1/coordinate/nodes?dc=dc-1
|
|
|
|
- /v1/session/node/node-0?dc=dc-1
|
|
|
|
---
|
|
|
|
Scenario: The kv detail page calls the correct API endpoints
|
|
|
|
When I visit the kv page for yaml
|
|
|
|
---
|
|
|
|
dc: dc-1
|
|
|
|
kv: keyname
|
|
|
|
---
|
2018-10-19 15:17:02 +00:00
|
|
|
Then the url should be /dc-1/kv/keyname/edit
|
2019-12-17 18:47:37 +00:00
|
|
|
Then the last GET requests included from yaml
|
2018-07-30 16:55:44 +00:00
|
|
|
---
|
|
|
|
- /v1/catalog/datacenters
|
2019-12-17 18:47:37 +00:00
|
|
|
- /v1/namespaces
|
2018-07-30 16:55:44 +00:00
|
|
|
- /v1/kv/keyname?dc=dc-1
|
|
|
|
- /v1/session/info/ee52203d-989f-4f7a-ab5a-2bef004164ca?dc=dc-1
|
|
|
|
---
|
2018-10-19 15:17:02 +00:00
|
|
|
Scenario: The policies page/tab calls the correct API endpoints
|
|
|
|
When I visit the policies page for yaml
|
|
|
|
---
|
|
|
|
dc: dc-1
|
|
|
|
---
|
|
|
|
Then the url should be /dc-1/acls/policies
|
2019-12-17 18:47:37 +00:00
|
|
|
Then the last GET requests included from yaml
|
2018-10-19 15:17:02 +00:00
|
|
|
---
|
|
|
|
- /v1/catalog/datacenters
|
2019-12-17 18:47:37 +00:00
|
|
|
- /v1/namespaces
|
2018-10-19 15:17:02 +00:00
|
|
|
- /v1/acl/policies?dc=dc-1
|
|
|
|
---
|
2018-07-30 16:55:44 +00:00
|
|
|
Scenario: The intention detail page calls the correct API endpoints
|
|
|
|
When I visit the intention page for yaml
|
|
|
|
---
|
|
|
|
dc: dc-1
|
|
|
|
intention: intention
|
2018-10-19 15:17:02 +00:00
|
|
|
---
|
|
|
|
Then the url should be /dc-1/intentions/intention
|
2019-12-17 18:47:37 +00:00
|
|
|
Then the last GET requests included from yaml
|
2018-07-30 16:55:44 +00:00
|
|
|
---
|
|
|
|
- /v1/catalog/datacenters
|
2019-12-17 18:47:37 +00:00
|
|
|
- /v1/namespaces
|
2018-07-30 16:55:44 +00:00
|
|
|
- /v1/connect/intentions/intention?dc=dc-1
|
2019-12-17 18:47:37 +00:00
|
|
|
- /v1/internal/ui/services?dc=dc-1&ns=*
|
2018-07-30 16:55:44 +00:00
|
|
|
---
|
|
|
|
|
2018-10-19 15:17:02 +00:00
|
|
|
Scenario: Clicking a [Item] in the [Model] listing and cancelling
|
2018-07-04 17:39:15 +00:00
|
|
|
When I visit the [Model] page for yaml
|
|
|
|
---
|
|
|
|
dc: dc-1
|
|
|
|
---
|
|
|
|
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 |
|
2019-02-21 10:36:15 +00:00
|
|
|
| kv | kvs | /dc-1/kv/0-key-value/edit | /dc-1/kv |
|
2018-10-19 15:17:02 +00:00
|
|
|
# | acl | acls | /dc-1/acls/anonymous | /dc-1/acls |
|
2018-07-04 17:39:15 +00:00
|
|
|
| intention | intentions | /dc-1/intentions/ee52203d-989f-4f7a-ab5a-2bef004164ca | /dc-1/intentions |
|
|
|
|
--------------------------------------------------------------------------------------------------------
|
2018-05-11 12:47:21 +00:00
|
|
|
@ignore
|
2018-07-04 12:21:30 +00:00
|
|
|
Scenario: Clicking items in the listings, without depending on the salt ^
|
2018-05-11 12:47:21 +00:00
|
|
|
Then ok
|
2018-07-04 16:23:33 +00:00
|
|
|
Scenario: Clicking create in the [Model] listing
|
|
|
|
When I visit the [Model] page for yaml
|
|
|
|
---
|
|
|
|
dc: dc-1
|
|
|
|
---
|
|
|
|
When I click create
|
|
|
|
Then the url should be [URL]
|
|
|
|
And I click "[data-test-back]"
|
|
|
|
Then the url should be [Back]
|
|
|
|
Where:
|
2018-10-19 15:17:02 +00:00
|
|
|
-----------------------------------------------------------------------------
|
|
|
|
| Item | Model | URL | Back |
|
|
|
|
| kv | kvs | /dc-1/kv/create | /dc-1/kv |
|
|
|
|
# | acl | acls | /dc-1/acls/create | /dc-1/acls |
|
|
|
|
| intention | intentions | /dc-1/intentions/create | /dc-1/intentions |
|
|
|
|
| token | tokens | /dc-1/acls/tokens/create | /dc-1/acls/tokens |
|
|
|
|
| policy | policies | /dc-1/acls/policies/create | /dc-1/acls/policies |
|
|
|
|
-----------------------------------------------------------------------------
|
2018-07-30 16:55:44 +00:00
|
|
|
@ignore
|
2018-07-04 17:39:15 +00:00
|
|
|
Scenario: Using I click on should change the currentPage ^
|
|
|
|
Then ok
|