diff --git a/ui-v2/package.json b/ui-v2/package.json
index 3eaa98b7f..f0f216a13 100644
--- a/ui-v2/package.json
+++ b/ui-v2/package.json
@@ -115,8 +115,8 @@
"jsonlint": "^1.6.3",
"lint-staged": "^9.2.5",
"loader.js": "^4.7.0",
- "ngraph.graph": "^18.0.3",
"mnemonist": "^0.30.0",
+ "ngraph.graph": "^18.0.3",
"node-sass": "^4.9.3",
"pretender": "^3.2.0",
"prettier": "^1.10.2",
diff --git a/ui-v2/tests/acceptance/components/catalog-filter.feature b/ui-v2/tests/acceptance/components/catalog-filter.feature
index 9eb37f1bc..ad8fd42df 100644
--- a/ui-v2/tests/acceptance/components/catalog-filter.feature
+++ b/ui-v2/tests/acceptance/components/catalog-filter.feature
@@ -129,15 +129,21 @@ Feature: components / catalog-filter
Given 1 datacenter model with the value "dc-1"
And 3 service models from yaml
---
- - Tags: ['one', 'two', 'three']
+ - Name: Service-0
+ Kind: consul
+ Tags: ['one', 'two', 'three']
ChecksPassing: 0
ChecksWarning: 0
ChecksCritical: 1
- - Tags: ['two', 'three']
+ - Name: Service-1
+ Kind: consul
+ Tags: ['two', 'three']
ChecksPassing: 0
ChecksWarning: 1
ChecksCritical: 0
- - Tags: ['three']
+ - Name: Service-2
+ Kind: consul
+ Tags: ['three']
ChecksPassing: 1
ChecksWarning: 0
ChecksCritical: 0
@@ -162,4 +168,4 @@ Feature: components / catalog-filter
---
s: 'status:critical'
---
- And I see 1 service model
+ And I see 1 service model
\ No newline at end of file
diff --git a/ui-v2/tests/acceptance/dc/error.feature b/ui-v2/tests/acceptance/dc/error.feature
index 7cb465ae7..2682471d3 100644
--- a/ui-v2/tests/acceptance/dc/error.feature
+++ b/ui-v2/tests/acceptance/dc/error.feature
@@ -6,7 +6,15 @@ Feature: dc / error: Recovering from a dc 500 error
- dc-1
- dc-500
---
- And 3 service models
+ And 3 service models from yaml
+ ---
+ - Name: Service-0
+ Kind: consul
+ - Name: Service-1
+ Kind: consul
+ - Name: Service-2
+ Kind: consul
+ ---
And the url "/v1/internal/ui/services" responds with a 500 status
When I visit the services page for yaml
---
diff --git a/ui-v2/tests/acceptance/dc/list-blocking.feature b/ui-v2/tests/acceptance/dc/list-blocking.feature
index 45e6e087a..7e6d92438 100644
--- a/ui-v2/tests/acceptance/dc/list-blocking.feature
+++ b/ui-v2/tests/acceptance/dc/list-blocking.feature
@@ -23,7 +23,6 @@ Feature: dc / list-blocking
Where:
------------------------------------------------
| Page | Model | Url |
- | services | service | services |
| nodes | node | nodes |
| intentions | intention | intentions |
------------------------------------------------
diff --git a/ui-v2/tests/acceptance/dc/list.feature b/ui-v2/tests/acceptance/dc/list.feature
index efce1ec08..7a67f4cdd 100644
--- a/ui-v2/tests/acceptance/dc/list.feature
+++ b/ui-v2/tests/acceptance/dc/list.feature
@@ -13,7 +13,6 @@ Feature: dc / list: List Models
Where:
-------------------------------------------------
| Model | Page | Url |
- | service | services | /dc-1/services |
| node | nodes | /dc-1/nodes |
| kv | kvs | /dc-1/kv |
# | acl | acls | /dc-1/acls |
diff --git a/ui-v2/tests/acceptance/dc/nspaces/manage.feature b/ui-v2/tests/acceptance/dc/nspaces/manage.feature
index 9df85c3d9..24083b10f 100644
--- a/ui-v2/tests/acceptance/dc/nspaces/manage.feature
+++ b/ui-v2/tests/acceptance/dc/nspaces/manage.feature
@@ -13,7 +13,22 @@ Feature: dc / nspaces / manage : Managing Namespaces
---
- dc-1
---
- And 6 service models
+ And 6 service models from yaml
+ ---
+ - Name: Service-0
+ Kind: consul
+ - Name: Service-1
+ Kind: consul
+ - Name: Service-2
+ Kind: consul
+ - Name: Service-3
+ Kind: consul
+ - Name: Service-4
+ Kind: consul
+ - Name: Service-5
+ Kind: consul
+ ---
+
When I visit the services page for yaml
---
dc: dc-1
diff --git a/ui-v2/tests/acceptance/dc/services/dc-switch.feature b/ui-v2/tests/acceptance/dc/services/dc-switch.feature
index e51472ebd..5b2d7d293 100644
--- a/ui-v2/tests/acceptance/dc/services/dc-switch.feature
+++ b/ui-v2/tests/acceptance/dc/services/dc-switch.feature
@@ -6,7 +6,21 @@ Feature: dc / services / dc-switch : Switching Datacenters
- dc-1
- dc-2
---
- And 6 service models
+ And 6 service models from yaml
+ ---
+ - Name: Service-0
+ Kind: consul
+ - Name: Service-1
+ Kind: consul
+ - Name: Service-2
+ Kind: consul
+ - Name: Service-3
+ Kind: consul
+ - Name: Service-4
+ Kind: consul
+ - Name: Service-5
+ Kind: consul
+ ---
When I visit the services page for yaml
---
dc: dc-1
diff --git a/ui-v2/tests/acceptance/dc/services/index.feature b/ui-v2/tests/acceptance/dc/services/index.feature
index d9df27df9..59bd3d598 100644
--- a/ui-v2/tests/acceptance/dc/services/index.feature
+++ b/ui-v2/tests/acceptance/dc/services/index.feature
@@ -2,24 +2,24 @@
Feature: dc / services / index: List Services
Scenario:
Given 1 datacenter model with the value "dc-1"
- And 6 service models from yaml
+ And 4 service models from yaml
---
- Name: Service 1
+ Kind: consul
ExternalSources:
- consul
- Name: Service 2
+ Kind: consul
ExternalSources:
- nomad
- Name: Service 3
+ Kind: consul
ExternalSources:
- terraform
- Name: Service 4
+ Kind: consul
ExternalSources:
- kubernetes
- - Name: Service 5
- ExternalSources: []
- - Name: Service 6
- ExternalSources: ~
---
When I visit the services page for yaml
---
@@ -27,14 +27,12 @@ Feature: dc / services / index: List Services
---
Then the url should be /dc-1/services
And the title should be "Services - Consul"
- Then I see 6 service models
+ Then I see 4 service models
And I see externalSource on the services like yaml
---
- consul
- nomad
- terraform
- kubernetes
- - ~
- - ~
---
diff --git a/ui-v2/tests/acceptance/dc/services/list-blocking.feature b/ui-v2/tests/acceptance/dc/services/list-blocking.feature
new file mode 100644
index 000000000..c44578212
--- /dev/null
+++ b/ui-v2/tests/acceptance/dc/services/list-blocking.feature
@@ -0,0 +1,26 @@
+@setupApplicationTest
+Feature: dc / services / list blocking
+ Scenario: Viewing the listing pages for service
+ Given 1 datacenter model with the value "dc-1"
+ Given 3 service models from yaml
+ ---
+ - Name: Service-0
+ Kind: consul
+ - Name: Service-1
+ Kind: consul
+ - Name: Service-2
+ Kind: consul
+ ---
+ And a network latency of 100
+ When I visit the services page for yaml
+ ---
+ dc: dc-1
+ ---
+ Then the url should be /dc-1/services
+ And pause until I see 3 service models
+ And an external edit results in 5 service models
+ And pause until I see 3 service models
+ And an external edit results in 1 service model
+ And pause until I see 1 service model
+ And an external edit results in 0 service models
+ And pause until I see 0 service models
diff --git a/ui-v2/tests/acceptance/dc/services/list.feature b/ui-v2/tests/acceptance/dc/services/list.feature
new file mode 100644
index 000000000..db7317083
--- /dev/null
+++ b/ui-v2/tests/acceptance/dc/services/list.feature
@@ -0,0 +1,20 @@
+@setupApplicationTest
+Feature: dc / services / list
+ Scenario: Listing service
+ Given 1 datacenter model with the value "dc-1"
+ And 3 service models from yaml
+ ---
+ - Name: Service-0
+ Kind: consul
+ - Name: Service-1
+ Kind: consul
+ - Name: Service-2
+ Kind: consul
+ ---
+ When I visit the services page for yaml
+ ---
+ dc: dc-1
+ ---
+ Then the url should be /dc-1/services
+
+ Then I see 3 service models
\ No newline at end of file
diff --git a/ui-v2/tests/acceptance/steps/dc/services/list-blocking-steps.js b/ui-v2/tests/acceptance/steps/dc/services/list-blocking-steps.js
new file mode 100644
index 000000000..ba1093295
--- /dev/null
+++ b/ui-v2/tests/acceptance/steps/dc/services/list-blocking-steps.js
@@ -0,0 +1,10 @@
+import steps from '../../steps';
+
+// step definitions that are shared between features should be moved to the
+// tests/acceptance/steps/steps.js file
+
+export default function(assert) {
+ return steps(assert).then('I should find a file', function() {
+ assert.ok(true, this.step);
+ });
+}
diff --git a/ui-v2/tests/acceptance/steps/dc/services/list-steps.js b/ui-v2/tests/acceptance/steps/dc/services/list-steps.js
new file mode 100644
index 000000000..ba1093295
--- /dev/null
+++ b/ui-v2/tests/acceptance/steps/dc/services/list-steps.js
@@ -0,0 +1,10 @@
+import steps from '../../steps';
+
+// step definitions that are shared between features should be moved to the
+// tests/acceptance/steps/steps.js file
+
+export default function(assert) {
+ return steps(assert).then('I should find a file', function() {
+ assert.ok(true, this.step);
+ });
+}
diff --git a/ui-v2/tests/pages.js b/ui-v2/tests/pages.js
index faac01a3d..f42a76e85 100644
--- a/ui-v2/tests/pages.js
+++ b/ui-v2/tests/pages.js
@@ -69,7 +69,7 @@ export default {
index: create(index(visitable, collection)),
dcs: create(dcs(visitable, clickable, attribute, collection)),
services: create(
- services(visitable, clickable, attribute, collection, page, catalogFilter, radiogroup)
+ services(visitable, clickable, text, attribute, collection, page, catalogFilter, radiogroup)
),
service: create(service(visitable, attribute, collection, text, catalogFilter, tabgroup)),
instance: create(instance(visitable, attribute, collection, text, tabgroup)),
diff --git a/ui-v2/tests/pages/dc/services/index.js b/ui-v2/tests/pages/dc/services/index.js
index 7b43e3618..b3399296c 100644
--- a/ui-v2/tests/pages/dc/services/index.js
+++ b/ui-v2/tests/pages/dc/services/index.js
@@ -1,11 +1,12 @@
-export default function(visitable, clickable, attribute, collection, page, filter) {
+export default function(visitable, clickable, text, attribute, collection, page, filter) {
+ const service = {
+ name: text('a span:nth-child(2)'),
+ service: clickable('a'),
+ externalSource: attribute('data-test-external-source', '[data-test-external-source]'),
+ };
return {
visit: visitable('/:dc/services'),
- services: collection('[data-test-service]', {
- name: attribute('data-test-service'),
- service: clickable('a'),
- externalSource: attribute('data-test-external-source', 'a span'),
- }),
+ services: collection('.consul-service-list > ul > li:not(:first-child)', service),
dcs: collection('[data-test-datacenter-picker]', {
name: clickable('a'),
}),
diff --git a/ui-v2/yarn.lock b/ui-v2/yarn.lock
index 8efec6add..2a53d0973 100644
--- a/ui-v2/yarn.lock
+++ b/ui-v2/yarn.lock
@@ -1211,9 +1211,9 @@
js-yaml "^3.13.1"
"@hashicorp/consul-api-double@^2.6.2":
- version "2.12.0"
- resolved "https://registry.yarnpkg.com/@hashicorp/consul-api-double/-/consul-api-double-2.12.0.tgz#725078f770bbd0ef75a5f2498968c5c8891f90a2"
- integrity sha512-8OcgesUjWQ8AjaXzbz3tGJQn1kM0sN6pLidGM7isNPUyYmIjIEXQzaeUQYzsfv0N2Ko9ZuOXYUsaBl8IK1KGow==
+ version "2.14.0"
+ resolved "https://registry.yarnpkg.com/@hashicorp/consul-api-double/-/consul-api-double-2.14.0.tgz#ecef725fc22490011a671bc0a285a16013ca5e53"
+ integrity sha512-1rGMg/XSHR2ROr8a7OVEwOUy8UWuYdNUMijMxCuFHR201vDAGK9EDmkJCPF2PfYsDrcsiyb/0dxIL6Mba9p32Q==
"@hashicorp/ember-cli-api-double@^3.0.2":
version "3.0.2"