From 40a270a4928079dc6548923bf14905b798c5ad52 Mon Sep 17 00:00:00 2001 From: John Cowen Date: Thu, 12 Jul 2018 13:35:33 +0100 Subject: [PATCH] Acceptance tests to search/look for service id's --- .../components/catalog-filter.feature | 33 ++++++++++++++++++- .../tests/acceptance/dc/services/show.feature | 12 +++++++ ui-v2/tests/pages/dc/nodes/show.js | 1 + ui-v2/tests/pages/dc/services/show.js | 2 ++ 4 files changed, 47 insertions(+), 1 deletion(-) diff --git a/ui-v2/tests/acceptance/components/catalog-filter.feature b/ui-v2/tests/acceptance/components/catalog-filter.feature index 9db4e0ee7c..962edec414 100644 --- a/ui-v2/tests/acceptance/components/catalog-filter.feature +++ b/ui-v2/tests/acceptance/components/catalog-filter.feature @@ -65,7 +65,7 @@ Feature: components / catalog-filter --- - ID: node-0 --- - When I visit the node page for yaml + When I visit the [Page] page for yaml --- dc: dc1 node: node-0 @@ -81,8 +81,39 @@ Feature: components / catalog-filter --- And I see 1 [Model] model And I see 1 [Model] model with the port "65535" + Then I fill in with yaml + --- + s: service-0-with-id + --- + And I see 1 [Model] model + And I see 1 [Model] model with the id "service-0-with-id" Where: ------------------------------------------------- | Model | Page | Url | | service | node | /dc-1/nodes/node-0 | ------------------------------------------------- + Scenario: Filtering [Model] in [Page] + Given 1 datacenter model with the value "dc1" + And 2 [Model] models from yaml + --- + - ID: node-0 + --- + When I visit the [Page] page for yaml + --- + dc: dc1 + service: service-0 + --- + Then I fill in with yaml + --- + s: service-0-with-id + --- + And I see 1 [Model] model + Then I see id on the unhealthy like yaml + --- + - service-0-with-id + --- + Where: + ------------------------------------------------- + | Model | Page | Url | + | nodes | service | /dc-1/services/service-0 | + ------------------------------------------------- diff --git a/ui-v2/tests/acceptance/dc/services/show.feature b/ui-v2/tests/acceptance/dc/services/show.feature index dd220c4044..29b3c4f892 100644 --- a/ui-v2/tests/acceptance/dc/services/show.feature +++ b/ui-v2/tests/acceptance/dc/services/show.feature @@ -28,14 +28,17 @@ Feature: dc / services / show: Show Service - Checks: - Status: passing Service: + ID: passing-service-8080 Port: 8080 Node: Address: 1.1.1.1 - Service: + ID: service-8000 Port: 8000 Node: Address: 2.2.2.2 - Service: + ID: service-8888 Port: 8888 Node: Address: 3.3.3.3 @@ -54,3 +57,12 @@ Feature: dc / services / show: Show Service - "2.2.2.2:8000" - "3.3.3.3:8888" --- + Then I see id on the healthy like yaml + --- + - "passing-service-8080" + --- + Then I see id on the unhealthy like yaml + --- + - "service-8000" + - "service-8888" + --- diff --git a/ui-v2/tests/pages/dc/nodes/show.js b/ui-v2/tests/pages/dc/nodes/show.js index 4296397685..01bfc7737b 100644 --- a/ui-v2/tests/pages/dc/nodes/show.js +++ b/ui-v2/tests/pages/dc/nodes/show.js @@ -6,6 +6,7 @@ export default function(visitable, deletable, clickable, attribute, collection, name: attribute('data-test-node-healthcheck'), }), services: collection('#services [data-test-tabular-row]', { + id: attribute('data-test-service-id', '[data-test-service-id]'), port: attribute('data-test-service-port', '.port'), }), sessions: collection( diff --git a/ui-v2/tests/pages/dc/services/show.js b/ui-v2/tests/pages/dc/services/show.js index 483e3a4127..7e2a895bf3 100644 --- a/ui-v2/tests/pages/dc/services/show.js +++ b/ui-v2/tests/pages/dc/services/show.js @@ -7,10 +7,12 @@ export default function(visitable, attribute, collection, text, filter) { healthy: collection('[data-test-healthy] [data-test-node]', { name: attribute('data-test-node'), address: text('header strong'), + id: text('header em'), }), unhealthy: collection('[data-test-unhealthy] [data-test-node]', { name: attribute('data-test-node'), address: text('header strong'), + id: text('header em'), }), filter: filter, };