mirror of
https://github.com/status-im/consul.git
synced 2025-01-31 07:57:17 +00:00
39c5b91272
* Refactor remaining `moduleFor`-tests `moduleFor*` will be removed from ember-qunit v5 * Upgrade ember-qunit to v5 * Update how we use ember-sinon-qunit With ember-qunit v5 we need to use ember-sinon-qunit differently. * Fix submit-blank test We can't click on disabled buttons with new test-helpers. We need to adapt the test accordingly. * Make sure we await fill-in with form yaml step We need to await `fill-in`. This changes the reducer function in the step to create a proper await chain. * Fix show-routing test We need to await a tick before visiting again. * Remove redundant `wait one tick`-step * remove unneeded "next Tick" promise from form step * Increase timeout show-routing feature * Comment on pause hack for show-routing test
70 lines
2.1 KiB
Gherkin
70 lines
2.1 KiB
Gherkin
@setupApplicationTest
|
|
Feature: dc / services / show-routing: Show Routing for Service
|
|
Scenario: Given a service, the Routing tab should display
|
|
Given 1 datacenter model with the value "dc1"
|
|
And 1 node models
|
|
And 1 service model from yaml
|
|
---
|
|
- Service:
|
|
Name: service-0
|
|
ID: service-0-with-id
|
|
---
|
|
When I visit the service page for yaml
|
|
---
|
|
dc: dc1
|
|
service: service-0
|
|
---
|
|
And the title should be "service-0 - Consul"
|
|
And I see routing on the tabs
|
|
Scenario: Given connect is disabled, the Routing tab should not display or error
|
|
Given 2 datacenter models from yaml
|
|
---
|
|
- dc1
|
|
- dc2
|
|
---
|
|
And 1 node models
|
|
And 2 service model from yaml
|
|
---
|
|
- Service:
|
|
Name: service-0
|
|
ID: service-0-with-id
|
|
- Service:
|
|
Name: service-1
|
|
ID: service-1-with-id
|
|
---
|
|
And the url "/v1/discovery-chain/service-0?dc=dc1&ns=@namespace" responds with from yaml
|
|
---
|
|
status: 500
|
|
body: "Connect must be enabled in order to use this endpoint"
|
|
---
|
|
When I visit the service page for yaml
|
|
---
|
|
dc: dc1
|
|
service: service-0
|
|
---
|
|
And I don't see routing on the tabs
|
|
And I don't see the "[data-test-error]" element
|
|
# Not entirely sure if having one dc not having connect
|
|
# and another having connect ever actually happen
|
|
And I visit the service page for yaml
|
|
---
|
|
dc: dc2
|
|
service: service-1
|
|
---
|
|
And I see routing on the tabs
|
|
# something weird is going on with this test
|
|
# without waiting we issue a url reload that
|
|
# will make the test timeout.
|
|
# waiting will "fix" this - we should look into
|
|
# the underlying reason for this soon. This is
|
|
# only a quick-fix to land ember-qunit v5.
|
|
And pause for 1000
|
|
And I visit the service page for yaml
|
|
---
|
|
dc: dc1
|
|
service: service-0
|
|
---
|
|
Then a GET request wasn't made to "/v1/discovery-chain/service-0?dc=dc1&ns=@namespace"
|
|
And I don't see routing on the tabs
|
|
And I don't see the "[data-test-error]" element
|