Merge pull request #188 from hashicorp/ICU-580-breadcrumbs

feat: Define breadcrumbs for accounts
This commit is contained in:
Randall Morey authored and GitHub committed 2020-09-16 12:39:11 -04:00
commit c0dbf7335c
6 files changed
+91

No files matched your search

@@ -0,0 +1,20 @@
import Controller from '@ember/controller';
import { inject as service } from '@ember/service';
export default class ScopesScopeAuthMethodsAuthMethodAccountsController extends Controller {
// =services
@service intl;
// =attributes
/**
* Translated accounts breadcrumb
* @type {string}
*/
get breadCrumb() {
return this.intl.t('resources.accounts');
}
}
@@ -0,0 +1,15 @@
import Controller from '@ember/controller';
export default class ScopesScopeAuthMethodsAuthMethodAccountsAccountController extends Controller {
// =attributes
/**
* An account breadcrumb
* @type {string}
*/
get breadCrumb() {
return this.model.displayName;
}
}
@@ -0,0 +1,20 @@
import Controller from '@ember/controller';
import { inject as service } from '@ember/service';
export default class ScopesScopeAuthMethodsAuthMethodAccountsNewController extends Controller {
// =services
@service intl;
// =attributes
/**
* Translated new account breadcrumb
* @type {string}
*/
get breadCrumb() {
return this.intl.t('titles.new');
}
}
@@ -0,0 +1,12 @@
import { module, test } from 'qunit';
import { setupTest } from 'ember-qunit';
module('Unit | Controller | scopes/scope/auth-methods/auth-method/accounts', function(hooks) {
setupTest(hooks);
// Replace this with your real tests.
test('it exists', function(assert) {
let controller = this.owner.lookup('controller:scopes/scope/auth-methods/auth-method/accounts');
assert.ok(controller);
});
});
@@ -0,0 +1,12 @@
import { module, test } from 'qunit';
import { setupTest } from 'ember-qunit';
module('Unit | Controller | scopes/scope/auth-methods/auth-method/accounts/account', function(hooks) {
setupTest(hooks);
// Replace this with your real tests.
test('it exists', function(assert) {
let controller = this.owner.lookup('controller:scopes/scope/auth-methods/auth-method/accounts/account');
assert.ok(controller);
});
});
@@ -0,0 +1,12 @@
import { module, test } from 'qunit';
import { setupTest } from 'ember-qunit';
module('Unit | Controller | scopes/scope/auth-methods/auth-method/accounts/new', function(hooks) {
setupTest(hooks);
// Replace this with your real tests.
test('it exists', function(assert) {
let controller = this.owner.lookup('controller:scopes/scope/auth-methods/auth-method/accounts/new');
assert.ok(controller);
});
});