mirror of https://github.com/hashicorp/consul
1. Check the dc's model for both dcs list and the requested dc. 2. If the dc model doesn't exist use and empty array for dcs and a fake dc with the Name 'Error' as we can't even trust what is in the `paramsFor`pull/4266/head
parent
46151ccdb4
commit
61e3fa3244
@ -0,0 +1,27 @@
|
||||
@setupApplicationTest
|
||||
Feature: dc / services / error
|
||||
Scenario: Arriving at the service page that doesn't exist
|
||||
Given 2 datacenter models from yaml
|
||||
---
|
||||
- dc-1
|
||||
- dc-2
|
||||
---
|
||||
When I visit the services page for yaml
|
||||
---
|
||||
dc: 404-datacenter
|
||||
---
|
||||
Then I see the text "404 (Page not found)" in "[data-test-error]"
|
||||
Scenario: Arriving at the service page
|
||||
Given 2 datacenter models from yaml
|
||||
---
|
||||
- dc-1
|
||||
- dc-2
|
||||
---
|
||||
Given the url "/v1/internal/ui/services" responds with a 500 status
|
||||
When I visit the services page for yaml
|
||||
---
|
||||
dc: dc-1
|
||||
---
|
||||
Then I see the text "500 (The backend responded with an error)" in "[data-test-error]"
|
||||
And I click "[data-test-datacenter-selected]"
|
||||
And I see 2 datacenter models
|
@ -0,0 +1,10 @@
|
||||
import steps from '../../steps';
|
||||
|
||||
// step definitions that are shared between features should be moved to the
|
||||
// tests/acceptance/steps/steps.js file
|
||||
|
||||
export default function(assert) {
|
||||
return steps(assert).then('I should find a file', function() {
|
||||
assert.ok(true, this.step);
|
||||
});
|
||||
}
|
Loading…
Reference in new issue