Skip to content

Commit

Permalink
Fix up tests to fit redesign of Service Instances Detail page
Browse files Browse the repository at this point in the history
  • Loading branch information
kaxcode committed Apr 22, 2020
1 parent 35e3fe3 commit 24aa7a5
Show file tree
Hide file tree
Showing 8 changed files with 13 additions and 356 deletions.
4 changes: 2 additions & 2 deletions ui-v2/app/components/healthcheck-list/index.hbs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<ul data-test-healthchecks>
<ul>
{{#each (sort-by (action 'sortChecksByImportance') items) as |item| }}
{{! TODO: this component and its child should be moved to a single component }}
<HealthcheckOutput @data-test-node-healthcheck={{item.Name}} @class={{item.Status}} @tagName="li">
<HealthcheckOutput class={{item.Status}} @tagName="li">
<BlockSlot @name="header">
<h3>{{item.Name}}</h3>
</BlockSlot>
Expand Down
4 changes: 2 additions & 2 deletions ui-v2/tests/acceptance/dc/services/instances/gateway.feature
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ Feature: dc / services / instances / gateway: Show Gateway Service Instance
node: node-0
id: gateway-with-id
---
Then the url should be /dc1/services/gateway/instances/node-0/gateway-with-id/service-checks
Then the url should be /dc1/services/gateway/instances/node-0/gateway-with-id/health-checks

And I see serviceChecksIsSelected on the tabs
And I see healthChecksIsSelected on the tabs

When I click addresses on the tabs
And I see addressesIsSelected on the tabs
Expand Down
176 changes: 0 additions & 176 deletions ui-v2/tests/acceptance/dc/services/instances/proxy.feature

This file was deleted.

77 changes: 3 additions & 74 deletions ui-v2/tests/acceptance/dc/services/instances/show.feature
Original file line number Diff line number Diff line change
Expand Up @@ -47,29 +47,19 @@ Feature: dc / services / instances / show: Show Service Instance
Status: critical
---
Scenario: A Service instance has no Proxy
Given 1 proxy model from yaml
---
- ServiceProxy:
DestinationServiceName: service-1
DestinationServiceID: ~
---
When I visit the instance page for yaml
---
dc: dc1
service: service-0
node: another-node
id: service-0-with-id
---
Then the url should be /dc1/services/service-0/instances/another-node/service-0-with-id/service-checks
Then I don't see type on the proxy
Then the url should be /dc1/services/service-0/instances/another-node/service-0-with-id/health-checks
Then I see externalSource like "nomad"

And I don't see upstreams on the tabs
And I see serviceChecksIsSelected on the tabs
And I see healthChecksIsSelected on the tabs
And I see 3 of the serviceChecks object

When I click nodeChecks on the tabs
And I see nodeChecksIsSelected on the tabs
And I see 3 of the nodeChecks object

When I click tags on the tabs
Expand Down Expand Up @@ -98,67 +88,6 @@ Feature: dc / services / instances / show: Show Service Instance
node: node-0
id: service-0-with-id
---
Then the url should be /dc1/services/service-0/instances/node-0/service-0-with-id/service-checks
Then the url should be /dc1/services/service-0/instances/node-0/service-0-with-id/health-checks
And an external edit results in 0 instance models
And pause until I see the text "deregistered" in "[data-notification]"

Scenario: A Service instance with a Proxy with only automatically exposed checks but no paths
Given 1 proxy model from yaml
---
- ServiceProxy:
DestinationServiceName: service-0
DestinationServiceID: ~
Expose:
Checks: true
Paths: []
---
When I visit the instance page for yaml
---
dc: dc1
service: service-0
node: another-node
id: service-0-with-id
---
Then the url should be /dc1/services/service-0/instances/another-node/service-0-with-id/service-checks
And I see serviceChecksIsSelected on the tabs

And I don't see exposedPaths on the tabs

When I click serviceChecks on the tabs
And I see exposed on the serviceChecks

When I click nodeChecks on the tabs
And I don't see exposed on the nodeChecks

Scenario: A Service Instance with a Proxy with no automatically exposed checks
Given 1 proxy model from yaml
---
- ServiceProxy:
DestinationServiceName: service-0
DestinationServiceID: ~
Expose:
Checks: false
Paths: []
---
When I visit the instance page for yaml
---
dc: dc1
service: service-0
node: another-node
id: service-0-with-id
---
Then the url should be /dc1/services/service-0/instances/another-node/service-0-with-id/service-checks
And I see serviceChecksIsSelected on the tabs

And I don't see exposedPaths on the tabs

When I click serviceChecks on the tabs
And I don't see exposed on the serviceChecks

When I click nodeChecks on the tabs
And I don't see exposed on the nodeChecks

@ignore
Scenario: A Service Instance's proxy blocking query is closed when the instance is deregistered
Then ok

30 changes: 0 additions & 30 deletions ui-v2/tests/acceptance/dc/services/instances/sidecar-proxy.feature

This file was deleted.

21 changes: 0 additions & 21 deletions ui-v2/tests/acceptance/dc/services/instances/with-proxy.feature

This file was deleted.

42 changes: 0 additions & 42 deletions ui-v2/tests/acceptance/dc/services/instances/with-sidecar.feature

This file was deleted.

Loading

0 comments on commit 24aa7a5

Please sign in to comment.