John Cowen 96c5723d28 ui: Ensure URLs for tabs change when selecting a different DC (#8397)
* ui: Add URLs to tabs to we can assert them

* Add dcs to the service show page, temporarily

There is an ongoing PR which removes the need to do this by adding a dcs
property to the navigation, hence temporary

* Add a step to assert on whether text _contains_ rather than exact match

* Test whether the URL of the instance tab changes when the user switches dcs using the main navigation menu

* Recompute href-to's on URL change, just like is-href
2020-07-29 14:12:38 +00:00

28 lines
799 B
Gherkin

@setupApplicationTest
Feature: dc / services / show / dc-switch : Switching Datacenters
Scenario: Seeing all services when switching datacenters
Given 2 datacenter models from yaml
---
- dc-1
- dc-2
---
And 1 node model
And 1 service model from yaml
---
- Service:
Service: consul
Kind: ~
---
When I visit the service page for yaml
---
dc: dc-1
service: consul
---
Then the url should be /dc-1/services/consul/instances
And I see instancesUrl on the tabs contains "/dc-1/services/consul/instances"
When I click dc on the navigation
And I click dcs.1.name
Then the url should be /dc-2/services/consul/instances
And I see instancesUrl on the tabs contains "/dc-2/services/consul/instances"