mirror of https://github.com/hashicorp/consul
Merge pull request #4261 from hashicorp/feature/dc-redirect
UI - Add a beforeModel hook at dc/index to auto transition to servicespull/4243/merge
commit
9cb4e7db07
@ -0,0 +1,7 @@
|
||||
import Route from '@ember/routing/route';
|
||||
|
||||
export default Route.extend({
|
||||
beforeModel: function() {
|
||||
this.transitionTo('dc.services');
|
||||
},
|
||||
});
|
@ -0,0 +1,12 @@
|
||||
@setupApplicationTest
|
||||
Feature: dc forwarding
|
||||
In order to arrive at a useful page when only specifying a dc in the url
|
||||
As a user
|
||||
I should be redirected to the services page for the dc
|
||||
Scenario: Arriving at the datacenter index page with no other url info
|
||||
Given 1 datacenter model with the value "datacenter"
|
||||
When I visit the dcs page for yaml
|
||||
---
|
||||
dc: datacenter
|
||||
---
|
||||
Then the url should be /datacenter/services
|
@ -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);
|
||||
});
|
||||
}
|
@ -0,0 +1,11 @@
|
||||
import { moduleFor, test } from 'ember-qunit';
|
||||
|
||||
moduleFor('route:dc/index', 'Unit | Route | dc/index', {
|
||||
// Specify the other units that are required for this test.
|
||||
// needs: ['controller:foo']
|
||||
});
|
||||
|
||||
test('it exists', function(assert) {
|
||||
let route = this.subject();
|
||||
assert.ok(route);
|
||||
});
|
Loading…
Reference in new issue