chore: 🤖 rename ember resources to *-sources
This commit is contained in:
30 files changed
+95
-103
No files matched your search
@@ -23,7 +23,6 @@ choose-org: Choose Scope
|
||||
choose-different-org: Choose a different scope
|
||||
add-host-set: Create Host Set
|
||||
add-host: Create Host
|
||||
add-host-sets: Add Host Sets
|
||||
add-principals: Add Principals
|
||||
add-members: Add Members
|
||||
add-hosts: Add Hosts
|
||||
|
||||
@@ -253,8 +253,8 @@ target:
|
||||
actions:
|
||||
create: New Target
|
||||
delete: Delete Target
|
||||
add-host-sets: Add Host Sources
|
||||
add-credential-libraries: Add Credential Sources
|
||||
add-host-sources: Add Host Sources
|
||||
add-credential-sources: Add Credential Sources
|
||||
types:
|
||||
tcp: TCP
|
||||
host-source:
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
as |form|
|
||||
>
|
||||
<form.actions
|
||||
@submitText={{t 'resources.target.actions.add-credential-libraries'}}
|
||||
@submitText={{t 'resources.target.actions.add-credential-sources'}}
|
||||
@cancelText={{t 'actions.cancel'}}
|
||||
/>
|
||||
|
||||
@@ -54,7 +54,7 @@
|
||||
<message.description>
|
||||
{{t 'resources.target.credential-source.messages.none.description'}}
|
||||
</message.description>
|
||||
<message.link @route='scopes.scope.targets.target.credential-libraries'>
|
||||
<message.link @route='scopes.scope.targets.target.credential-sources'>
|
||||
<Rose::Icon @name='flight-icons/svg/chevron-left-16' />
|
||||
{{t 'actions.back'}}
|
||||
</message.link>
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
>
|
||||
|
||||
<form.actions
|
||||
@submitText={{t 'resources.target.actions.add-host-sets'}}
|
||||
@submitText={{t 'resources.target.actions.add-host-sources'}}
|
||||
@cancelText={{t 'actions.cancel'}}
|
||||
/>
|
||||
|
||||
@@ -58,7 +58,7 @@
|
||||
<message.description>
|
||||
{{t 'resources.target.host-source.messages.none.description'}}
|
||||
</message.description>
|
||||
<message.link @route='scopes.scope.targets.target.host-sets'>
|
||||
<message.link @route='scopes.scope.targets.target.host-sources'>
|
||||
<Rose::Icon @name='flight-icons/svg/chevron-left-16' />
|
||||
{{t 'actions.back'}}
|
||||
</message.link>
|
||||
|
||||
+2
-2
@@ -1,7 +1,7 @@
|
||||
import Controller from '@ember/controller';
|
||||
import { inject as service } from '@ember/service';
|
||||
|
||||
export default class ScopesScopeTargetsTargetAddHostSetsController extends Controller {
|
||||
export default class ScopesScopeTargetsTargetAddHostSourcesController extends Controller {
|
||||
// =services
|
||||
|
||||
@service intl;
|
||||
@@ -13,6 +13,6 @@ export default class ScopesScopeTargetsTargetAddHostSetsController extends Contr
|
||||
* @type {string}
|
||||
*/
|
||||
get breadCrumb() {
|
||||
return this.intl.t('resources.target.actions.add-host-sets');
|
||||
return this.intl.t('resources.target.actions.add-host-sources');
|
||||
}
|
||||
}
|
||||
+2
-2
@@ -1,7 +1,7 @@
|
||||
import Controller from '@ember/controller';
|
||||
import { inject as service } from '@ember/service';
|
||||
|
||||
export default class ScopesScopeTargetsTargetCredentialLibrariesController extends Controller {
|
||||
export default class ScopesScopeTargetsTargetCredentialSourcesController extends Controller {
|
||||
// =services
|
||||
|
||||
@service intl;
|
||||
@@ -13,6 +13,6 @@ export default class ScopesScopeTargetsTargetCredentialLibrariesController exten
|
||||
* @type {string}
|
||||
*/
|
||||
get breadCrumb() {
|
||||
return this.intl.t('resources.credential-library.title_plural');
|
||||
return this.intl.t('resources.target.credential-source.title_plural');
|
||||
}
|
||||
}
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
import Controller from '@ember/controller';
|
||||
import { inject as service } from '@ember/service';
|
||||
|
||||
export default class ScopesScopeTargetsTargetHostSetsController extends Controller {
|
||||
export default class ScopesScopeTargetsTargetHostSourcesController extends Controller {
|
||||
// =services
|
||||
|
||||
@service intl;
|
||||
@@ -63,10 +63,10 @@ Router.map(function () {
|
||||
|
||||
this.route('targets', function () {
|
||||
this.route('target', { path: ':target_id' }, function () {
|
||||
this.route('host-sets', function () {});
|
||||
this.route('add-host-sets');
|
||||
this.route('credential-libraries');
|
||||
this.route('add-credential-libraries');
|
||||
this.route('host-sources', function () {});
|
||||
this.route('add-host-sources');
|
||||
this.route('credential-sources');
|
||||
this.route('add-credential-sources');
|
||||
});
|
||||
this.route('new');
|
||||
});
|
||||
|
||||
+7
-10
@@ -5,7 +5,7 @@ import { action } from '@ember/object';
|
||||
import loading from 'ember-loading/decorator';
|
||||
import { notifySuccess, notifyError } from 'core/decorators/notify';
|
||||
|
||||
export default class ScopesScopeTargetsTargetAddCredentialLibrariesRoute extends Route {
|
||||
export default class ScopesScopeTargetsTargetAddCredentialSourcesRoute extends Route {
|
||||
// =services
|
||||
|
||||
@service intl;
|
||||
@@ -49,13 +49,10 @@ export default class ScopesScopeTargetsTargetAddCredentialLibrariesRoute extends
|
||||
renderTemplate() {
|
||||
super.renderTemplate(...arguments);
|
||||
|
||||
this.render(
|
||||
'scopes/scope/targets/target/add-credential-libraries/-header',
|
||||
{
|
||||
into: 'scopes/scope/targets/target',
|
||||
outlet: 'header',
|
||||
}
|
||||
);
|
||||
this.render('scopes/scope/targets/target/add-credential-sources/-header', {
|
||||
into: 'scopes/scope/targets/target',
|
||||
outlet: 'header',
|
||||
});
|
||||
|
||||
this.render('-empty', {
|
||||
into: 'scopes/scope/targets/target',
|
||||
@@ -81,7 +78,7 @@ export default class ScopesScopeTargetsTargetAddCredentialLibrariesRoute extends
|
||||
@notifySuccess('notifications.add-success')
|
||||
async save(target, credentialLibraryIDs) {
|
||||
await target.addCredentialLibraries(credentialLibraryIDs);
|
||||
this.replaceWith('scopes.scope.targets.target.credential-libraries');
|
||||
this.replaceWith('scopes.scope.targets.target.credential-sources');
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -89,6 +86,6 @@ export default class ScopesScopeTargetsTargetAddCredentialLibrariesRoute extends
|
||||
*/
|
||||
@action
|
||||
cancel() {
|
||||
this.replaceWith('scopes.scope.targets.target.credential-libraries');
|
||||
this.replaceWith('scopes.scope.targets.target.credential-sources');
|
||||
}
|
||||
}
|
||||
+4
-4
@@ -5,7 +5,7 @@ import { all } from 'rsvp';
|
||||
import loading from 'ember-loading/decorator';
|
||||
import { notifySuccess, notifyError } from 'core/decorators/notify';
|
||||
|
||||
export default class ScopesScopeTargetsTargetAddHostSetsRoute extends Route {
|
||||
export default class ScopesScopeTargetsTargetAddHostSourcesRoute extends Route {
|
||||
// =services
|
||||
|
||||
@service intl;
|
||||
@@ -48,7 +48,7 @@ export default class ScopesScopeTargetsTargetAddHostSetsRoute extends Route {
|
||||
renderTemplate() {
|
||||
super.renderTemplate(...arguments);
|
||||
|
||||
this.render('scopes/scope/targets/target/add-host-sets/-header', {
|
||||
this.render('scopes/scope/targets/target/add-host-sources/-header', {
|
||||
into: 'scopes/scope/targets/target',
|
||||
outlet: 'header',
|
||||
});
|
||||
@@ -72,7 +72,7 @@ export default class ScopesScopeTargetsTargetAddHostSetsRoute extends Route {
|
||||
@notifySuccess('notifications.add-success')
|
||||
async save(target, hostSetIDs) {
|
||||
await target.addHostSets(hostSetIDs);
|
||||
this.replaceWith('scopes.scope.targets.target.host-sets');
|
||||
this.replaceWith('scopes.scope.targets.target.host-sources');
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -80,6 +80,6 @@ export default class ScopesScopeTargetsTargetAddHostSetsRoute extends Route {
|
||||
*/
|
||||
@action
|
||||
cancel() {
|
||||
this.replaceWith('scopes.scope.targets.target.host-sets');
|
||||
this.replaceWith('scopes.scope.targets.target.host-sources');
|
||||
}
|
||||
}
|
||||
+1
-1
@@ -5,7 +5,7 @@ import loading from 'ember-loading/decorator';
|
||||
import { confirm } from 'core/decorators/confirm';
|
||||
import { notifySuccess, notifyError } from 'core/decorators/notify';
|
||||
|
||||
export default class ScopesScopeTargetsTargetCredentialLibrariesRoute extends Route {
|
||||
export default class ScopesScopeTargetsTargetCredentialSourcesRoute extends Route {
|
||||
// =methods
|
||||
|
||||
/**
|
||||
+1
-1
@@ -6,7 +6,7 @@ import loading from 'ember-loading/decorator';
|
||||
import { confirm } from 'core/decorators/confirm';
|
||||
import { notifySuccess, notifyError } from 'core/decorators/notify';
|
||||
|
||||
export default class ScopesScopeTargetsTargetHostSetsRoute extends Route {
|
||||
export default class ScopesScopeTargetsTargetHostSourcesRoute extends Route {
|
||||
// =services
|
||||
|
||||
@service intl;
|
||||
@@ -3,14 +3,12 @@
|
||||
@dropdownRight={{true}}
|
||||
as |dropdown|
|
||||
>
|
||||
<dropdown.link @route='scopes.scope.targets.target.add-host-sets'>
|
||||
{{t 'resources.target.actions.add-host-sets'}}
|
||||
<dropdown.link @route='scopes.scope.targets.target.add-host-sources'>
|
||||
{{t 'resources.target.actions.add-host-sources'}}
|
||||
</dropdown.link>
|
||||
{{#if (feature-flag 'credential-store')}}
|
||||
<dropdown.link
|
||||
@route='scopes.scope.targets.target.add-credential-libraries'
|
||||
>
|
||||
{{t 'resources.target.actions.add-credential-libraries'}}
|
||||
<dropdown.link @route='scopes.scope.targets.target.add-credential-sources'>
|
||||
{{t 'resources.target.actions.add-credential-sources'}}
|
||||
</dropdown.link>
|
||||
{{/if}}
|
||||
{{#if (can 'delete model' @model)}}
|
||||
|
||||
@@ -2,11 +2,11 @@
|
||||
<nav.link @route='scopes.scope.targets.target.index'>
|
||||
{{t 'titles.details'}}
|
||||
</nav.link>
|
||||
<nav.link @route='scopes.scope.targets.target.host-sets'>
|
||||
<nav.link @route='scopes.scope.targets.target.host-sources'>
|
||||
{{t 'resources.target.host-source.title_plural'}}
|
||||
</nav.link>
|
||||
{{#if (feature-flag 'credential-store')}}
|
||||
<nav.link @route='scopes.scope.targets.target.credential-libraries'>
|
||||
<nav.link @route='scopes.scope.targets.target.credential-sources'>
|
||||
{{t 'resources.target.credential-source.title_plural'}}
|
||||
</nav.link>
|
||||
{{/if}}
|
||||
|
||||
+2
-2
@@ -1,4 +1,4 @@
|
||||
{{page-title (t 'resources.target.actions.add-credential-libraries')}}
|
||||
{{page-title (t 'resources.target.actions.add-credential-sources')}}
|
||||
|
||||
{{#if @model.credentialLibraries}}
|
||||
<Form::Target::AddCredentialLibraries
|
||||
@@ -18,7 +18,7 @@
|
||||
<message.description>
|
||||
{{t 'resources.target.credential-source.messages.none.description'}}
|
||||
</message.description>
|
||||
<message.link @route='scopes.scope.targets.target.credential-libraries'>
|
||||
<message.link @route='scopes.scope.targets.target.credential-sources'>
|
||||
<Rose::Icon @name='flight-icons/svg/chevron-left-16' />
|
||||
{{t 'actions.back'}}
|
||||
</message.link>
|
||||
File renamed without changes.
+2
-2
@@ -1,4 +1,4 @@
|
||||
{{page-title (t 'resources.target.actions.add-host-sets')}}
|
||||
{{page-title (t 'resources.target.actions.add-host-sources')}}
|
||||
|
||||
{{#if @model.hostSets}}
|
||||
<Form::Target::AddHostSets
|
||||
@@ -19,7 +19,7 @@
|
||||
<message.description>
|
||||
{{t 'resources.target.host-source.messages.none.description'}}
|
||||
</message.description>
|
||||
<message.link @route='scopes.scope.targets.target.host-sets'>
|
||||
<message.link @route='scopes.scope.targets.target.host-sources'>
|
||||
<Rose::Icon @name='flight-icons/svg/chevron-left-16' />
|
||||
{{t 'actions.back'}}
|
||||
</message.link>
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
<h2>
|
||||
{{t 'resources.target.host-source.messages.add.title'}}
|
||||
<DocLink @doc='target.add-host-sets' @iconSize='large' />
|
||||
<DocLink @doc='target.add-host-sources' @iconSize='large' />
|
||||
</h2>
|
||||
<p>{{t 'resources.target.host-source.messages.add.description'}}</p>
|
||||
+2
-4
@@ -79,11 +79,9 @@
|
||||
<message.description>
|
||||
{{t 'resources.target.credential-source.messages.welcome.description'}}
|
||||
</message.description>
|
||||
<message.link
|
||||
@route='scopes.scope.targets.target.add-credential-libraries'
|
||||
>
|
||||
<message.link @route='scopes.scope.targets.target.add-credential-sources'>
|
||||
<Rose::Icon @name='flight-icons/svg/plus-circle-16' />
|
||||
{{t 'resources.target.actions.add-credential-libraries'}}
|
||||
{{t 'resources.target.actions.add-credential-sources'}}
|
||||
</message.link>
|
||||
</Rose::Message>
|
||||
</Rose::Layout::Centered>
|
||||
+2
-2
@@ -67,9 +67,9 @@
|
||||
<message.description>
|
||||
{{t 'resources.target.host-source.messages.welcome.description'}}
|
||||
</message.description>
|
||||
<message.link @route='scopes.scope.targets.target.add-host-sets'>
|
||||
<message.link @route='scopes.scope.targets.target.add-host-sources'>
|
||||
<Rose::Icon @name='flight-icons/svg/plus-circle-16' />
|
||||
{{t 'resources.target.actions.add-host-sets'}}
|
||||
{{t 'resources.target.actions.add-host-sources'}}
|
||||
</message.link>
|
||||
</Rose::Message>
|
||||
</Rose::Layout::Centered>
|
||||
@@ -64,7 +64,7 @@ module.exports = function (environment) {
|
||||
session: '/sessions',
|
||||
target: '/targets',
|
||||
'target.new': '/targets/new',
|
||||
'target.add-host-sets': '/targets/add-host-sets',
|
||||
'target.add-host-sources': '/targets/add-host-sets',
|
||||
user: '/users',
|
||||
},
|
||||
},
|
||||
|
||||
+21
-21
@@ -72,65 +72,65 @@ module('Acceptance | targets | credential-libraries', function (hooks) {
|
||||
urls.projectScope = `/scopes/${instances.scopes.project.id}`;
|
||||
urls.targets = `${urls.projectScope}/targets`;
|
||||
urls.target = `${urls.targets}/${instances.target.id}`;
|
||||
urls.credentialLibraries = `${urls.target}/credential-libraries`;
|
||||
urls.credentialSources = `${urls.target}/credential-sources`;
|
||||
urls.credentialLibrary = `${urls.projectScope}/credential-stores/${instances.credentialLibrary.credentialStoreId}/credential-libraries/${instances.credentialLibrary.id}`;
|
||||
urls.addCredentialLibraries = `${urls.target}/add-credential-libraries`;
|
||||
urls.addCredentialSources = `${urls.target}/add-credential-sources`;
|
||||
// Generate resource counter
|
||||
getCredentialLibraryCount = () =>
|
||||
this.server.schema.credentialLibraries.all().models.length;
|
||||
authenticateSession({});
|
||||
});
|
||||
|
||||
test('visiting target credential libraries', async function (assert) {
|
||||
test('visiting target credential sources', async function (assert) {
|
||||
assert.expect(2);
|
||||
await visit(urls.credentialLibraries);
|
||||
await visit(urls.credentialSources);
|
||||
await a11yAudit();
|
||||
assert.equal(currentURL(), urls.credentialLibraries);
|
||||
assert.equal(currentURL(), urls.credentialSources);
|
||||
assert.equal(findAll('tbody tr').length, getCredentialLibraryCount());
|
||||
});
|
||||
|
||||
test('can navigate to a credential library', async function (assert) {
|
||||
assert.expect(1);
|
||||
await visit(urls.credentialLibraries);
|
||||
await visit(urls.credentialSources);
|
||||
await click('main tbody .rose-table-header-cell:nth-child(1) a');
|
||||
await a11yAudit();
|
||||
assert.equal(currentURL(), urls.credentialLibrary);
|
||||
});
|
||||
|
||||
test('visiting add credential libraries', async function (assert) {
|
||||
test('visiting add credential sources', async function (assert) {
|
||||
assert.expect(1);
|
||||
await visit(urls.addCredentialLibraries);
|
||||
await visit(urls.addCredentialSources);
|
||||
await a11yAudit();
|
||||
assert.equal(currentURL(), urls.addCredentialLibraries);
|
||||
assert.equal(currentURL(), urls.addCredentialSources);
|
||||
});
|
||||
|
||||
test('can select and save credential libraries to add', async function (assert) {
|
||||
test('can select and save credential sources to add', async function (assert) {
|
||||
assert.expect(4);
|
||||
instances.target.update({ credentialLibraries: [] });
|
||||
await visit(urls.credentialLibraries);
|
||||
await visit(urls.credentialSources);
|
||||
assert.equal(findAll('tbody tr').length, 0);
|
||||
await visit(urls.addCredentialLibraries);
|
||||
await visit(urls.addCredentialSources);
|
||||
assert.equal(findAll('tbody tr').length, getCredentialLibraryCount());
|
||||
await click('tbody label');
|
||||
await click('form [type="submit"]');
|
||||
assert.equal(currentURL(), urls.credentialLibraries);
|
||||
assert.equal(currentURL(), urls.credentialSources);
|
||||
assert.equal(findAll('tbody tr').length, 1);
|
||||
});
|
||||
|
||||
test('can select and cancel credential libraries to add', async function (assert) {
|
||||
test('can select and cancel credential sources to add', async function (assert) {
|
||||
assert.expect(4);
|
||||
instances.target.update({ credentialLibraries: [] });
|
||||
await visit(urls.credentialLibraries);
|
||||
await visit(urls.credentialSources);
|
||||
assert.equal(findAll('tbody tr').length, 0);
|
||||
await visit(urls.addCredentialLibraries);
|
||||
await visit(urls.addCredentialSources);
|
||||
assert.equal(findAll('tbody tr').length, getCredentialLibraryCount());
|
||||
await click('tbody label');
|
||||
await click('form [type="button"]');
|
||||
assert.equal(currentURL(), urls.credentialLibraries);
|
||||
assert.equal(currentURL(), urls.credentialSources);
|
||||
assert.equal(findAll('tbody tr').length, 0);
|
||||
});
|
||||
|
||||
test('adding credential libraries which errors displays error message', async function (assert) {
|
||||
test('adding credential sources which errors displays error message', async function (assert) {
|
||||
assert.expect(1);
|
||||
this.server.post('/targets/:idMethod', () => {
|
||||
return new Response(
|
||||
@@ -145,7 +145,7 @@ module('Acceptance | targets | credential-libraries', function (hooks) {
|
||||
);
|
||||
});
|
||||
instances.target.update({ credentialLibraries: [] });
|
||||
await visit(urls.addCredentialLibraries);
|
||||
await visit(urls.addCredentialSources);
|
||||
await click('tbody label');
|
||||
await click('form [type="submit"]');
|
||||
assert.ok(find('[role="alert"]'));
|
||||
@@ -154,7 +154,7 @@ module('Acceptance | targets | credential-libraries', function (hooks) {
|
||||
test('can remove a credential library', async function (assert) {
|
||||
assert.expect(2);
|
||||
const count = getCredentialLibraryCount();
|
||||
await visit(urls.credentialLibraries);
|
||||
await visit(urls.credentialSources);
|
||||
assert.equal(findAll('tbody tr').length, count);
|
||||
await click('tbody tr .rose-dropdown-button-danger');
|
||||
assert.equal(findAll('tbody tr').length, count - 1);
|
||||
@@ -175,7 +175,7 @@ module('Acceptance | targets | credential-libraries', function (hooks) {
|
||||
);
|
||||
});
|
||||
const count = getCredentialLibraryCount();
|
||||
await visit(urls.credentialLibraries);
|
||||
await visit(urls.credentialSources);
|
||||
assert.equal(findAll('tbody tr').length, count);
|
||||
await click('tbody tr .rose-dropdown-button-danger');
|
||||
assert.ok(find('[role="alert"]'));
|
||||
+16
-16
@@ -11,7 +11,7 @@ import {
|
||||
//invalidateSession,
|
||||
} from 'ember-simple-auth/test-support';
|
||||
|
||||
module('Acceptance | targets | host-sets', function (hooks) {
|
||||
module('Acceptance | targets | host-sources', function (hooks) {
|
||||
setupApplicationTest(hooks);
|
||||
setupMirage(hooks);
|
||||
|
||||
@@ -60,17 +60,17 @@ module('Acceptance | targets | host-sets', function (hooks) {
|
||||
urls.projectScope = `/scopes/${instances.scopes.project.id}`;
|
||||
urls.targets = `/scopes/${instances.scopes.project.id}/targets`;
|
||||
urls.target = `${urls.targets}/${instances.target.id}`;
|
||||
urls.targetHostSets = `${urls.target}/host-sets`;
|
||||
urls.targetAddHostSets = `${urls.target}/add-host-sets`;
|
||||
urls.targetHostSources = `${urls.target}/host-sources`;
|
||||
urls.targetAddHostSources = `${urls.target}/add-host-sources`;
|
||||
authenticateSession({});
|
||||
});
|
||||
|
||||
test('visiting target host sets', async function (assert) {
|
||||
assert.expect(3);
|
||||
const targetHostSetCount = instances.target.hostSets.length;
|
||||
await visit(urls.targetHostSets);
|
||||
await visit(urls.targetHostSources);
|
||||
await a11yAudit();
|
||||
assert.equal(currentURL(), urls.targetHostSets);
|
||||
assert.equal(currentURL(), urls.targetHostSources);
|
||||
assert.ok(targetHostSetCount);
|
||||
assert.equal(findAll('tbody tr').length, targetHostSetCount);
|
||||
});
|
||||
@@ -78,7 +78,7 @@ module('Acceptance | targets | host-sets', function (hooks) {
|
||||
test('can remove a host sets', async function (assert) {
|
||||
assert.expect(2);
|
||||
const targetHostSetCount = instances.target.hostSets.length;
|
||||
await visit(urls.targetHostSets);
|
||||
await visit(urls.targetHostSources);
|
||||
assert.equal(findAll('tbody tr').length, targetHostSetCount);
|
||||
await click('tbody tr .rose-dropdown-button-danger');
|
||||
assert.equal(findAll('tbody tr').length, targetHostSetCount - 1);
|
||||
@@ -99,7 +99,7 @@ module('Acceptance | targets | host-sets', function (hooks) {
|
||||
);
|
||||
});
|
||||
const targetHostSetCount = instances.target.hostSets.length;
|
||||
await visit(urls.targetHostSets);
|
||||
await visit(urls.targetHostSources);
|
||||
assert.equal(findAll('tbody tr').length, targetHostSetCount);
|
||||
await click('tbody tr .rose-dropdown-button-danger');
|
||||
assert.ok(find('[role="alert"]'));
|
||||
@@ -108,32 +108,32 @@ module('Acceptance | targets | host-sets', function (hooks) {
|
||||
test('select and save host sets to add', async function (assert) {
|
||||
assert.expect(3);
|
||||
instances.target.update({ hostSetIds: [] });
|
||||
await visit(urls.targetHostSets);
|
||||
await visit(urls.targetHostSources);
|
||||
assert.equal(findAll('tbody tr').length, 0);
|
||||
await click('.rose-layout-page-actions a');
|
||||
assert.equal(currentURL(), urls.targetAddHostSets);
|
||||
assert.equal(currentURL(), urls.targetAddHostSources);
|
||||
// Click three times to select, unselect, then reselect (for coverage)
|
||||
await click('tbody label');
|
||||
await click('tbody label');
|
||||
await click('tbody label');
|
||||
await click('form [type="submit"]');
|
||||
await visit(urls.targetHostSets);
|
||||
await visit(urls.targetHostSources);
|
||||
assert.equal(findAll('tbody tr').length, 1);
|
||||
});
|
||||
|
||||
test('select and cancel host sets to add', async function (assert) {
|
||||
assert.expect(4);
|
||||
const targetHostSetCount = instances.target.hostSets.length;
|
||||
await visit(urls.targetHostSets);
|
||||
await visit(urls.targetHostSources);
|
||||
assert.equal(findAll('tbody tr').length, targetHostSetCount);
|
||||
// first, remove a target host set (otherwise none would be available to add)
|
||||
await click('tbody tr .rose-dropdown-button-danger');
|
||||
assert.equal(findAll('tbody tr').length, targetHostSetCount - 1);
|
||||
await click('.rose-layout-page-actions a');
|
||||
assert.equal(currentURL(), urls.targetAddHostSets);
|
||||
assert.equal(currentURL(), urls.targetAddHostSources);
|
||||
await click('tbody label');
|
||||
await click('form [type="button"]');
|
||||
await visit(urls.targetHostSets);
|
||||
await visit(urls.targetHostSources);
|
||||
assert.equal(findAll('tbody tr').length, targetHostSetCount - 1);
|
||||
});
|
||||
|
||||
@@ -152,12 +152,12 @@ module('Acceptance | targets | host-sets', function (hooks) {
|
||||
);
|
||||
});
|
||||
instances.target.update({ hostSetIds: [] });
|
||||
await visit(urls.targetAddHostSets);
|
||||
await visit(urls.targetAddHostSources);
|
||||
assert.equal(instances.target.hostSets.length, 0);
|
||||
assert.equal(currentURL(), urls.targetAddHostSets);
|
||||
assert.equal(currentURL(), urls.targetAddHostSources);
|
||||
await click('tbody label');
|
||||
await click('form [type="submit"]');
|
||||
assert.equal(currentURL(), urls.targetAddHostSets);
|
||||
assert.equal(currentURL(), urls.targetAddHostSources);
|
||||
assert.equal(instances.target.hostSets.length, 0);
|
||||
});
|
||||
});
|
||||
+2
-2
@@ -2,14 +2,14 @@ import { module, test } from 'qunit';
|
||||
import { setupTest } from 'ember-qunit';
|
||||
|
||||
module(
|
||||
'Unit | Controller | scopes/scope/targets/target/add-host-sets',
|
||||
'Unit | Controller | scopes/scope/targets/target/add-host-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/add-host-sets'
|
||||
'controller:scopes/scope/targets/target/add-host-sources'
|
||||
);
|
||||
assert.ok(controller);
|
||||
});
|
||||
+2
-2
@@ -2,14 +2,14 @@ import { module, test } from 'qunit';
|
||||
import { setupTest } from 'ember-qunit';
|
||||
|
||||
module(
|
||||
'Unit | Controller | scopes/scope/targets/target/credential-libraries',
|
||||
'Unit | Controller | scopes/scope/targets/target/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-libraries'
|
||||
'controller:scopes/scope/targets/target/credential-sources'
|
||||
);
|
||||
assert.ok(controller);
|
||||
});
|
||||
+2
-2
@@ -2,14 +2,14 @@ import { module, test } from 'qunit';
|
||||
import { setupTest } from 'ember-qunit';
|
||||
|
||||
module(
|
||||
'Unit | Controller | scopes/scope/targets/target/host-sets',
|
||||
'Unit | Controller | scopes/scope/targets/target/host-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/host-sets'
|
||||
'controller:scopes/scope/targets/target/host-sources'
|
||||
);
|
||||
assert.ok(controller);
|
||||
});
|
||||
+2
-2
@@ -2,13 +2,13 @@ import { module, test } from 'qunit';
|
||||
import { setupTest } from 'ember-qunit';
|
||||
|
||||
module(
|
||||
'Unit | Route | scopes/scope/targets/target/add-credential-libraries',
|
||||
'Unit | Route | scopes/scope/targets/target/add-credential-sources',
|
||||
function (hooks) {
|
||||
setupTest(hooks);
|
||||
|
||||
test('it exists', function (assert) {
|
||||
let route = this.owner.lookup(
|
||||
'route:scopes/scope/targets/target/add-credential-libraries'
|
||||
'route:scopes/scope/targets/target/add-credential-sources'
|
||||
);
|
||||
assert.ok(route);
|
||||
});
|
||||
+2
-2
@@ -2,13 +2,13 @@ import { module, test } from 'qunit';
|
||||
import { setupTest } from 'ember-qunit';
|
||||
|
||||
module(
|
||||
'Unit | Route | scopes/scope/targets/target/add-host-sets',
|
||||
'Unit | Route | scopes/scope/targets/target/add-host-sources',
|
||||
function (hooks) {
|
||||
setupTest(hooks);
|
||||
|
||||
test('it exists', function (assert) {
|
||||
let route = this.owner.lookup(
|
||||
'route:scopes/scope/targets/target/add-host-sets'
|
||||
'route:scopes/scope/targets/target/add-host-sources'
|
||||
);
|
||||
assert.ok(route);
|
||||
});
|
||||
+2
-2
@@ -2,13 +2,13 @@ import { module, test } from 'qunit';
|
||||
import { setupTest } from 'ember-qunit';
|
||||
|
||||
module(
|
||||
'Unit | Route | scopes/scope/targets/target/credential-libraries',
|
||||
'Unit | Route | scopes/scope/targets/target/credential-sources',
|
||||
function (hooks) {
|
||||
setupTest(hooks);
|
||||
|
||||
test('it exists', function (assert) {
|
||||
let route = this.owner.lookup(
|
||||
'route:scopes/scope/targets/target/credential-libraries'
|
||||
'route:scopes/scope/targets/target/credential-sources'
|
||||
);
|
||||
assert.ok(route);
|
||||
});
|
||||
+2
-2
@@ -2,13 +2,13 @@ import { module, test } from 'qunit';
|
||||
import { setupTest } from 'ember-qunit';
|
||||
|
||||
module(
|
||||
'Unit | Route | scopes/scope/targets/target/host-sets',
|
||||
'Unit | Route | scopes/scope/targets/target/host-sources',
|
||||
function (hooks) {
|
||||
setupTest(hooks);
|
||||
|
||||
test('it exists', function (assert) {
|
||||
let route = this.owner.lookup(
|
||||
'route:scopes/scope/targets/target/host-sets'
|
||||
'route:scopes/scope/targets/target/host-sources'
|
||||
);
|
||||
assert.ok(route);
|
||||
});
|
||||
Reference in new issue
Block a user