diff --git a/addons/api/addon/abilities/target.js b/addons/api/addon/abilities/target.js index 11516c3b5..65cc921da 100644 --- a/addons/api/addon/abilities/target.js +++ b/addons/api/addon/abilities/target.js @@ -30,14 +30,14 @@ export default class TargetAbility extends ModelAbility { /** * @type {boolean} */ - get canAddCredentialSources() { + get canAddBrokeredCredentialSources() { return this.hasAuthorizedAction('add-credential-sources'); } /** * @type {boolean} */ - get canRemoveCredentialSources() { + get canRemoveBrokeredCredentialSources() { return this.hasAuthorizedAction('remove-credential-sources'); } } diff --git a/addons/api/addon/models/target.js b/addons/api/addon/models/target.js index 9011613b4..1677d2201 100644 --- a/addons/api/addon/models/target.js +++ b/addons/api/addon/models/target.js @@ -23,7 +23,7 @@ export default class TargetModel extends GeneratedTargetModel { /** * Credential source ids are read only and can be - * persisted via a dedicated call to `addCredentialSources()`. + * persisted via a dedicated call to `addBrokeredCredentialSources()`. */ @fragmentArray('fragment-string', { readOnly: true, @@ -54,7 +54,7 @@ export default class TargetModel extends GeneratedTargetModel { * @type {[CredentialLibraryModel, CredentialModel]} */ @computed('brokered_credential_source_ids.[]', 'store') - get credentialSources() { + get brokeredCredentialSources() { return this.brokered_credential_source_ids .map((source) => { if (source.value.startsWith('cred')) { @@ -161,7 +161,10 @@ export default class TargetModel extends GeneratedTargetModel { * @param {object} options.adapterOptions * @return {Promise} */ - addCredentialSources(credentialSourceIDs, options = { adapterOptions: {} }) { + addBrokeredCredentialSources( + credentialSourceIDs, + options = { adapterOptions: {} } + ) { const defaultAdapterOptions = { method: 'add-credential-sources', credentialSourceIDs, @@ -184,7 +187,7 @@ export default class TargetModel extends GeneratedTargetModel { * @param {object} options.adapterOptions * @return {Promise} */ - removeCredentialSources( + removeBrokeredCredentialSources( credentialSourceIDs, options = { adapterOptions: {} } ) { @@ -208,8 +211,8 @@ export default class TargetModel extends GeneratedTargetModel { * @param {object} options * @return {Promise} */ - removeCredentialSource(credentialSourceID, options) { - return this.removeCredentialSources([credentialSourceID], options); + removeBrokeredCredentialSource(credentialSourceID, options) { + return this.removeBrokeredCredentialSources([credentialSourceID], options); } /** diff --git a/addons/api/mirage/config.js b/addons/api/mirage/config.js index e7a504b25..33b310494 100644 --- a/addons/api/mirage/config.js +++ b/addons/api/mirage/config.js @@ -461,7 +461,7 @@ export default function () { return !attrs.hostSourceIds.includes(id); }); } - // If adding credential sources, push them into the array + // If adding brokered credential sources, push them into the array if (method === 'add-credential-sources') { updatedAttrs.credentialLibraryIds = target.credentialLibraryIds; updatedAttrs.credentialIds = target.credentialIds; @@ -478,7 +478,7 @@ export default function () { } }); } - // If deleting credential sources, filter them out of the array + // If deleting brokered credential sources, filter them out of the array if (method === 'remove-credential-sources') { updatedAttrs.credentialLibraryIds = target.credentialLibraryIds; updatedAttrs.credentialIds = target.credentialIds; diff --git a/addons/api/tests/unit/abilities/target-test.js b/addons/api/tests/unit/abilities/target-test.js index 0db5f34d0..77cb26f13 100644 --- a/addons/api/tests/unit/abilities/target-test.js +++ b/addons/api/tests/unit/abilities/target-test.js @@ -43,9 +43,9 @@ module('Unit | Abilities | Target', function (hooks) { const model = { authorized_actions: ['add-credential-sources'], }; - assert.ok(service.can('addCredentialSources target', model)); + assert.ok(service.can('addBrokeredCredentialSources target', model)); model.authorized_actions = []; - assert.notOk(service.can('addCredentialSources target', model)); + assert.notOk(service.can('addBrokeredCredentialSources target', model)); }); test('it reflects when a given target may remove crednetial sources', function (assert) { @@ -54,8 +54,8 @@ module('Unit | Abilities | Target', function (hooks) { const model = { authorized_actions: ['remove-credential-sources'], }; - assert.ok(service.can('removeCredentialSources target', model)); + assert.ok(service.can('removeBrokeredCredentialSources target', model)); model.authorized_actions = []; - assert.notOk(service.can('removeCredentialSources target', model)); + assert.notOk(service.can('removeBrokeredCredentialSources target', model)); }); }); diff --git a/addons/api/tests/unit/models/target-test.js b/addons/api/tests/unit/models/target-test.js index 3cdb9b35c..a164287a4 100644 --- a/addons/api/tests/unit/models/target-test.js +++ b/addons/api/tests/unit/models/target-test.js @@ -231,7 +231,7 @@ module('Unit | Model | target', function (hooks) { ); }); - test('it has a `credentialSources` array of resolved model instances (if those instances are already in the store)', function (assert) { + test('it has a `brokeredCredentialSources` array of resolved model instances (if those instances are already in the store)', function (assert) { assert.expect(4); const store = this.owner.lookup('service:store'); store.push({ @@ -250,7 +250,7 @@ module('Unit | Model | target', function (hooks) { 'Target has two entires in brokered_credential_source_ids' ); assert.strictEqual( - target.credentialSources.length, + target.brokeredCredentialSources.length, 0, 'Target has no resolved credentialSources because they are not loaded yet' ); @@ -281,13 +281,13 @@ module('Unit | Model | target', function (hooks) { 'Target has two entires in brokered_credential_source_ids' ); assert.strictEqual( - target.credentialSources.length, + target.brokeredCredentialSources.length, 2, 'Target has two resolved credentialSources' ); }); - test('it has an `addCredentialSources` method that targets a specific POST API endpoint and serialization', async function (assert) { + test('it has an `addBrokeredCredentialSources` method that targets a specific POST API endpoint and serialization', async function (assert) { assert.expect(1); this.server.post( '/v1/targets/123abc:add-credential-sources', @@ -318,10 +318,10 @@ module('Unit | Model | target', function (hooks) { }, }); const model = store.peekRecord('target', '123abc'); - await model.addCredentialSources(['123_abc', 'foobar']); + await model.addBrokeredCredentialSources(['123_abc', 'foobar']); }); - test('it has a `removeCredentialSources` method that targets a specific POST API endpoint and serialization', async function (assert) { + test('it has a `removeBrokeredCredentialSources` method that targets a specific POST API endpoint and serialization', async function (assert) { assert.expect(1); this.server.post( '/v1/targets/123abc:remove-credential-sources', @@ -352,10 +352,10 @@ module('Unit | Model | target', function (hooks) { }, }); const model = store.peekRecord('target', '123abc'); - await model.removeCredentialSources(['1', '2']); + await model.removeBrokeredCredentialSources(['1', '2']); }); - test('it has a `removeCredentialSource` method that deletes a single credential library using `removeCredentialSources` method', async function (assert) { + test('it has a `removeBrokeredCredentialSource` method that deletes a single credential library using `removeBrokeredCredentialSources` method', async function (assert) { assert.expect(1); this.server.post( '/v1/targets/123abc:remove-credential-sources', @@ -386,7 +386,7 @@ module('Unit | Model | target', function (hooks) { }, }); const model = store.peekRecord('target', '123abc'); - await model.removeCredentialSource('2'); + await model.removeBrokeredCredentialSource('2'); }); test('it has isSSH property and returns the expected values', function (assert) { diff --git a/addons/core/translations/resources/en-us.yaml b/addons/core/translations/resources/en-us.yaml index b3bb2c7be..ad4d9a26d 100644 --- a/addons/core/translations/resources/en-us.yaml +++ b/addons/core/translations/resources/en-us.yaml @@ -274,7 +274,7 @@ target: create: New Target delete: Delete Target add-host-sources: Add Host Sources - add-credential-sources: Add Credential Sources + add-brokered-credential-sources: Add Brokered Credentials types: tcp: TCP ssh: SSH @@ -294,22 +294,22 @@ target: add: title: Add Host Sources description: Select host sources to assign to this target. - credential-source: - title: Credential Source - title_plural: Credential Sources + brokered-credential-source: + title: Brokered Credential + title_plural: Brokered Credentials types: vault: Vault username_password: Username & Password messages: welcome: - title: Welcome to Credential Sources - description: No credential sources in this target. + title: Welcome to brokered credentials + description: No brokered credential sources in this target. none: - title: No Credential Sources Available - description: No credential sources available to add to this target. + title: No Brokered Credential Sources Available + description: No brokered credential sources available to add to this target. add: - title: Add Credential Sources - description: Select credential sources to assign to this target. + title: Add Brokered Credential Sources + description: Select brokered credential sources to assign to this target. credential-store: title: Credential Store title_plural: Credential Stores diff --git a/ui/admin/app/components/form/target/add-credential-sources/index.hbs b/ui/admin/app/components/form/target/add-brokered-credential-sources/index.hbs similarity index 89% rename from ui/admin/app/components/form/target/add-credential-sources/index.hbs rename to ui/admin/app/components/form/target/add-brokered-credential-sources/index.hbs index c9a06ad13..f6343e9c8 100644 --- a/ui/admin/app/components/form/target/add-credential-sources/index.hbs +++ b/ui/admin/app/components/form/target/add-brokered-credential-sources/index.hbs @@ -7,7 +7,7 @@ as |form| > @@ -33,7 +33,7 @@ {{t (concat - 'resources.target.credential-source.types.' + 'resources.target.brokered-credential-source.types.' credentialSource.type ) }} diff --git a/ui/admin/app/components/form/target/add-credential-sources/index.js b/ui/admin/app/components/form/target/add-brokered-credential-sources/index.js similarity index 87% rename from ui/admin/app/components/form/target/add-credential-sources/index.js rename to ui/admin/app/components/form/target/add-brokered-credential-sources/index.js index 1715401da..ce3624e79 100644 --- a/ui/admin/app/components/form/target/add-credential-sources/index.js +++ b/ui/admin/app/components/form/target/add-brokered-credential-sources/index.js @@ -2,7 +2,7 @@ import Component from '@glimmer/component'; import { action } from '@ember/object'; import { A } from '@ember/array'; -export default class FormTargetAddCredentialSourcesIndexComponent extends Component { +export default class FormTargetAddBrokeredCredentialSourcesIndexComponent extends Component { // =properties /** diff --git a/ui/admin/app/components/targets/target/actions/index.hbs b/ui/admin/app/components/targets/target/actions/index.hbs index 793b422d7..df087cfa9 100644 --- a/ui/admin/app/components/targets/target/actions/index.hbs +++ b/ui/admin/app/components/targets/target/actions/index.hbs @@ -8,9 +8,11 @@ {{t 'resources.target.actions.add-host-sources'}} {{/if}} - {{#if (can 'addCredentialSources target' @model)}} - - {{t 'resources.target.actions.add-credential-sources'}} + {{#if (can 'addBrokeredCredentialSources target' @model)}} + + {{t 'resources.target.actions.add-brokered-credential-sources'}} {{/if}} {{#if (can 'delete model' @model)}} diff --git a/ui/admin/app/components/targets/target/nav/index.hbs b/ui/admin/app/components/targets/target/nav/index.hbs index 36f07e944..118c1a556 100644 --- a/ui/admin/app/components/targets/target/nav/index.hbs +++ b/ui/admin/app/components/targets/target/nav/index.hbs @@ -5,7 +5,7 @@ {{t 'resources.target.host-source.title_plural'}} - - {{t 'resources.target.credential-source.title_plural'}} + + {{t 'resources.target.brokered-credential-source.title_plural'}} \ No newline at end of file diff --git a/ui/admin/app/controllers/scopes/scope/targets/target/add-credential-sources.js b/ui/admin/app/controllers/scopes/scope/targets/target/add-brokered-credential-sources.js similarity index 83% rename from ui/admin/app/controllers/scopes/scope/targets/target/add-credential-sources.js rename to ui/admin/app/controllers/scopes/scope/targets/target/add-brokered-credential-sources.js index 104f2be0e..067a3fce8 100644 --- a/ui/admin/app/controllers/scopes/scope/targets/target/add-credential-sources.js +++ b/ui/admin/app/controllers/scopes/scope/targets/target/add-brokered-credential-sources.js @@ -2,7 +2,7 @@ import Controller from '@ember/controller'; import { inject as service } from '@ember/service'; import { computed } from '@ember/object'; -export default class ScopesScopeTargetsTargetAddCredentialSourcesController extends Controller { +export default class ScopesScopeTargetsTargetAddBrokeredCredentialSourcesController extends Controller { // =services @service intl; @@ -13,7 +13,7 @@ export default class ScopesScopeTargetsTargetAddCredentialSourcesController exte * Checks for unassigned credential sources. * @type {boolean} */ - get hasAvailableCredentialSources() { + get hasAvailableBrokeredCredentialSources() { return this.filteredCredentialSources.length > 0; } @@ -44,6 +44,8 @@ export default class ScopesScopeTargetsTargetAddCredentialSourcesController exte * @type {string} */ get breadCrumb() { - return this.intl.t('resources.target.actions.add-credential-sources'); + return this.intl.t( + 'resources.target.actions.add-brokered-credential-sources' + ); } } diff --git a/ui/admin/app/controllers/scopes/scope/targets/target/credential-sources.js b/ui/admin/app/controllers/scopes/scope/targets/target/brokered-credential-sources.js similarity index 78% rename from ui/admin/app/controllers/scopes/scope/targets/target/credential-sources.js rename to ui/admin/app/controllers/scopes/scope/targets/target/brokered-credential-sources.js index eb9ab7720..6752a1db3 100644 --- a/ui/admin/app/controllers/scopes/scope/targets/target/credential-sources.js +++ b/ui/admin/app/controllers/scopes/scope/targets/target/brokered-credential-sources.js @@ -13,6 +13,8 @@ export default class ScopesScopeTargetsTargetCredentialSourcesController extends * @type {string} */ get breadCrumb() { - return this.intl.t('resources.target.credential-source.title_plural'); + return this.intl.t( + 'resources.target.brokered-credential-source.title_plural' + ); } } diff --git a/ui/admin/app/router.js b/ui/admin/app/router.js index 8fb944870..d58b28943 100644 --- a/ui/admin/app/router.js +++ b/ui/admin/app/router.js @@ -75,8 +75,8 @@ Router.map(function () { this.route('target', { path: ':target_id' }, function () { this.route('host-sources', function () {}); this.route('add-host-sources'); - this.route('credential-sources'); - this.route('add-credential-sources'); + this.route('brokered-credential-sources'); + this.route('add-brokered-credential-sources'); }); this.route('new'); }); diff --git a/ui/admin/app/routes/scopes/scope/targets/target/add-credential-sources.js b/ui/admin/app/routes/scopes/scope/targets/target/add-brokered-credential-sources.js similarity index 84% rename from ui/admin/app/routes/scopes/scope/targets/target/add-credential-sources.js rename to ui/admin/app/routes/scopes/scope/targets/target/add-brokered-credential-sources.js index 30484e4c6..14077c279 100644 --- a/ui/admin/app/routes/scopes/scope/targets/target/add-credential-sources.js +++ b/ui/admin/app/routes/scopes/scope/targets/target/add-brokered-credential-sources.js @@ -5,7 +5,7 @@ import { action } from '@ember/object'; import { loading } from 'ember-loading'; import { notifySuccess, notifyError } from 'core/decorators/notify'; -export default class ScopesScopeTargetsTargetAddCredentialSourcesRoute extends Route { +export default class ScopesScopeTargetsTargetAddBrokeredCredentialSourcesRoute extends Route { // =services @service intl; @@ -67,8 +67,10 @@ export default class ScopesScopeTargetsTargetAddCredentialSourcesRoute extends R @notifyError(({ message }) => message, { catch: true }) @notifySuccess('notifications.add-success') async save(target, credentialLibraryIDs) { - await target.addCredentialSources(credentialLibraryIDs); - this.router.replaceWith('scopes.scope.targets.target.credential-sources'); + await target.addBrokeredCredentialSources(credentialLibraryIDs); + this.router.replaceWith( + 'scopes.scope.targets.target.brokered-credential-sources' + ); } /** @@ -76,6 +78,8 @@ export default class ScopesScopeTargetsTargetAddCredentialSourcesRoute extends R */ @action cancel() { - this.router.replaceWith('scopes.scope.targets.target.credential-sources'); + this.router.replaceWith( + 'scopes.scope.targets.target.brokered-credential-sources' + ); } } diff --git a/ui/admin/app/routes/scopes/scope/targets/target/credential-sources.js b/ui/admin/app/routes/scopes/scope/targets/target/brokered-credential-sources.js similarity index 86% rename from ui/admin/app/routes/scopes/scope/targets/target/credential-sources.js rename to ui/admin/app/routes/scopes/scope/targets/target/brokered-credential-sources.js index deeae8e91..06fa838cf 100644 --- a/ui/admin/app/routes/scopes/scope/targets/target/credential-sources.js +++ b/ui/admin/app/routes/scopes/scope/targets/target/brokered-credential-sources.js @@ -5,7 +5,7 @@ import { loading } from 'ember-loading'; import { confirm } from 'core/decorators/confirm'; import { notifySuccess, notifyError } from 'core/decorators/notify'; -export default class ScopesScopeTargetsTargetCredentialSourcesRoute extends Route { +export default class ScopesScopeTargetsTargetBrokeredCredentialSourcesRoute extends Route { // =methods /** @@ -52,8 +52,8 @@ export default class ScopesScopeTargetsTargetCredentialSourcesRoute extends Rout @confirm('questions.remove-confirm') @notifyError(({ message }) => message, { catch: true }) @notifySuccess('notifications.remove-success') - async removeCredentialSource(target, credentialLibrary) { - await target.removeCredentialSource(credentialLibrary.id); + async removeBrokeredCredentialSource(target, credentialSource) { + await target.removeBrokeredCredentialSource(credentialSource.id); this.refresh(); } } diff --git a/ui/admin/app/templates/scopes/scope/targets/target/add-credential-sources.hbs b/ui/admin/app/templates/scopes/scope/targets/target/add-brokered-credential-sources.hbs similarity index 50% rename from ui/admin/app/templates/scopes/scope/targets/target/add-credential-sources.hbs rename to ui/admin/app/templates/scopes/scope/targets/target/add-brokered-credential-sources.hbs index 9b972259e..b9fbe8ba9 100644 --- a/ui/admin/app/templates/scopes/scope/targets/target/add-credential-sources.hbs +++ b/ui/admin/app/templates/scopes/scope/targets/target/add-brokered-credential-sources.hbs @@ -1,4 +1,4 @@ -{{page-title (t 'resources.target.actions.add-credential-sources')}} +{{page-title (t 'resources.target.actions.add-brokered-credential-sources')}} @@ -8,14 +8,16 @@

- {{t 'resources.target.credential-source.messages.add.title'}} + {{t 'resources.target.brokered-credential-source.messages.add.title'}}

-

{{t 'resources.target.credential-source.messages.add.description'}}

+

{{t + 'resources.target.brokered-credential-source.messages.add.description' + }}

- {{#if this.hasAvailableCredentialSources}} - {{/if}} - {{#unless this.hasAvailableCredentialSources}} + {{#unless this.hasAvailableBrokeredCredentialSources}} - {{t 'resources.target.credential-source.messages.none.description'}} + {{t + 'resources.target.brokered-credential-source.messages.none.description' + }} - + {{t 'actions.back'}} diff --git a/ui/admin/app/templates/scopes/scope/targets/target/credential-sources.hbs b/ui/admin/app/templates/scopes/scope/targets/target/brokered-credential-sources.hbs similarity index 67% rename from ui/admin/app/templates/scopes/scope/targets/target/credential-sources.hbs rename to ui/admin/app/templates/scopes/scope/targets/target/brokered-credential-sources.hbs index 21468a043..4368ac481 100644 --- a/ui/admin/app/templates/scopes/scope/targets/target/credential-sources.hbs +++ b/ui/admin/app/templates/scopes/scope/targets/target/brokered-credential-sources.hbs @@ -1,4 +1,4 @@ -{{page-title (t 'resources.target.credential-source.title_plural')}} +{{page-title (t 'resources.target.brokered-credential-source.title_plural')}} @@ -19,7 +19,7 @@ - {{#if @model.credentialSources}} + {{#if @model.brokeredCredentialSources}} @@ -31,52 +31,55 @@ - {{#each @model.credentialSources as |credentialSource|}} + {{#each + @model.brokeredCredentialSources + as |brokeredCredentialSource| + }} - {{#if (eq credentialSource.type 'username_password')}} + {{#if (eq brokeredCredentialSource.type 'username_password')}} - {{credentialSource.displayName}} + {{brokeredCredentialSource.displayName}} {{else}} - {{credentialSource.displayName}} + {{brokeredCredentialSource.displayName}} {{/if}} -

{{credentialSource.description}}

+

{{brokeredCredentialSource.description}}

{{t (concat - 'resources.target.credential-source.types.' - credentialSource.type + 'resources.target.brokered-credential-source.types.' + brokeredCredentialSource.type ) }} - {{credentialSource.id}} + {{brokeredCredentialSource.id}} - {{#if (can 'removeCredentialSources target' @model)}} + {{#if (can 'removeBrokeredCredentialSources target' @model)}} @@ -109,20 +114,20 @@ {{t - 'resources.target.credential-source.messages.welcome.description' + 'resources.target.brokered-credential-source.messages.welcome.description' }} - {{t 'resources.target.actions.add-credential-sources'}} + {{t 'resources.target.actions.add-brokered-credential-sources'}} diff --git a/ui/admin/tests/acceptance/targets/credential-sources-test.js b/ui/admin/tests/acceptance/targets/credential-sources-test.js index 1105e9607..6dc1c74a6 100644 --- a/ui/admin/tests/acceptance/targets/credential-sources-test.js +++ b/ui/admin/tests/acceptance/targets/credential-sources-test.js @@ -40,7 +40,7 @@ module('Acceptance | targets | credential sources', function (hooks) { target: null, credentialLibraries: null, credentialLibrary: null, - addCredentialSources: null, + addBrokeredCredentialSources: null, }; hooks.beforeEach(function () { @@ -86,10 +86,10 @@ module('Acceptance | targets | credential sources', function (hooks) { urls.projectScope = `/scopes/${instances.scopes.project.id}`; urls.targets = `${urls.projectScope}/targets`; urls.target = `${urls.targets}/${instances.target.id}`; - urls.credentialSources = `${urls.target}/credential-sources`; + urls.credentialSources = `${urls.target}/brokered-credential-sources`; urls.credentialLibrary = `${urls.projectScope}/credential-stores/${instances.credentialLibrary.credentialStoreId}/credential-libraries/${instances.credentialLibrary.id}`; urls.credential = `${urls.projectScope}/credential-stores/${instances.credential.credentialStoreId}/credentials/${instances.credential.id}`; - urls.addCredentialSources = `${urls.target}/add-credential-sources`; + urls.addBrokeredCredentialSources = `${urls.target}/add-brokered-credential-sources`; // Generate resource counter getCredentialLibraryCount = () => this.server.schema.credentialLibraries.all().models.length; @@ -129,15 +129,15 @@ module('Acceptance | targets | credential sources', function (hooks) { test('visiting add credential sources', async function (assert) { assert.expect(1); - await visit(urls.addCredentialSources); + await visit(urls.addBrokeredCredentialSources); await a11yAudit(); - assert.strictEqual(currentURL(), urls.addCredentialSources); + assert.strictEqual(currentURL(), urls.addBrokeredCredentialSources); }); test('displays list of all credential source types available', async function (assert) { assert.expect(2); instances.target.update({ credentialLibraries: [] }); - await visit(urls.addCredentialSources); + await visit(urls.addBrokeredCredentialSources); assert.strictEqual(findAll('tbody tr').length, credentialSourceCount); assert.notOk(find('.rose-message-title')); }); @@ -146,14 +146,14 @@ module('Acceptance | targets | credential sources', function (hooks) { assert.expect(2); instances.target.update({ credentialLibraries: [] }); this.server.db.credentials.remove(); - await visit(urls.addCredentialSources); + await visit(urls.addBrokeredCredentialSources); assert.strictEqual(findAll('tbody tr').length, getCredentialLibraryCount()); assert.notOk(find('.rose-message-title')); }); test('displays list of credential sources with only credentials available', async function (assert) { assert.expect(2); - await visit(urls.addCredentialSources); + await visit(urls.addBrokeredCredentialSources); assert.strictEqual(findAll('tbody tr').length, getCredentialCount()); assert.notOk(find('.rose-message-title')); }); @@ -163,10 +163,10 @@ module('Acceptance | targets | credential sources', function (hooks) { instances.target.update({ credentialLibraries: [] }); this.server.db.credentialLibraries.remove(); this.server.db.credentials.remove(); - await visit(urls.addCredentialSources); + await visit(urls.addBrokeredCredentialSources); assert.strictEqual( find('.rose-message-title').textContent.trim(), - 'No Credential Sources Available' + 'No Brokered Credential Sources Available' ); }); @@ -175,7 +175,7 @@ module('Acceptance | targets | credential sources', function (hooks) { instances.target.update({ credentialLibraries: [] }); this.server.db.credentialLibraries.remove(); this.server.db.credentials.remove(); - await visit(urls.addCredentialSources); + await visit(urls.addBrokeredCredentialSources); await click(find('.rose-message-link')); assert.strictEqual(currentURL(), urls.credentialSources); }); @@ -185,7 +185,7 @@ module('Acceptance | targets | credential sources', function (hooks) { instances.target.update({ credentialLibraries: [] }); await visit(urls.credentialSources); assert.strictEqual(findAll('tbody tr').length, 0); - await visit(urls.addCredentialSources); + await visit(urls.addBrokeredCredentialSources); assert.strictEqual(findAll('tbody tr').length, credentialSourceCount); await click('tbody tr:first-child label'); await click('form [type="submit"]'); @@ -198,7 +198,7 @@ module('Acceptance | targets | credential sources', function (hooks) { instances.target.update({ credentialLibraries: [] }); await visit(urls.credentialSources); assert.strictEqual(findAll('tbody tr').length, 0); - await visit(urls.addCredentialSources); + await visit(urls.addBrokeredCredentialSources); assert.strictEqual(findAll('tbody tr').length, credentialSourceCount); await click('tbody tr:last-child label'); await click('form [type="submit"]'); @@ -211,7 +211,7 @@ module('Acceptance | targets | credential sources', function (hooks) { instances.target.update({ credentialLibraries: [] }); await visit(urls.credentialSources); assert.strictEqual(findAll('tbody tr').length, 0); - await visit(urls.addCredentialSources); + await visit(urls.addBrokeredCredentialSources); assert.strictEqual(findAll('tbody tr').length, credentialSourceCount); await click('tbody tr:last-child label'); await click('tbody tr:first-child label'); @@ -227,7 +227,7 @@ module('Acceptance | targets | credential sources', function (hooks) { (item) => item !== 'add-credential-sources' ); await visit(urls.credentialSources); - assert.notOk(find(`[href="${urls.addCredentialSources}"]`)); + assert.notOk(find(`[href="${urls.addBrokeredCredentialSources}"]`)); }); test('can select and cancel credential sources to add', async function (assert) { @@ -235,7 +235,7 @@ module('Acceptance | targets | credential sources', function (hooks) { instances.target.update({ credentialLibraries: [] }); await visit(urls.credentialSources); assert.strictEqual(findAll('tbody tr').length, 0); - await visit(urls.addCredentialSources); + await visit(urls.addBrokeredCredentialSources); assert.strictEqual(findAll('tbody tr').length, credentialSourceCount); await click('tbody label'); await click('form [type="button"]'); @@ -248,7 +248,7 @@ module('Acceptance | targets | credential sources', function (hooks) { instances.target.update({ credentialLibraries: [] }); await visit(urls.credentialSources); assert.strictEqual(findAll('tbody tr').length, 0); - await visit(urls.addCredentialSources); + await visit(urls.addBrokeredCredentialSources); assert.strictEqual(findAll('tbody tr').length, credentialSourceCount); await click('tbody tr:last-child label'); await click('tbody tr:first-child label'); @@ -272,7 +272,7 @@ module('Acceptance | targets | credential sources', function (hooks) { ); }); instances.target.update({ credentialLibraries: [] }); - await visit(urls.addCredentialSources); + await visit(urls.addBrokeredCredentialSources); await click('tbody tr:last-child label'); await click('tbody tr:first-child label'); await click('form [type="submit"]'); @@ -287,7 +287,7 @@ module('Acceptance | targets | credential sources', function (hooks) { assert.strictEqual(findAll('tbody tr').length, credentialLibraryCount); await click('tbody tr .rose-dropdown-button-danger'); assert.strictEqual(findAll('tbody tr').length, credentialLibraryCount - 1); - await visit(urls.addCredentialSources); + await visit(urls.addBrokeredCredentialSources); assert.strictEqual(findAll('tbody tr').length, credentialCount + 1); }); @@ -303,7 +303,7 @@ module('Acceptance | targets | credential sources', function (hooks) { assert.strictEqual(findAll('tbody tr').length, credentialCount); await click('tbody tr .rose-dropdown-button-danger'); assert.strictEqual(findAll('tbody tr').length, credentialCount - 1); - await visit(urls.addCredentialSources); + await visit(urls.addBrokeredCredentialSources); assert.strictEqual(findAll('tbody tr').length, credentialLibraryCount + 1); }); diff --git a/ui/admin/tests/unit/controllers/scopes/scope/targets/target/credential-sources-test.js b/ui/admin/tests/unit/controllers/scopes/scope/targets/target/credential-sources-test.js index e96f06784..006861ed9 100644 --- a/ui/admin/tests/unit/controllers/scopes/scope/targets/target/credential-sources-test.js +++ b/ui/admin/tests/unit/controllers/scopes/scope/targets/target/credential-sources-test.js @@ -2,14 +2,14 @@ import { module, test } from 'qunit'; import { setupTest } from 'ember-qunit'; module( - 'Unit | Controller | scopes/scope/targets/target/credential-sources', + 'Unit | Controller | scopes/scope/targets/target/brokered-credential-sources', function (hooks) { setupTest(hooks); // TODO: Replace this with your real tests. test('it exists', function (assert) { let controller = this.owner.lookup( - 'controller:scopes/scope/targets/target/credential-sources' + 'controller:scopes/scope/targets/target/brokered-credential-sources' ); assert.ok(controller); }); diff --git a/ui/admin/tests/unit/routes/scopes/scope/targets/target/add-credential-sources-test.js b/ui/admin/tests/unit/routes/scopes/scope/targets/target/add-credential-sources-test.js index 90afd3ac1..cfcba6c0e 100644 --- a/ui/admin/tests/unit/routes/scopes/scope/targets/target/add-credential-sources-test.js +++ b/ui/admin/tests/unit/routes/scopes/scope/targets/target/add-credential-sources-test.js @@ -2,13 +2,13 @@ import { module, test } from 'qunit'; import { setupTest } from 'ember-qunit'; module( - 'Unit | Route | scopes/scope/targets/target/add-credential-sources', + 'Unit | Route | scopes/scope/targets/target/add-brokered-credential-sources', function (hooks) { setupTest(hooks); test('it exists', function (assert) { let route = this.owner.lookup( - 'route:scopes/scope/targets/target/add-credential-sources' + 'route:scopes/scope/targets/target/add-brokered-credential-sources' ); assert.ok(route); }); diff --git a/ui/admin/tests/unit/routes/scopes/scope/targets/target/credential-sources-test.js b/ui/admin/tests/unit/routes/scopes/scope/targets/target/credential-sources-test.js index 76a6808de..989e42842 100644 --- a/ui/admin/tests/unit/routes/scopes/scope/targets/target/credential-sources-test.js +++ b/ui/admin/tests/unit/routes/scopes/scope/targets/target/credential-sources-test.js @@ -2,13 +2,13 @@ import { module, test } from 'qunit'; import { setupTest } from 'ember-qunit'; module( - 'Unit | Route | scopes/scope/targets/target/credential-sources', + 'Unit | Route | scopes/scope/targets/target/brokered-credential-sources', function (hooks) { setupTest(hooks); test('it exists', function (assert) { let route = this.owner.lookup( - 'route:scopes/scope/targets/target/credential-sources' + 'route:scopes/scope/targets/target/brokered-credential-sources' ); assert.ok(route); });