Acceptance tests to search/look for service id's

This commit is contained in:
John Cowen 2018-07-12 13:35:33 +01:00
parent c13e0dbe8c
commit 40a270a492
4 changed files with 47 additions and 1 deletions

View File

@ -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 |
-------------------------------------------------

View File

@ -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"
---

View File

@ -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(

View File

@ -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,
};