From 1cff850b17f31b1809564d0bfb399238f36e1f6f Mon Sep 17 00:00:00 2001 From: Randall Morey Date: Mon, 16 Nov 2020 15:08:59 -0500 Subject: [PATCH] =?UTF-8?q?chore:=20=F0=9F=A4=96=20apply=20prettier=20form?= =?UTF-8?q?atting=20to=20ui=20projects?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ui/core/app/components/bread-crumbs.js | 2 - ui/core/app/components/error/message.js | 3 +- .../account/password/change-password/index.js | 2 - .../app/components/form/role/grants/index.js | 4 +- ui/core/app/components/form/role/index.js | 6 +- .../components/pending-confirmations/index.js | 2 - .../controllers/scopes/scope/authenticate.js | 3 +- ui/core/app/decorators/confirm.js | 15 ++-- ui/core/app/decorators/notify.js | 14 ++-- ui/core/app/formats.js | 2 +- ui/core/app/helpers/doc-url.js | 9 ++- ui/core/app/helpers/format-date-iso-human.js | 5 +- ui/core/app/helpers/format-date-iso.js | 2 +- ui/core/app/helpers/is-loading.js | 2 - ui/core/app/router.js | 24 +++--- ui/core/app/routes/account.js | 2 - ui/core/app/routes/account/change-password.js | 2 - ui/core/app/routes/application.js | 4 +- ui/core/app/routes/scopes/scope.js | 7 +- .../app/routes/scopes/scope/auth-methods.js | 4 +- .../auth-methods/auth-method/accounts.js | 4 +- .../accounts/account/set-password.js | 5 +- .../app/routes/scopes/scope/authenticate.js | 2 +- ui/core/app/routes/scopes/scope/edit.js | 1 - ui/core/app/routes/scopes/scope/groups.js | 4 +- .../app/routes/scopes/scope/host-catalogs.js | 4 +- .../scope/host-catalogs/host-catalog.js | 39 ++++----- .../host-catalogs/host-catalog/host-sets.js | 12 ++- .../host-sets/host-set/add-hosts.js | 5 +- .../host-sets/host-set/create-and-add-host.js | 9 ++- .../host-catalog/host-sets/host-set/hosts.js | 5 +- .../host-catalog/host-sets/host-set/index.js | 3 +- .../host-catalog/host-sets/index.js | 3 +- .../scope/host-catalogs/host-catalog/hosts.js | 12 ++- .../host-catalogs/host-catalog/hosts/host.js | 26 +++--- .../host-catalog/hosts/host/index.js | 3 +- .../host-catalogs/host-catalog/hosts/index.js | 3 +- .../host-catalogs/host-catalog/hosts/new.js | 13 ++- .../scopes/scope/host-catalogs/index.js | 3 +- ui/core/app/routes/scopes/scope/new.js | 1 - ui/core/app/routes/scopes/scope/roles.js | 4 +- .../routes/scopes/scope/roles/role/index.js | 23 +++--- .../scopes/scope/roles/role/principals.js | 1 - ui/core/app/routes/scopes/scope/scopes.js | 7 +- .../app/routes/scopes/scope/scopes/index.js | 3 +- .../app/routes/scopes/scope/sessions/index.js | 3 +- ui/core/app/routes/scopes/scope/targets.js | 4 +- .../app/routes/scopes/scope/targets/index.js | 3 +- .../scope/targets/target/add-host-sets.js | 19 ++--- .../scopes/scope/targets/target/host-sets.js | 4 +- .../scopes/scope/targets/target/index.js | 3 +- ui/core/app/routes/scopes/scope/users.js | 4 +- ui/core/app/services/confirm.js | 6 +- ui/core/app/services/scope.js | 2 - ui/core/config/environment.js | 4 +- ui/core/ember-cli-build.js | 3 +- ui/core/tests/acceptance/accounts-test.js | 6 +- .../accounts/change-password-test.js | 37 ++++++--- .../acceptance/accounts/set-password-test.js | 17 ++-- ui/core/tests/acceptance/auth-methods-test.js | 8 +- .../tests/acceptance/authentication-test.js | 6 +- .../tests/acceptance/groups/members-test.js | 16 ++-- .../tests/acceptance/host-catalogs-test.js | 31 ++++++-- .../host-catalogs/host-sets-test.js | 32 +++++--- .../host-catalogs/host-sets/hosts-test.js | 32 +++++--- .../acceptance/host-catalogs/hosts-test.js | 32 +++++--- ui/core/tests/acceptance/roles-test.js | 10 ++- ui/core/tests/acceptance/roles/grants-test.js | 79 ++++++++++++------- .../tests/acceptance/roles/principals-test.js | 18 +++-- ui/core/tests/acceptance/scopes-test.js | 36 ++++++--- ui/core/tests/acceptance/sessions-test.js | 36 +++++++-- ui/core/tests/acceptance/targets-test.js | 28 +++++-- .../acceptance/targets/host-sets-test.js | 19 +++-- .../tests/acceptance/users/accounts-test.js | 14 ++-- .../integration/components/copyable-test.js | 8 +- .../integration/components/doc-link-test.js | 4 +- .../components/error/message-test.js | 5 +- .../components/pending-confirmations-test.js | 8 +- .../tests/integration/helpers/doc-url-test.js | 9 +-- .../helpers/format-date-iso-human-test.js | 4 +- .../helpers/format-date-iso-test.js | 4 +- .../unit/authenticators/password-test.js | 9 ++- .../accounts/account/set-password-test.js | 21 +++-- .../scopes/scope/groups/group/members-test.js | 10 ++- .../scopes/scope/host-catalogs-test.js | 4 +- .../scope/host-catalogs/host-catalog-test.js | 10 ++- .../host-catalog/host-sets-test.js | 21 +++-- .../host-catalog/host-sets/host-set-test.js | 21 +++-- .../host-sets/host-set/add-hosts-test.js | 21 +++-- .../host-set/create-and-add-host-test.js | 21 +++-- .../host-sets/host-set/hosts-test.js | 21 +++-- .../host-catalogs/host-catalog/hosts-test.js | 21 +++-- .../host-catalog/hosts/host-test.js | 21 +++-- .../scopes/scope/roles/role/grants-test.js | 8 +- .../scope/roles/role/principals-test.js | 10 ++- .../controllers/scopes/scope/scopes-test.js | 4 +- .../controllers/scopes/scope/sessions-test.js | 4 +- .../controllers/scopes/scope/targets-test.js | 4 +- .../scopes/scope/targets/target-test.js | 8 +- .../targets/target/add-host-sets-test.js | 21 +++-- .../scope/targets/target/host-sets-test.js | 10 ++- .../scopes/scope/users/user/accounts-test.js | 10 ++- .../scope/users/user/add-accounts-test.js | 10 ++- ui/core/tests/unit/routes/account-test.js | 4 +- .../routes/account/change-password-test.js | 4 +- .../unit/routes/scopes/scope/edit-test.js | 4 +- .../routes/scopes/scope/host-catalogs-test.js | 4 +- .../scope/host-catalogs/host-catalog-test.js | 10 ++- .../host-catalog/host-sets-test.js | 19 +++-- .../host-catalog/host-sets/host-set-test.js | 19 +++-- .../host-sets/host-set/add-hosts-test.js | 19 +++-- .../host-set/create-and-add-host-test.js | 19 +++-- .../host-sets/host-set/hosts-test.js | 19 +++-- .../host-sets/host-set/index-test.js | 19 +++-- .../host-catalog/host-sets/index-test.js | 19 +++-- .../host-catalog/host-sets/new-test.js | 19 +++-- .../host-catalogs/host-catalog/hosts-test.js | 19 +++-- .../host-catalog/hosts/host-test.js | 19 +++-- .../host-catalog/hosts/host/index-test.js | 19 +++-- .../host-catalog/hosts/index-test.js | 19 +++-- .../host-catalog/hosts/new-test.js | 19 +++-- .../host-catalogs/host-catalog/index-test.js | 19 +++-- .../scopes/scope/host-catalogs/index-test.js | 4 +- .../scopes/scope/host-catalogs/new-test.js | 4 +- .../unit/routes/scopes/scope/new-test.js | 4 +- .../unit/routes/scopes/scope/scopes-test.js | 4 +- .../routes/scopes/scope/scopes/index-test.js | 4 +- .../unit/routes/scopes/scope/sessions-test.js | 4 +- .../scopes/scope/sessions/index-test.js | 4 +- .../unit/routes/scopes/scope/targets-test.js | 4 +- .../routes/scopes/scope/targets/index-test.js | 4 +- .../routes/scopes/scope/targets/new-test.js | 4 +- .../scopes/scope/targets/target-test.js | 4 +- .../targets/target/add-host-sets-test.js | 10 ++- .../scope/targets/target/host-sets-test.js | 10 ++- .../scopes/scope/targets/target/index-test.js | 4 +- .../scopes/scope/users/user/accounts-test.js | 4 +- .../scope/users/user/add-accounts-test.js | 4 +- ui/core/tests/unit/services/confirm-test.js | 14 ++-- ui/core/tests/unit/services/scope-test.js | 4 +- .../controllers/scopes/scope/authenticate.js | 3 +- ui/desktop/app/helpers/is-loading.js | 2 - ui/desktop/app/router.js | 8 +- ui/desktop/app/routes/application.js | 2 - ui/desktop/app/routes/index.js | 1 - ui/desktop/app/routes/origin.js | 7 +- .../app/routes/scopes/scope/authenticate.js | 4 +- ui/desktop/app/styles/_notify.scss | 8 +- ui/desktop/app/styles/app.scss | 27 +++++-- .../tests/acceptance/authentication-test.js | 54 +++++++------ ui/desktop/tests/acceptance/origin-test.js | 53 ++++++++----- .../unit/authenticators/password-test.js | 9 ++- .../unit/controllers/application-test.js | 4 +- .../scopes/scope/authenticate-test.js | 4 +- .../tests/unit/routes/application-test.js | 4 +- ui/desktop/tests/unit/routes/origin-test.js | 4 +- .../tests/unit/routes/scopes/index-test.js | 4 +- .../routes/scopes/scope/authenticate-test.js | 4 +- .../scopes/scope/authenticate/index-test.js | 4 +- .../scopes/scope/authenticate/method-test.js | 4 +- 160 files changed, 1042 insertions(+), 707 deletions(-) diff --git a/ui/core/app/components/bread-crumbs.js b/ui/core/app/components/bread-crumbs.js index 38482914d..93f5a78a7 100644 --- a/ui/core/app/components/bread-crumbs.js +++ b/ui/core/app/components/bread-crumbs.js @@ -2,10 +2,8 @@ import BreadCrumbsComponent from 'ember-breadcrumbs/components/bread-crumbs'; import { inject as service } from '@ember/service'; export default class crumbs extends BreadCrumbsComponent { - // =services @service session; @service scope; - } diff --git a/ui/core/app/components/error/message.js b/ui/core/app/components/error/message.js index 7dc91ca27..22c587595 100644 --- a/ui/core/app/components/error/message.js +++ b/ui/core/app/components/error/message.js @@ -54,8 +54,7 @@ export default class ErrorMessageComponent extends MessageComponent { @computed('args.status') get messageCode() { let messageCode = this.args.status; - if(!statuses.includes(messageCode)) messageCode = 'unknown'; + if (!statuses.includes(messageCode)) messageCode = 'unknown'; return messageCode; } - } diff --git a/ui/core/app/components/form/account/password/change-password/index.js b/ui/core/app/components/form/account/password/change-password/index.js index e2dcd0bac..306952301 100644 --- a/ui/core/app/components/form/account/password/change-password/index.js +++ b/ui/core/app/components/form/account/password/change-password/index.js @@ -5,7 +5,6 @@ import { action } from '@ember/object'; import { run } from '@ember/runloop'; export default class FormAccountPasswordChangePasswordIndexComponent extends Component { - // =properties /** @@ -69,5 +68,4 @@ export default class FormAccountPasswordChangePasswordIndexComponent extends Com this.resetPasswords(); fn(); } - } diff --git a/ui/core/app/components/form/role/grants/index.js b/ui/core/app/components/form/role/grants/index.js index a55a28093..206200c61 100644 --- a/ui/core/app/components/form/role/grants/index.js +++ b/ui/core/app/components/form/role/grants/index.js @@ -15,7 +15,7 @@ export default class FormRoleGrantsComponent extends Component { */ @computed('args.model.grant_strings.[]') get grants() { - return this.args.model.grant_strings.map(value => ({ value })); + return this.args.model.grant_strings.map((value) => ({ value })); } /** @@ -23,7 +23,7 @@ export default class FormRoleGrantsComponent extends Component { */ @computed('grants.@each.value') get grantStrings() { - return this.grants.map(obj => obj.value); + return this.grants.map((obj) => obj.value); } /** diff --git a/ui/core/app/components/form/role/index.js b/ui/core/app/components/form/role/index.js index bf99e029b..907e3bdba 100644 --- a/ui/core/app/components/form/role/index.js +++ b/ui/core/app/components/form/role/index.js @@ -10,7 +10,9 @@ export default class FormRoleGrantsComponent extends Component { */ @computed('args.model.{store,grant_scope_id}') get selectedGrantScope() { - return this.args.model.store - .peekRecord('scope', this.args.model.grant_scope_id); + return this.args.model.store.peekRecord( + 'scope', + this.args.model.grant_scope_id + ); } } diff --git a/ui/core/app/components/pending-confirmations/index.js b/ui/core/app/components/pending-confirmations/index.js index 2c7e447df..abe39fb5f 100644 --- a/ui/core/app/components/pending-confirmations/index.js +++ b/ui/core/app/components/pending-confirmations/index.js @@ -8,7 +8,6 @@ import { action } from '@ember/object'; * action. Useful for rendering confirm modals and awaiting user action. */ export default class PendingConfirmationsComponent extends Component { - // =services @service confirm; @@ -36,5 +35,4 @@ export default class PendingConfirmationsComponent extends Component { confirmation.dismiss(); return confirmation; } - } diff --git a/ui/core/app/controllers/scopes/scope/authenticate.js b/ui/core/app/controllers/scopes/scope/authenticate.js index 5c36ec58e..25ebcd1df 100644 --- a/ui/core/app/controllers/scopes/scope/authenticate.js +++ b/ui/core/app/controllers/scopes/scope/authenticate.js @@ -11,7 +11,6 @@ export default class ScopesScopeAuthenticateController extends Controller { return [ ...this.model.scopes.filter((scope) => scope.id === 'global'), ...this.model.scopes.filter((scope) => scope.id !== 'global'), - ] + ]; } - } diff --git a/ui/core/app/decorators/confirm.js b/ui/core/app/decorators/confirm.js index 49db19c97..5ae4c28df 100644 --- a/ui/core/app/decorators/confirm.js +++ b/ui/core/app/decorators/confirm.js @@ -13,11 +13,14 @@ export function confirm(confirmationTextKey) { const confirmService = owner.lookup('service:confirm'); const intl = owner.lookup('service:intl'); const text = intl.t(confirmationTextKey); - return confirmService.confirm(text) - // If user confirmed, execute the decorated method - .then(() => method.apply(this, arguments)) - // If the user denied, gracefully handle promise rejection with no-op - .catch((e) => e); + return ( + confirmService + .confirm(text) + // If user confirmed, execute the decorated method + .then(() => method.apply(this, arguments)) + // If the user denied, gracefully handle promise rejection with no-op + .catch((e) => e) + ); }; - } + }; } diff --git a/ui/core/app/decorators/notify.js b/ui/core/app/decorators/notify.js index 7232dfffd..42204023f 100644 --- a/ui/core/app/decorators/notify.js +++ b/ui/core/app/decorators/notify.js @@ -14,9 +14,10 @@ export function notifySuccess(notification) { const owner = getOwner(this); const notifyService = owner.lookup('service:notify'); const intlService = owner.lookup('service:intl'); - const candidateKey = (typeof notification === 'function') - ? notification.apply(this, arguments) - : notification; + const candidateKey = + typeof notification === 'function' + ? notification.apply(this, arguments) + : notification; // As of now, we only use translated strings for notifications, // but this code would support both translated and arbitrary strings. // const text = intlService.exists(candidateKey) @@ -27,7 +28,7 @@ export function notifySuccess(notification) { notifyService.success(text); return value; }; - } + }; } /** @@ -43,7 +44,7 @@ export function notifySuccess(notification) { * @param {object} options * @param {object} options.catch - defaults to false */ -export function notifyError(notification, options={ catch: false }) { +export function notifyError(notification, options = { catch: false }) { return function (_target, _propertyKey, desc) { const method = desc.value; desc.value = async function () { @@ -53,7 +54,6 @@ export function notifyError(notification, options={ catch: false }) { try { return await method.apply(this, arguments); } catch (error) { - // As of now all error notifications pass a function, but this code // could support either a function or a string. // const candidateKey = (typeof notification === 'function') @@ -77,5 +77,5 @@ export function notifyError(notification, options={ catch: false }) { } } }; - } + }; } diff --git a/ui/core/app/formats.js b/ui/core/app/formats.js index 9ea07ca26..36c956ce3 100644 --- a/ui/core/app/formats.js +++ b/ui/core/app/formats.js @@ -14,7 +14,7 @@ export default { hour: 'numeric', minute: 'numeric', second: 'numeric', - hour12: false + hour12: false, }, hhmmss: { hour: 'numeric', diff --git a/ui/core/app/helpers/doc-url.js b/ui/core/app/helpers/doc-url.js index bff751918..a0915bb9e 100644 --- a/ui/core/app/helpers/doc-url.js +++ b/ui/core/app/helpers/doc-url.js @@ -2,15 +2,18 @@ import { helper } from '@ember/component/helper'; import { assert } from '@ember/debug'; import config from '../config/environment'; -export default helper(function docUrl(params/*, hash*/) { +export default helper(function docUrl(params /*, hash*/) { const baseURL = config.documentation.baseURL; const docKey = params[0] || ''; const configuredPath = config.documentation.topics[docKey]; if (docKey) { - assert(` + assert( + ` Documentation for "${docKey}" could not be found. Please ensure that this key exists under "documentation" in your app config. - `, configuredPath); + `, + configuredPath + ); } const path = configuredPath || ''; return `${baseURL}${path}`; diff --git a/ui/core/app/helpers/format-date-iso-human.js b/ui/core/app/helpers/format-date-iso-human.js index 2744a4eeb..00248aa5d 100644 --- a/ui/core/app/helpers/format-date-iso-human.js +++ b/ui/core/app/helpers/format-date-iso-human.js @@ -1,7 +1,8 @@ import { helper } from '@ember/component/helper'; -export default helper(function formatDateIsoHuman(params/*, hash*/) { - return params[0].toISOString() +export default helper(function formatDateIsoHuman(params /*, hash*/) { + return params[0] + .toISOString() .replace('T', ' ') .replace(/\.\d*Z/, ''); }); diff --git a/ui/core/app/helpers/format-date-iso.js b/ui/core/app/helpers/format-date-iso.js index 52cd9687d..e65442549 100644 --- a/ui/core/app/helpers/format-date-iso.js +++ b/ui/core/app/helpers/format-date-iso.js @@ -1,5 +1,5 @@ import { helper } from '@ember/component/helper'; -export default helper(function formatDateIso(params/*, hash*/) { +export default helper(function formatDateIso(params /*, hash*/) { return params[0].toISOString(); }); diff --git a/ui/core/app/helpers/is-loading.js b/ui/core/app/helpers/is-loading.js index ca34b363a..d4c239939 100644 --- a/ui/core/app/helpers/is-loading.js +++ b/ui/core/app/helpers/is-loading.js @@ -6,7 +6,6 @@ import { inject as service } from '@ember/service'; * service's `isLoading` attribute. */ export default class extends Helper { - // =services @service loading; @@ -20,5 +19,4 @@ export default class extends Helper { compute() { return this.loading.isLoading; } - } diff --git a/ui/core/app/router.js b/ui/core/app/router.js index 30e882b22..8b018594c 100644 --- a/ui/core/app/router.js +++ b/ui/core/app/router.js @@ -13,7 +13,7 @@ Router.map(function () { this.route('method', { path: ':auth_method_id' }); }); - this.route('scopes', function() {}); + this.route('scopes', function () {}); this.route('edit'); this.route('new'); @@ -54,26 +54,26 @@ Router.map(function () { this.route('new'); }); - this.route('sessions', function() {}); + this.route('sessions', function () {}); - this.route('targets', function() { - this.route('target', { path: ':target_id' }, function() { - this.route('host-sets', function() {}); + this.route('targets', function () { + this.route('target', { path: ':target_id' }, function () { + this.route('host-sets', function () {}); this.route('add-host-sets'); }); this.route('new'); }); - this.route('host-catalogs', function() { + this.route('host-catalogs', function () { this.route('new'); - this.route('host-catalog', { path: ':host_catalog_id' }, function() { - this.route('hosts', function() { + this.route('host-catalog', { path: ':host_catalog_id' }, function () { + this.route('hosts', function () { this.route('new'); - this.route('host', { path: ':host_id' }, function() {}); + this.route('host', { path: ':host_id' }, function () {}); }); - this.route('host-sets', function() { + this.route('host-sets', function () { this.route('new'); - this.route('host-set', { path: ':host_set_id' }, function() { + this.route('host-set', { path: ':host_set_id' }, function () { this.route('hosts'); this.route('add-hosts'); this.route('create-and-add-host'); @@ -84,7 +84,7 @@ Router.map(function () { }); }); - this.route('account', function() { + this.route('account', function () { this.route('change-password'); }); }); diff --git a/ui/core/app/routes/account.js b/ui/core/app/routes/account.js index 34e9a9e11..064525911 100644 --- a/ui/core/app/routes/account.js +++ b/ui/core/app/routes/account.js @@ -2,7 +2,6 @@ import Route from '@ember/routing/route'; import { inject as service } from '@ember/service'; export default class AccountRoute extends Route { - // =services @service session; @@ -15,5 +14,4 @@ export default class AccountRoute extends Route { beforeModel() { if (!this.session.isAuthenticated) this.transitionTo('index'); } - } diff --git a/ui/core/app/routes/account/change-password.js b/ui/core/app/routes/account/change-password.js index e4247da8e..e1c672d1b 100644 --- a/ui/core/app/routes/account/change-password.js +++ b/ui/core/app/routes/account/change-password.js @@ -7,7 +7,6 @@ import { notifySuccess, notifyError } from '../../decorators/notify'; * The change password flow is associated only with password-type auth methods. */ export default class AccountChangePasswordRoute extends Route { - // =services @service session; @@ -53,5 +52,4 @@ export default class AccountChangePasswordRoute extends Route { cancel() { this.replaceWith('index'); } - } diff --git a/ui/core/app/routes/application.js b/ui/core/app/routes/application.js index 6d4eee236..a4d4cc6ef 100644 --- a/ui/core/app/routes/application.js +++ b/ui/core/app/routes/application.js @@ -127,7 +127,8 @@ export default class ApplicationRoute extends Route.extend( @action toggleTheme(theme) { const rootElementSelector = getOwner(this).rootElement; - const rootEl = getOwner(this).lookup('service:-document') + const rootEl = getOwner(this) + .lookup('service:-document') .querySelector(rootElementSelector); this.session.set('data.theme', theme); switch (theme) { @@ -144,5 +145,4 @@ export default class ApplicationRoute extends Route.extend( rootEl.classList.remove('rose-theme-light'); } } - } diff --git a/ui/core/app/routes/scopes/scope.js b/ui/core/app/routes/scopes/scope.js index 9b6720dbd..229d6611b 100644 --- a/ui/core/app/routes/scopes/scope.js +++ b/ui/core/app/routes/scopes/scope.js @@ -50,7 +50,8 @@ export default class ScopesScopeRoute extends Route { async afterModel(model) { // First, load orgs and, if necessary, projects let orgs, projects; - orgs = await this.store.query('scope', { scope_id: 'global' }) + orgs = await this.store + .query('scope', { scope_id: 'global' }) .catch(() => A([])); if (model.isProject) { projects = await this.store.query('scope', { scope_id: model.scopeID }); @@ -113,7 +114,9 @@ export default class ScopesScopeRoute extends Route { @action @loading @notifyError(({ message }) => message) - @notifySuccess(({ isNew }) => isNew ? 'notifications.create-success' : 'notifications.save-success') + @notifySuccess(({ isNew }) => + isNew ? 'notifications.create-success' : 'notifications.save-success' + ) async save(scope) { const { isNew } = scope; await scope.save(); diff --git a/ui/core/app/routes/scopes/scope/auth-methods.js b/ui/core/app/routes/scopes/scope/auth-methods.js index 020ed8b9f..f65e40590 100644 --- a/ui/core/app/routes/scopes/scope/auth-methods.js +++ b/ui/core/app/routes/scopes/scope/auth-methods.js @@ -49,7 +49,9 @@ export default class ScopesScopeAuthMethodsRoute extends Route { @action @loading @notifyError(({ message }) => message) - @notifySuccess(({ isNew }) => isNew ? 'notifications.create-success' : 'notifications.save-success') + @notifySuccess(({ isNew }) => + isNew ? 'notifications.create-success' : 'notifications.save-success' + ) async save(authMethod) { await authMethod.save(); await this.transitionTo( diff --git a/ui/core/app/routes/scopes/scope/auth-methods/auth-method/accounts.js b/ui/core/app/routes/scopes/scope/auth-methods/auth-method/accounts.js index 94871fd6f..2cd7293a9 100644 --- a/ui/core/app/routes/scopes/scope/auth-methods/auth-method/accounts.js +++ b/ui/core/app/routes/scopes/scope/auth-methods/auth-method/accounts.js @@ -45,7 +45,9 @@ export default class ScopesScopeAuthMethodsAuthMethodAccountsRoute extends Route @action @loading @notifyError(({ message }) => message) - @notifySuccess(({ isNew }) => isNew ? 'notifications.create-success' : 'notifications.save-success') + @notifySuccess(({ isNew }) => + isNew ? 'notifications.create-success' : 'notifications.save-success' + ) async save(account, password) { const { isNew } = account; const adapterOptions = {}; diff --git a/ui/core/app/routes/scopes/scope/auth-methods/auth-method/accounts/account/set-password.js b/ui/core/app/routes/scopes/scope/auth-methods/auth-method/accounts/account/set-password.js index 2f5886030..55fe81986 100644 --- a/ui/core/app/routes/scopes/scope/auth-methods/auth-method/accounts/account/set-password.js +++ b/ui/core/app/routes/scopes/scope/auth-methods/auth-method/accounts/account/set-password.js @@ -2,7 +2,10 @@ import Route from '@ember/routing/route'; import { action } from '@ember/object'; import { inject as service } from '@ember/service'; import loading from 'ember-loading/decorator'; -import { notifySuccess, notifyError } from '../../../../../../../decorators/notify'; +import { + notifySuccess, + notifyError, +} from '../../../../../../../decorators/notify'; export default class ScopesScopeAuthMethodsAuthMethodAccountsAccountSettingsRoute extends Route { // =services diff --git a/ui/core/app/routes/scopes/scope/authenticate.js b/ui/core/app/routes/scopes/scope/authenticate.js index 1c49215a8..21d9de8e4 100644 --- a/ui/core/app/routes/scopes/scope/authenticate.js +++ b/ui/core/app/routes/scopes/scope/authenticate.js @@ -22,7 +22,7 @@ export default class ScopesScopeAuthenticateRoute extends Route { const { id: scope_id } = this.modelFor('scopes.scope'); return hash({ scope: this.modelFor('scopes.scope'), - scopes: this.modelFor('scopes').filter(scope => scope.isOrg), + scopes: this.modelFor('scopes').filter((scope) => scope.isOrg), authMethods: this.store.query('auth-method', { scope_id }), // for integration testing: diff --git a/ui/core/app/routes/scopes/scope/edit.js b/ui/core/app/routes/scopes/scope/edit.js index a7b74c5ef..5928b678f 100644 --- a/ui/core/app/routes/scopes/scope/edit.js +++ b/ui/core/app/routes/scopes/scope/edit.js @@ -2,7 +2,6 @@ import Route from '@ember/routing/route'; import { inject as service } from '@ember/service'; export default class ScopesScopeEditRoute extends Route { - // =services @service session; diff --git a/ui/core/app/routes/scopes/scope/groups.js b/ui/core/app/routes/scopes/scope/groups.js index 38085bfc7..e0210641e 100644 --- a/ui/core/app/routes/scopes/scope/groups.js +++ b/ui/core/app/routes/scopes/scope/groups.js @@ -49,7 +49,9 @@ export default class ScopesScopeGroupsRoute extends Route { @action @loading @notifyError(({ message }) => message) - @notifySuccess(({ isNew }) => isNew ? 'notifications.create-success' : 'notifications.save-success') + @notifySuccess(({ isNew }) => + isNew ? 'notifications.create-success' : 'notifications.save-success' + ) async save(group) { await group.save(); await this.transitionTo('scopes.scope.groups.group', group); diff --git a/ui/core/app/routes/scopes/scope/host-catalogs.js b/ui/core/app/routes/scopes/scope/host-catalogs.js index 5c082051c..29b4e474b 100644 --- a/ui/core/app/routes/scopes/scope/host-catalogs.js +++ b/ui/core/app/routes/scopes/scope/host-catalogs.js @@ -51,7 +51,9 @@ export default class ScopesScopeHostCatalogsRoute extends Route { @action @loading @notifyError(({ message }) => message) - @notifySuccess(({ isNew }) => isNew ? 'notifications.create-success' : 'notifications.save-success') + @notifySuccess(({ isNew }) => + isNew ? 'notifications.create-success' : 'notifications.save-success' + ) async save(hostCatalog) { await hostCatalog.save(); await this.transitionTo( diff --git a/ui/core/app/routes/scopes/scope/host-catalogs/host-catalog.js b/ui/core/app/routes/scopes/scope/host-catalogs/host-catalog.js index 98f8c40b4..a4e18ff69 100644 --- a/ui/core/app/routes/scopes/scope/host-catalogs/host-catalog.js +++ b/ui/core/app/routes/scopes/scope/host-catalogs/host-catalog.js @@ -23,31 +23,22 @@ export default class ScopesScopeHostCatalogsHostCatalogRoute extends Route { renderTemplate(controller, model) { super.renderTemplate(...arguments); - this.render( - 'scopes/scope/host-catalogs/host-catalog/-header', - { - into: 'scopes/scope/host-catalogs/host-catalog', - outlet: 'header', - model: model, - } - ); + this.render('scopes/scope/host-catalogs/host-catalog/-header', { + into: 'scopes/scope/host-catalogs/host-catalog', + outlet: 'header', + model: model, + }); - this.render( - 'scopes/scope/host-catalogs/host-catalog/-navigation', - { - into: 'scopes/scope/host-catalogs/host-catalog', - outlet: 'navigation', - model: model, - } - ); + this.render('scopes/scope/host-catalogs/host-catalog/-navigation', { + into: 'scopes/scope/host-catalogs/host-catalog', + outlet: 'navigation', + model: model, + }); - this.render( - 'scopes/scope/host-catalogs/host-catalog/-actions', - { - into: 'scopes/scope/host-catalogs/host-catalog', - outlet: 'actions', - model: model, - } - ); + this.render('scopes/scope/host-catalogs/host-catalog/-actions', { + into: 'scopes/scope/host-catalogs/host-catalog', + outlet: 'actions', + model: model, + }); } } diff --git a/ui/core/app/routes/scopes/scope/host-catalogs/host-catalog/host-sets.js b/ui/core/app/routes/scopes/scope/host-catalogs/host-catalog/host-sets.js index e3cbc969c..2105cde03 100644 --- a/ui/core/app/routes/scopes/scope/host-catalogs/host-catalog/host-sets.js +++ b/ui/core/app/routes/scopes/scope/host-catalogs/host-catalog/host-sets.js @@ -35,9 +35,7 @@ export default class ScopesScopeHostCatalogsHostCatalogHostSetsRoute extends Rou const { isNew } = hostSet; hostSet.rollbackAttributes(); if (isNew) - this.transitionTo( - 'scopes.scope.host-catalogs.host-catalog.host-sets' - ); + this.transitionTo('scopes.scope.host-catalogs.host-catalog.host-sets'); } /** @@ -48,7 +46,9 @@ export default class ScopesScopeHostCatalogsHostCatalogHostSetsRoute extends Rou @action @loading @notifyError(({ message }) => message) - @notifySuccess(({ isNew }) => isNew ? 'notifications.create-success' : 'notifications.save-success') + @notifySuccess(({ isNew }) => + isNew ? 'notifications.create-success' : 'notifications.save-success' + ) async save(hostSet) { await hostSet.save(); await this.transitionTo( @@ -69,8 +69,6 @@ export default class ScopesScopeHostCatalogsHostCatalogHostSetsRoute extends Rou @notifySuccess('notifications.delete-success') async deleteHostSet(hostSet) { await hostSet.destroyRecord(); - await this.replaceWith( - 'scopes.scope.host-catalogs.host-catalog.host-sets' - ); + await this.replaceWith('scopes.scope.host-catalogs.host-catalog.host-sets'); } } diff --git a/ui/core/app/routes/scopes/scope/host-catalogs/host-catalog/host-sets/host-set/add-hosts.js b/ui/core/app/routes/scopes/scope/host-catalogs/host-catalog/host-sets/host-set/add-hosts.js index afe7ce613..6c67301f2 100644 --- a/ui/core/app/routes/scopes/scope/host-catalogs/host-catalog/host-sets/host-set/add-hosts.js +++ b/ui/core/app/routes/scopes/scope/host-catalogs/host-catalog/host-sets/host-set/add-hosts.js @@ -3,7 +3,10 @@ import { inject as service } from '@ember/service'; import { action } from '@ember/object'; import { hash } from 'rsvp'; import loading from 'ember-loading/decorator'; -import { notifySuccess, notifyError } from '../../../../../../../decorators/notify'; +import { + notifySuccess, + notifyError, +} from '../../../../../../../decorators/notify'; export default class ScopesScopeHostCatalogsHostCatalogHostSetsHostSetAddHostsRoute extends Route { // =services diff --git a/ui/core/app/routes/scopes/scope/host-catalogs/host-catalog/host-sets/host-set/create-and-add-host.js b/ui/core/app/routes/scopes/scope/host-catalogs/host-catalog/host-sets/host-set/create-and-add-host.js index a726302f2..3447a260b 100644 --- a/ui/core/app/routes/scopes/scope/host-catalogs/host-catalog/host-sets/host-set/create-and-add-host.js +++ b/ui/core/app/routes/scopes/scope/host-catalogs/host-catalog/host-sets/host-set/create-and-add-host.js @@ -2,7 +2,10 @@ import Route from '@ember/routing/route'; import { inject as service } from '@ember/service'; import { action } from '@ember/object'; import loading from 'ember-loading/decorator'; -import { notifySuccess, notifyError } from '../../../../../../../decorators/notify'; +import { + notifySuccess, + notifyError, +} from '../../../../../../../decorators/notify'; export default class ScopesScopeHostCatalogsHostCatalogHostSetsHostSetCreateAndAddHostRoute extends Route { // =services @@ -65,7 +68,9 @@ export default class ScopesScopeHostCatalogsHostCatalogHostSetsHostSetCreateAndA @notifyError(({ message }) => message, { catch: true }) @notifySuccess('notifications.add-success') async save(host) { - const hostSet = this.modelFor('scopes.scope.host-catalogs.host-catalog.host-sets.host-set'); + const hostSet = this.modelFor( + 'scopes.scope.host-catalogs.host-catalog.host-sets.host-set' + ); await host.save(); await hostSet.addHost(host.id); await this.replaceWith( diff --git a/ui/core/app/routes/scopes/scope/host-catalogs/host-catalog/host-sets/host-set/hosts.js b/ui/core/app/routes/scopes/scope/host-catalogs/host-catalog/host-sets/host-set/hosts.js index 32c5b8911..cb2eea11c 100644 --- a/ui/core/app/routes/scopes/scope/host-catalogs/host-catalog/host-sets/host-set/hosts.js +++ b/ui/core/app/routes/scopes/scope/host-catalogs/host-catalog/host-sets/host-set/hosts.js @@ -4,7 +4,10 @@ import { action } from '@ember/object'; import { inject as service } from '@ember/service'; import loading from 'ember-loading/decorator'; import { confirm } from '../../../../../../../decorators/confirm'; -import { notifySuccess, notifyError } from '../../../../../../../decorators/notify'; +import { + notifySuccess, + notifyError, +} from '../../../../../../../decorators/notify'; export default class ScopesScopeHostCatalogsHostCatalogHostSetsHostSetHostsRoute extends Route { // =services diff --git a/ui/core/app/routes/scopes/scope/host-catalogs/host-catalog/host-sets/host-set/index.js b/ui/core/app/routes/scopes/scope/host-catalogs/host-catalog/host-sets/host-set/index.js index 48e4b444d..e676698e5 100644 --- a/ui/core/app/routes/scopes/scope/host-catalogs/host-catalog/host-sets/host-set/index.js +++ b/ui/core/app/routes/scopes/scope/host-catalogs/host-catalog/host-sets/host-set/index.js @@ -1,4 +1,3 @@ import Route from '@ember/routing/route'; -export default class ScopesScopeHostCatalogsHostCatalogHostSetsHostSetIndexRoute extends Route { -} +export default class ScopesScopeHostCatalogsHostCatalogHostSetsHostSetIndexRoute extends Route {} diff --git a/ui/core/app/routes/scopes/scope/host-catalogs/host-catalog/host-sets/index.js b/ui/core/app/routes/scopes/scope/host-catalogs/host-catalog/host-sets/index.js index 3af22321c..e62c9f95e 100644 --- a/ui/core/app/routes/scopes/scope/host-catalogs/host-catalog/host-sets/index.js +++ b/ui/core/app/routes/scopes/scope/host-catalogs/host-catalog/host-sets/index.js @@ -1,4 +1,3 @@ import Route from '@ember/routing/route'; -export default class ScopesScopeHostCatalogsHostCatalogHostSetsIndexRoute extends Route { -} +export default class ScopesScopeHostCatalogsHostCatalogHostSetsIndexRoute extends Route {} diff --git a/ui/core/app/routes/scopes/scope/host-catalogs/host-catalog/hosts.js b/ui/core/app/routes/scopes/scope/host-catalogs/host-catalog/hosts.js index 912381a39..d9ac931e7 100644 --- a/ui/core/app/routes/scopes/scope/host-catalogs/host-catalog/hosts.js +++ b/ui/core/app/routes/scopes/scope/host-catalogs/host-catalog/hosts.js @@ -35,9 +35,7 @@ export default class ScopesScopeHostCatalogsHostCatalogHostsRoute extends Route const { isNew } = host; host.rollbackAttributes(); if (isNew) - this.transitionTo( - 'scopes.scope.host-catalogs.host-catalog.hosts' - ); + this.transitionTo('scopes.scope.host-catalogs.host-catalog.hosts'); } /** @@ -48,7 +46,9 @@ export default class ScopesScopeHostCatalogsHostCatalogHostsRoute extends Route @action @loading @notifyError(({ message }) => message) - @notifySuccess(({ isNew }) => isNew ? 'notifications.create-success' : 'notifications.save-success') + @notifySuccess(({ isNew }) => + isNew ? 'notifications.create-success' : 'notifications.save-success' + ) async save(host) { await host.save(); await this.transitionTo( @@ -69,9 +69,7 @@ export default class ScopesScopeHostCatalogsHostCatalogHostsRoute extends Route @notifySuccess('notifications.delete-success') async deleteHost(host) { await host.destroyRecord(); - await this.replaceWith( - 'scopes.scope.host-catalogs.host-catalog.hosts' - ); + await this.replaceWith('scopes.scope.host-catalogs.host-catalog.hosts'); this.refresh(); } } diff --git a/ui/core/app/routes/scopes/scope/host-catalogs/host-catalog/hosts/host.js b/ui/core/app/routes/scopes/scope/host-catalogs/host-catalog/hosts/host.js index 8cbd978a2..dd87fdf1f 100644 --- a/ui/core/app/routes/scopes/scope/host-catalogs/host-catalog/hosts/host.js +++ b/ui/core/app/routes/scopes/scope/host-catalogs/host-catalog/hosts/host.js @@ -22,14 +22,11 @@ export default class ScopesScopeHostCatalogsHostCatalogHostsHostRoute extends Ro renderTemplate(controller, model) { super.renderTemplate(...arguments); - this.render( - 'scopes/scope/host-catalogs/host-catalog/hosts/host/-header', - { - into: 'scopes/scope/host-catalogs/host-catalog', - outlet: 'header', - model: model, - } - ); + this.render('scopes/scope/host-catalogs/host-catalog/hosts/host/-header', { + into: 'scopes/scope/host-catalogs/host-catalog', + outlet: 'header', + model: model, + }); this.render( 'scopes/scope/host-catalogs/host-catalog/hosts/host/-navigation', @@ -40,13 +37,10 @@ export default class ScopesScopeHostCatalogsHostCatalogHostsHostRoute extends Ro } ); - this.render( - 'scopes/scope/host-catalogs/host-catalog/hosts/host/-actions', - { - into: 'scopes/scope/host-catalogs/host-catalog', - outlet: 'actions', - model: model, - } - ); + this.render('scopes/scope/host-catalogs/host-catalog/hosts/host/-actions', { + into: 'scopes/scope/host-catalogs/host-catalog', + outlet: 'actions', + model: model, + }); } } diff --git a/ui/core/app/routes/scopes/scope/host-catalogs/host-catalog/hosts/host/index.js b/ui/core/app/routes/scopes/scope/host-catalogs/host-catalog/hosts/host/index.js index 8d1674617..ddd49700d 100644 --- a/ui/core/app/routes/scopes/scope/host-catalogs/host-catalog/hosts/host/index.js +++ b/ui/core/app/routes/scopes/scope/host-catalogs/host-catalog/hosts/host/index.js @@ -1,4 +1,3 @@ import Route from '@ember/routing/route'; -export default class ScopesScopeHostCatalogsHostCatalogHostsHostIndexRoute extends Route { -} +export default class ScopesScopeHostCatalogsHostCatalogHostsHostIndexRoute extends Route {} diff --git a/ui/core/app/routes/scopes/scope/host-catalogs/host-catalog/hosts/index.js b/ui/core/app/routes/scopes/scope/host-catalogs/host-catalog/hosts/index.js index 931deeb2e..c219c570f 100644 --- a/ui/core/app/routes/scopes/scope/host-catalogs/host-catalog/hosts/index.js +++ b/ui/core/app/routes/scopes/scope/host-catalogs/host-catalog/hosts/index.js @@ -1,4 +1,3 @@ import Route from '@ember/routing/route'; -export default class ScopesScopeHostCatalogsHostCatalogHostsIndexRoute extends Route { -} +export default class ScopesScopeHostCatalogsHostCatalogHostsIndexRoute extends Route {} diff --git a/ui/core/app/routes/scopes/scope/host-catalogs/host-catalog/hosts/new.js b/ui/core/app/routes/scopes/scope/host-catalogs/host-catalog/hosts/new.js index e82bfe0e4..b91127b4e 100644 --- a/ui/core/app/routes/scopes/scope/host-catalogs/host-catalog/hosts/new.js +++ b/ui/core/app/routes/scopes/scope/host-catalogs/host-catalog/hosts/new.js @@ -27,14 +27,11 @@ export default class ScopesScopeHostCatalogsHostCatalogHostsNewRoute extends Rou renderTemplate(controller, model) { super.renderTemplate(...arguments); - this.render( - 'scopes/scope/host-catalogs/host-catalog/hosts/new/-header', - { - into: 'scopes/scope/host-catalogs/host-catalog', - outlet: 'header', - model: model, - } - ); + this.render('scopes/scope/host-catalogs/host-catalog/hosts/new/-header', { + into: 'scopes/scope/host-catalogs/host-catalog', + outlet: 'header', + model: model, + }); this.render('_empty', { into: 'scopes/scope/host-catalogs/host-catalog', diff --git a/ui/core/app/routes/scopes/scope/host-catalogs/index.js b/ui/core/app/routes/scopes/scope/host-catalogs/index.js index 7698589d9..90fba54e3 100644 --- a/ui/core/app/routes/scopes/scope/host-catalogs/index.js +++ b/ui/core/app/routes/scopes/scope/host-catalogs/index.js @@ -1,4 +1,3 @@ import Route from '@ember/routing/route'; -export default class ScopesScopeHostCatalogsIndexRoute extends Route { -} +export default class ScopesScopeHostCatalogsIndexRoute extends Route {} diff --git a/ui/core/app/routes/scopes/scope/new.js b/ui/core/app/routes/scopes/scope/new.js index 0ab9f7f5b..54a0949be 100644 --- a/ui/core/app/routes/scopes/scope/new.js +++ b/ui/core/app/routes/scopes/scope/new.js @@ -2,7 +2,6 @@ import Route from '@ember/routing/route'; import { inject as service } from '@ember/service'; export default class ScopesScopeNewRoute extends Route { - // =services @service session; diff --git a/ui/core/app/routes/scopes/scope/roles.js b/ui/core/app/routes/scopes/scope/roles.js index fd6991171..fd6974073 100644 --- a/ui/core/app/routes/scopes/scope/roles.js +++ b/ui/core/app/routes/scopes/scope/roles.js @@ -49,7 +49,9 @@ export default class ScopesScopeRolesRoute extends Route { @action @loading @notifyError(({ message }) => message) - @notifySuccess(({ isNew }) => isNew ? 'notifications.create-success' : 'notifications.save-success') + @notifySuccess(({ isNew }) => + isNew ? 'notifications.create-success' : 'notifications.save-success' + ) async save(role) { await role.save(); await this.transitionTo('scopes.scope.roles.role', role); diff --git a/ui/core/app/routes/scopes/scope/roles/role/index.js b/ui/core/app/routes/scopes/scope/roles/role/index.js index 106a0dc64..24dd3c658 100644 --- a/ui/core/app/routes/scopes/scope/roles/role/index.js +++ b/ui/core/app/routes/scopes/scope/roles/role/index.js @@ -1,22 +1,24 @@ import Route from '@ember/routing/route'; export default class ScopesScopeRolesRoleIndexRoute extends Route { - /** * Load the role's scope and sub scopes into a hierarchical data structure. * @param {Model} model */ async afterModel(model) { const defaultScope = await this.store.findRecord('scope', model.scopeID); - const subScopes = (await this.store.query('scope', { scope_id: defaultScope.id })) - .map(scope => ({ - model: scope, - subScopes: this.store.query('scope', { scope_id: scope.id }) - })); - const grantScopes = [{ - model: defaultScope, - subScopes - }]; + const subScopes = ( + await this.store.query('scope', { scope_id: defaultScope.id }) + ).map((scope) => ({ + model: scope, + subScopes: this.store.query('scope', { scope_id: scope.id }), + })); + const grantScopes = [ + { + model: defaultScope, + subScopes, + }, + ]; this.set('grantScopes', grantScopes); } @@ -28,5 +30,4 @@ export default class ScopesScopeRolesRoleIndexRoute extends Route { super.setupController(...arguments); controller.set('grantScopes', this.grantScopes); } - } diff --git a/ui/core/app/routes/scopes/scope/roles/role/principals.js b/ui/core/app/routes/scopes/scope/roles/role/principals.js index 1bc8e3969..4b9654f79 100644 --- a/ui/core/app/routes/scopes/scope/roles/role/principals.js +++ b/ui/core/app/routes/scopes/scope/roles/role/principals.js @@ -75,5 +75,4 @@ export default class ScopesScopeRolesRolePrincipalsRoute extends Route { await role.removePrincipal(principal.id); this.refresh(); } - } diff --git a/ui/core/app/routes/scopes/scope/scopes.js b/ui/core/app/routes/scopes/scope/scopes.js index 933bfc531..7a588dd2c 100644 --- a/ui/core/app/routes/scopes/scope/scopes.js +++ b/ui/core/app/routes/scopes/scope/scopes.js @@ -29,12 +29,13 @@ export default class ScopesScopeScopesRoute extends Route { const parentScope = !currentScope.isGlobal ? await this.store.findRecord('scope', currentScope.scopeID) : null; - const subScopes = - await this.store.query('scope', { scope_id: currentScope.id }); + const subScopes = await this.store.query('scope', { + scope_id: currentScope.id, + }); return { currentScope, parentScope, - subScopes + subScopes, }; } } diff --git a/ui/core/app/routes/scopes/scope/scopes/index.js b/ui/core/app/routes/scopes/scope/scopes/index.js index 4c30c0049..3de37f817 100644 --- a/ui/core/app/routes/scopes/scope/scopes/index.js +++ b/ui/core/app/routes/scopes/scope/scopes/index.js @@ -1,4 +1,3 @@ import Route from '@ember/routing/route'; -export default class ScopesScopeScopesIndexRoute extends Route { -} +export default class ScopesScopeScopesIndexRoute extends Route {} diff --git a/ui/core/app/routes/scopes/scope/sessions/index.js b/ui/core/app/routes/scopes/scope/sessions/index.js index bf1a6aeaf..e475a9c6f 100644 --- a/ui/core/app/routes/scopes/scope/sessions/index.js +++ b/ui/core/app/routes/scopes/scope/sessions/index.js @@ -1,4 +1,3 @@ import Route from '@ember/routing/route'; -export default class ScopesScopeSessionsIndexRoute extends Route { -} +export default class ScopesScopeSessionsIndexRoute extends Route {} diff --git a/ui/core/app/routes/scopes/scope/targets.js b/ui/core/app/routes/scopes/scope/targets.js index f1da50944..bf86cd0d2 100644 --- a/ui/core/app/routes/scopes/scope/targets.js +++ b/ui/core/app/routes/scopes/scope/targets.js @@ -51,7 +51,9 @@ export default class ScopesScopeTargetsRoute extends Route { @action @loading @notifyError(({ message }) => message) - @notifySuccess(({ isNew }) => isNew ? 'notifications.create-success' : 'notifications.save-success') + @notifySuccess(({ isNew }) => + isNew ? 'notifications.create-success' : 'notifications.save-success' + ) async save(target) { await target.save(); await this.transitionTo('scopes.scope.targets.target', target); diff --git a/ui/core/app/routes/scopes/scope/targets/index.js b/ui/core/app/routes/scopes/scope/targets/index.js index 3902b6c03..2b4412f53 100644 --- a/ui/core/app/routes/scopes/scope/targets/index.js +++ b/ui/core/app/routes/scopes/scope/targets/index.js @@ -1,4 +1,3 @@ import Route from '@ember/routing/route'; -export default class ScopesScopeTargetsIndexRoute extends Route { -} +export default class ScopesScopeTargetsIndexRoute extends Route {} diff --git a/ui/core/app/routes/scopes/scope/targets/target/add-host-sets.js b/ui/core/app/routes/scopes/scope/targets/target/add-host-sets.js index 1a211d30c..e7851f15c 100644 --- a/ui/core/app/routes/scopes/scope/targets/target/add-host-sets.js +++ b/ui/core/app/routes/scopes/scope/targets/target/add-host-sets.js @@ -25,9 +25,7 @@ export default class ScopesScopeTargetsTargetAddHostSetsRoute extends Route { * @return {{target: TargetModel, hostCatalogs: [HostCatalogModel], hostSets: [HostSetModel]}} */ async model() { - const target = this.modelFor( - 'scopes.scope.targets.target' - ); + const target = this.modelFor('scopes.scope.targets.target'); const { id: scope_id } = this.modelFor('scopes.scope'); const hostCatalogs = await this.store.query('host-catalog', { scope_id }); await all( @@ -50,13 +48,10 @@ export default class ScopesScopeTargetsTargetAddHostSetsRoute extends Route { renderTemplate() { super.renderTemplate(...arguments); - this.render( - 'scopes/scope/targets/target/add-host-sets/-header', - { - into: 'scopes/scope/targets/target', - outlet: 'header', - } - ); + this.render('scopes/scope/targets/target/add-host-sets/-header', { + into: 'scopes/scope/targets/target', + outlet: 'header', + }); this.render('-empty', { into: 'scopes/scope/targets/target', @@ -77,9 +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-sets'); } /** diff --git a/ui/core/app/routes/scopes/scope/targets/target/host-sets.js b/ui/core/app/routes/scopes/scope/targets/target/host-sets.js index e181d4cdd..fd48b3d5d 100644 --- a/ui/core/app/routes/scopes/scope/targets/target/host-sets.js +++ b/ui/core/app/routes/scopes/scope/targets/target/host-sets.js @@ -20,9 +20,7 @@ export default class ScopesScopeTargetsTargetHostSetsRoute extends Route { * @return {Promise{[HostSetModel, HostCatalogModel]}} */ beforeModel() { - const { scopeID, host_sets } = this.modelFor( - 'scopes.scope.targets.target' - ); + const { scopeID, host_sets } = this.modelFor('scopes.scope.targets.target'); const promises = host_sets.map( ({ host_set_id, host_catalog_id: hostCatalogID }) => hash({ diff --git a/ui/core/app/routes/scopes/scope/targets/target/index.js b/ui/core/app/routes/scopes/scope/targets/target/index.js index 2f80e30b7..ff9a95199 100644 --- a/ui/core/app/routes/scopes/scope/targets/target/index.js +++ b/ui/core/app/routes/scopes/scope/targets/target/index.js @@ -1,4 +1,3 @@ import Route from '@ember/routing/route'; -export default class ScopesScopeTargetsTargetIndexRoute extends Route { -} +export default class ScopesScopeTargetsTargetIndexRoute extends Route {} diff --git a/ui/core/app/routes/scopes/scope/users.js b/ui/core/app/routes/scopes/scope/users.js index d65f2d35f..d2f71320f 100644 --- a/ui/core/app/routes/scopes/scope/users.js +++ b/ui/core/app/routes/scopes/scope/users.js @@ -50,7 +50,9 @@ export default class ScopesScopeUsersRoute extends Route { @action @loading @notifyError(({ message }) => message) - @notifySuccess(({ isNew }) => isNew ? 'notifications.create-success' : 'notifications.save-success') + @notifySuccess(({ isNew }) => + isNew ? 'notifications.create-success' : 'notifications.save-success' + ) async save(user) { await user.save(); await this.transitionTo('scopes.scope.users.user', user); diff --git a/ui/core/app/services/confirm.js b/ui/core/app/services/confirm.js index ed9ea3283..071551558 100644 --- a/ui/core/app/services/confirm.js +++ b/ui/core/app/services/confirm.js @@ -15,7 +15,6 @@ import config from '../config/environment'; * const confirmation = confirmationService.confirm('Text', { type: 'discard' }); */ export default class ConfirmationsService extends Service { - // =attributes /** @@ -54,7 +53,6 @@ export default class ConfirmationsService extends Service { return resolve(); } } - } /** @@ -84,7 +82,6 @@ export default class ConfirmationsService extends Service { * .finally(() => { }); // do something */ class Confirmation { - // =properties /** @@ -101,7 +98,7 @@ class Confirmation { * @param {String} type An optional type annotation for convenience. * Has no effect on confirmation. */ - constructor(text, options={}) { + constructor(text, options = {}) { this.text = text; this.options = options; this.#deferred = defer(); @@ -146,5 +143,4 @@ class Confirmation { finally() { return this.#deferred.promise.finally(...arguments); } - } diff --git a/ui/core/app/services/scope.js b/ui/core/app/services/scope.js index b4e93fe03..9128b704d 100644 --- a/ui/core/app/services/scope.js +++ b/ui/core/app/services/scope.js @@ -6,7 +6,6 @@ import { tracked } from '@glimmer/tracking'; * the currently active scope or scopes. */ export default class ScopeService extends Service { - // =attributes /** @@ -18,5 +17,4 @@ export default class ScopeService extends Service { * @type {ScopeModel} */ @tracked project; - } diff --git a/ui/core/config/environment.js b/ui/core/config/environment.js index 35a77d0f3..a114cc329 100644 --- a/ui/core/config/environment.js +++ b/ui/core/config/environment.js @@ -63,8 +63,8 @@ module.exports = function (environment) { target: '/targets', 'target.new': '/targets/new', 'target.add-host-sets': '/targets/add-host-sets', - user: '/users' - } + user: '/users', + }, }, contentSecurityPolicyHeader: 'Content-Security-Policy', diff --git a/ui/core/ember-cli-build.js b/ui/core/ember-cli-build.js index 25d88f3cc..8d6513cf5 100644 --- a/ui/core/ember-cli-build.js +++ b/ui/core/ember-cli-build.js @@ -23,8 +23,7 @@ module.exports = function (defaults) { // Only import when in development or test mode if (app.env.match(/(development)|(test)/i)) { app.import('node_modules/clipboard/dist/clipboard.js'); - } - else { + } else { app.import('node_modules/clipboard/dist/clipboard.min.js'); } diff --git a/ui/core/tests/acceptance/accounts-test.js b/ui/core/tests/acceptance/accounts-test.js index 4f966114d..c12cc02a0 100644 --- a/ui/core/tests/acceptance/accounts-test.js +++ b/ui/core/tests/acceptance/accounts-test.js @@ -54,9 +54,9 @@ module('Acceptance | accounts', function (hooks) { urls.account = `${urls.accounts}/${instances.account.id}`; }); - hooks.afterEach(async function() { + hooks.afterEach(async function () { const notification = find('.rose-notification'); - if(notification) { + if (notification) { await click('.rose-notification-dismiss'); } }); @@ -87,7 +87,7 @@ module('Acceptance | accounts', function (hooks) { test('can update an account and cancel changes', async function (assert) { assert.expect(1); - await visit(urls.account) + await visit(urls.account); await click('form [type="button"]', 'Activate edit mode'); await fillIn('[name="name"]', 'update name'); await click('form button:not([type="submit"])'); diff --git a/ui/core/tests/acceptance/accounts/change-password-test.js b/ui/core/tests/acceptance/accounts/change-password-test.js index b474be688..2e7899a82 100644 --- a/ui/core/tests/acceptance/accounts/change-password-test.js +++ b/ui/core/tests/acceptance/accounts/change-password-test.js @@ -37,10 +37,10 @@ module('Acceptance | accounts | change password', function (hooks) { scope: instances.scopes.org, }); instances.account = this.server.create('account', { - scope: instances.scopes.org + scope: instances.scopes.org, }); authenticateSession({ - account_id: instances.account.id + account_id: instances.account.id, }); // Generate route URLs for resources urls.orgScope = `/scopes/${instances.scopes.org.id}`; @@ -60,19 +60,32 @@ module('Acceptance | accounts | change password', function (hooks) { // Open header utilities dropdown await click('.rose-header-utilities .rose-dropdown summary'); // Find first element in dropdown - should be change password link - await click('.rose-header-utilities .rose-dropdown .rose-dropdown-content a'); + await click( + '.rose-header-utilities .rose-dropdown .rose-dropdown-content a' + ); assert.equal(currentURL(), urls.changePassword); }); test('can change password for account', async function (assert) { assert.expect(2); - this.server.post('/accounts/:idMethod', (_, { params: { idMethod }, requestBody }) => { - const attrs = JSON.parse(requestBody); - assert.equal(attrs.current_password, 'current password', 'current password is provided'); - assert.equal(attrs.new_password, 'new password', 'new password is provided'); - const id = idMethod.split(':')[0]; - return { id }; - }); + this.server.post( + '/accounts/:idMethod', + (_, { params: { idMethod }, requestBody }) => { + const attrs = JSON.parse(requestBody); + assert.equal( + attrs.current_password, + 'current password', + 'current password is provided' + ); + assert.equal( + attrs.new_password, + 'new password', + 'new password is provided' + ); + const id = idMethod.split(':')[0]; + return { id }; + } + ); await visit(urls.changePassword); await fillIn('[name="currentPassword"]', 'current password'); await fillIn('[name="newPassword"]', 'new password'); @@ -89,7 +102,7 @@ module('Acceptance | accounts | change password', function (hooks) { assert.notEqual(currentURL(), urls.changePassword); }); - test('errors are displayed when changing password fails', async function (assert) { + test('errors are displayed when changing password fails', async function (assert) { assert.expect(1); this.server.post('/accounts/:id', () => { return new Response( @@ -110,7 +123,7 @@ module('Acceptance | accounts | change password', function (hooks) { assert.ok(find('[role="alert"]')); }); - test('cannot change password when not authenticated', async function(assert) { + test('cannot change password when not authenticated', async function (assert) { assert.expect(1); invalidateSession(); await visit(urls.changePassword); diff --git a/ui/core/tests/acceptance/accounts/set-password-test.js b/ui/core/tests/acceptance/accounts/set-password-test.js index 442f468ee..677e9bd7c 100644 --- a/ui/core/tests/acceptance/accounts/set-password-test.js +++ b/ui/core/tests/acceptance/accounts/set-password-test.js @@ -61,12 +61,15 @@ module('Acceptance | accounts | set password', function (hooks) { test('can set a new password for account', async function (assert) { assert.expect(1); - this.server.post('/accounts/:idMethod', (_, { params: { idMethod }, requestBody }) => { - const attrs = JSON.parse(requestBody); - assert.equal(attrs.password, 'update password', 'new password is set'); - const id = idMethod.split(':')[0]; - return { id }; - }); + this.server.post( + '/accounts/:idMethod', + (_, { params: { idMethod }, requestBody }) => { + const attrs = JSON.parse(requestBody); + assert.equal(attrs.password, 'update password', 'new password is set'); + const id = idMethod.split(':')[0]; + return { id }; + } + ); await visit(urls.setPassword); await fillIn('[name="password"]', 'update password'); await click('form [type="submit"]:not(:disabled)'); @@ -84,7 +87,7 @@ module('Acceptance | accounts | set password', function (hooks) { // assert.notOk(find('[name="password"]').textContent.trim()); // }); - test('errors are displayed when setting password fails', async function (assert) { + test('errors are displayed when setting password fails', async function (assert) { assert.expect(1); this.server.post('/accounts/:id', () => { return new Response( diff --git a/ui/core/tests/acceptance/auth-methods-test.js b/ui/core/tests/acceptance/auth-methods-test.js index e1507f32e..b6d4bd912 100644 --- a/ui/core/tests/acceptance/auth-methods-test.js +++ b/ui/core/tests/acceptance/auth-methods-test.js @@ -6,9 +6,9 @@ import a11yAudit from 'ember-a11y-testing/test-support/audit'; import { Response } from 'miragejs'; import { authenticateSession, -// // These are left here intentionally for future reference. -// //currentSession, -// //invalidateSession, + // // These are left here intentionally for future reference. + // //currentSession, + // //invalidateSession, } from 'ember-simple-auth/test-support'; module('Acceptance | auth methods', function (hooks) { @@ -74,7 +74,7 @@ module('Acceptance | auth methods', function (hooks) { test('can update an auth method and cancel changes', async function (assert) { assert.expect(1); - await visit(urls.authMethod) + await visit(urls.authMethod); await click('form [type="button"]', 'Activate edit mode'); await fillIn('[name="name"]', 'update name'); await click('form button:not([type="submit"])'); diff --git a/ui/core/tests/acceptance/authentication-test.js b/ui/core/tests/acceptance/authentication-test.js index 9de13e9c8..f39c4d9bd 100644 --- a/ui/core/tests/acceptance/authentication-test.js +++ b/ui/core/tests/acceptance/authentication-test.js @@ -6,7 +6,7 @@ import { click, find, findAll, - getRootElement + getRootElement, //setupOnerror, } from '@ember/test-helpers'; import { setupApplicationTest } from 'ember-qunit'; @@ -319,7 +319,9 @@ module('Acceptance | authentication', function (hooks) { test('color theme is applied from session data', async function (assert) { assert.expect(12); - authenticateSession({ scope: { id: globalScope.id, type: globalScope.type } }); + authenticateSession({ + scope: { id: globalScope.id, type: globalScope.type }, + }); // system default await visit(orgsURL); assert.notOk(currentSession().get('data.theme')); diff --git a/ui/core/tests/acceptance/groups/members-test.js b/ui/core/tests/acceptance/groups/members-test.js index c81154b49..2d615b8ba 100644 --- a/ui/core/tests/acceptance/groups/members-test.js +++ b/ui/core/tests/acceptance/groups/members-test.js @@ -38,9 +38,13 @@ module('Acceptance | groups | members', function (hooks) { type: 'org', scope: { id: 'global', type: 'global' }, }); - instances.group = this.server.create('group', { - scope: instances.scopes.org, - }, 'withMembers'); + instances.group = this.server.create( + 'group', + { + scope: instances.scopes.org, + }, + 'withMembers' + ); membersCount = instances.group.memberIds.length; urls.groups = `/scopes/${instances.scopes.org.id}/groups`; urls.group = `${urls.groups}/${instances.group.id}`; @@ -84,7 +88,7 @@ module('Acceptance | groups | members', function (hooks) { assert.ok(find('[role="alert"]')); }); - test('visiting member selection', async function(assert) { + test('visiting member selection', async function (assert) { assert.expect(1); await visit(urls.addMembers); await a11yAudit(); @@ -96,7 +100,7 @@ module('Acceptance | groups | members', function (hooks) { instances.group.update({ memberIds: [] }); await visit(urls.members); assert.equal(findAll('tbody tr').length, 0); - await click('.rose-layout-page-actions a') + await click('.rose-layout-page-actions a'); assert.equal(currentURL(), urls.addMembers); // Click three times to select, unselect, then reselect (for coverage) await click('tbody label'); @@ -113,7 +117,7 @@ module('Acceptance | groups | members', function (hooks) { assert.equal(findAll('tbody tr').length, membersCount); await click('tbody tr .rose-dropdown-button-danger'); assert.equal(findAll('tbody tr').length, membersCount - 1); - await click('.rose-layout-page-actions a') + await click('.rose-layout-page-actions a'); assert.equal(currentURL(), urls.addMembers); await click('tbody label'); await click('form [type="button"]'); diff --git a/ui/core/tests/acceptance/host-catalogs-test.js b/ui/core/tests/acceptance/host-catalogs-test.js index 0c2a1fb30..0213bc5ce 100644 --- a/ui/core/tests/acceptance/host-catalogs-test.js +++ b/ui/core/tests/acceptance/host-catalogs-test.js @@ -24,7 +24,7 @@ module('Acceptance | host-catalogs', function (hooks) { global: null, org: null, project: null, - } + }, }; const urls = { globalScope: null, @@ -58,7 +58,8 @@ module('Acceptance | host-catalogs', function (hooks) { urls.unknownHostCatalog = `${urls.hostCatalogs}/foo`; urls.newHostCatalog = `${urls.hostCatalogs}/new`; // Generate resource couner - gethostCatalogCount = () => this.server.schema.hostCatalogs.all().models.length; + gethostCatalogCount = () => + this.server.schema.hostCatalogs.all().models.length; authenticateSession({}); }); @@ -121,7 +122,10 @@ module('Acceptance | host-catalogs', function (hooks) { }); await visit(urls.newHostCatalog); await click('[type="submit"]'); - assert.ok(find('[role="alert"]').textContent.trim(), 'The request was invalid.'); + assert.ok( + find('[role="alert"]').textContent.trim(), + 'The request was invalid.' + ); assert.ok( find('.rose-form-error-message').textContent.trim(), 'Name is required.' @@ -136,7 +140,10 @@ module('Acceptance | host-catalogs', function (hooks) { await fillIn('[name="name"]', 'random string'); await click('.rose-form-actions [type="submit"]'); assert.equal(currentURL(), urls.hostCatalog); - assert.equal(this.server.schema.hostCatalogs.all().models[0].name, 'random string'); + assert.equal( + this.server.schema.hostCatalogs.all().models[0].name, + 'random string' + ); }); test('can cancel changes to existing host catalog', async function (assert) { @@ -174,7 +181,10 @@ module('Acceptance | host-catalogs', function (hooks) { await click('form [type="button"]', 'Activate edit mode'); await fillIn('[name="name"]', 'random string'); await click('[type="submit"]'); - assert.ok(find('[role="alert"]').textContent.trim(), 'The request was invalid.'); + assert.ok( + find('[role="alert"]').textContent.trim(), + 'The request was invalid.' + ); assert.ok( find('.rose-form-error-message').textContent.trim(), 'Name is required.' @@ -196,7 +206,10 @@ module('Acceptance | host-catalogs', function (hooks) { assert.ok(find('.rose-dialog')); await click('.rose-dialog-footer button:first-child'); assert.equal(currentURL(), urls.hostCatalogs); - assert.notEqual(this.server.schema.hostCatalogs.all().models[0].name, 'random string'); + assert.notEqual( + this.server.schema.hostCatalogs.all().models[0].name, + 'random string' + ); } }); @@ -215,7 +228,10 @@ module('Acceptance | host-catalogs', function (hooks) { assert.ok(find('.rose-dialog')); await click('.rose-dialog-footer button:last-child'); assert.equal(currentURL(), urls.hostCatalog); - assert.notEqual(this.server.schema.hostCatalogs.all().models[0].name, 'random string'); + assert.notEqual( + this.server.schema.hostCatalogs.all().models[0].name, + 'random string' + ); } }); @@ -268,5 +284,4 @@ module('Acceptance | host-catalogs', function (hooks) { await click('.rose-layout-page-actions .rose-dropdown-button-danger'); assert.ok(find('[role="alert"]').textContent.trim(), 'Oops.'); }); - }); diff --git a/ui/core/tests/acceptance/host-catalogs/host-sets-test.js b/ui/core/tests/acceptance/host-catalogs/host-sets-test.js index aee192343..779d66689 100644 --- a/ui/core/tests/acceptance/host-catalogs/host-sets-test.js +++ b/ui/core/tests/acceptance/host-catalogs/host-sets-test.js @@ -25,8 +25,8 @@ module('Acceptance | host-catalogs | host sets', function (hooks) { org: null, project: null, hostCatalog: null, - host: null - } + host: null, + }, }; const urls = { globalScope: null, @@ -56,7 +56,7 @@ module('Acceptance | host-catalogs | host sets', function (hooks) { }); instances.hostSet = this.server.create('host-set', { scope: instances.scopes.project, - hostCatalog: instances.hostCatalog + hostCatalog: instances.hostCatalog, }); // Generate route URLs for resources urls.globalScope = `/scopes/global/scopes`; @@ -132,7 +132,10 @@ module('Acceptance | host-catalogs | host sets', function (hooks) { }); await visit(urls.newHostSet); await click('[type="submit"]'); - assert.ok(find('[role="alert"]').textContent.trim(), 'The request was invalid.'); + assert.ok( + find('[role="alert"]').textContent.trim(), + 'The request was invalid.' + ); assert.ok( find('.rose-form-error-message').textContent.trim(), 'Name is required.' @@ -147,7 +150,10 @@ module('Acceptance | host-catalogs | host sets', function (hooks) { await fillIn('[name="name"]', 'random string'); await click('.rose-form-actions [type="submit"]'); assert.equal(currentURL(), urls.hostSet); - assert.equal(this.server.schema.hostSets.all().models[0].name, 'random string'); + assert.equal( + this.server.schema.hostSets.all().models[0].name, + 'random string' + ); }); test('can cancel changes to existing host', async function (assert) { @@ -185,7 +191,10 @@ module('Acceptance | host-catalogs | host sets', function (hooks) { await click('form [type="button"]', 'Activate edit mode'); await fillIn('[name="name"]', 'random string'); await click('[type="submit"]'); - assert.ok(find('[role="alert"]').textContent.trim(), 'The request was invalid.'); + assert.ok( + find('[role="alert"]').textContent.trim(), + 'The request was invalid.' + ); assert.ok( find('.rose-form-error-message').textContent.trim(), 'Name is required.' @@ -207,7 +216,10 @@ module('Acceptance | host-catalogs | host sets', function (hooks) { assert.ok(find('.rose-dialog')); await click('.rose-dialog-footer button:first-child'); assert.equal(currentURL(), urls.hostSets); - assert.notEqual(this.server.schema.hostSets.all().models[0].name, 'random string'); + assert.notEqual( + this.server.schema.hostSets.all().models[0].name, + 'random string' + ); } }); @@ -226,7 +238,10 @@ module('Acceptance | host-catalogs | host sets', function (hooks) { assert.ok(find('.rose-dialog')); await click('.rose-dialog-footer button:last-child'); assert.equal(currentURL(), urls.hostSet); - assert.notEqual(this.server.schema.hostSets.all().models[0].name, 'random string'); + assert.notEqual( + this.server.schema.hostSets.all().models[0].name, + 'random string' + ); } }); @@ -279,5 +294,4 @@ module('Acceptance | host-catalogs | host sets', function (hooks) { await click('.rose-layout-page-actions .rose-dropdown-button-danger'); assert.ok(find('[role="alert"]').textContent.trim(), 'Oops.'); }); - }); diff --git a/ui/core/tests/acceptance/host-catalogs/host-sets/hosts-test.js b/ui/core/tests/acceptance/host-catalogs/host-sets/hosts-test.js index 224b479b4..3140961c7 100644 --- a/ui/core/tests/acceptance/host-catalogs/host-sets/hosts-test.js +++ b/ui/core/tests/acceptance/host-catalogs/host-sets/hosts-test.js @@ -1,5 +1,12 @@ import { module, test } from 'qunit'; -import { visit, currentURL, click, find, findAll, fillIn } from '@ember/test-helpers'; +import { + visit, + currentURL, + click, + find, + findAll, + fillIn, +} from '@ember/test-helpers'; import { setupApplicationTest } from 'ember-qunit'; import setupMirage from 'ember-cli-mirage/test-support/setup-mirage'; import a11yAudit from 'ember-a11y-testing/test-support/audit'; @@ -23,8 +30,8 @@ module('Acceptance | host-catalogs | host-sets | hosts', function (hooks) { org: null, project: null, hostCatalog: null, - host: null - } + host: null, + }, }; const urls = { globalScope: null, @@ -50,9 +57,13 @@ module('Acceptance | host-catalogs | host-sets | hosts', function (hooks) { type: 'project', scope: { id: instances.scopes.org.id, type: 'org' }, }); - instances.hostCatalog = this.server.create('host-catalog', { - scope: instances.scopes.project, - }, 'withChildren'); + instances.hostCatalog = this.server.create( + 'host-catalog', + { + scope: instances.scopes.project, + }, + 'withChildren' + ); instances.hostSet = this.server.schema.hostSets.all().models[0]; // Generate route URLs for resources urls.globalScope = `/scopes/global/scopes`; @@ -108,7 +119,7 @@ module('Acceptance | host-catalogs | host-sets | hosts', function (hooks) { assert.ok(find('[role="alert"]')); }); - test('visiting add hosts', async function(assert) { + test('visiting add hosts', async function (assert) { assert.expect(1); await visit(urls.addHosts); await a11yAudit(); @@ -120,7 +131,7 @@ module('Acceptance | host-catalogs | host-sets | hosts', function (hooks) { instances.hostSet.update({ hostIds: [] }); await visit(urls.hostSetHosts); assert.equal(findAll('tbody tr').length, 0); - await click('.rose-layout-page-actions a:nth-child(2)') + await click('.rose-layout-page-actions a:nth-child(2)'); assert.equal(currentURL(), urls.addHosts); // Click three times to select, unselect, then reselect (for coverage) await click('tbody label'); @@ -138,7 +149,7 @@ module('Acceptance | host-catalogs | host-sets | hosts', function (hooks) { assert.equal(findAll('tbody tr').length, count); await click('tbody tr .rose-dropdown-button-danger'); assert.equal(findAll('tbody tr').length, count - 1); - await click('.rose-layout-page-actions a:nth-child(2)') + await click('.rose-layout-page-actions a:nth-child(2)'); assert.equal(currentURL(), urls.addHosts); await click('tbody label'); await click('form [type="button"]'); @@ -179,7 +190,7 @@ module('Acceptance | host-catalogs | host-sets | hosts', function (hooks) { instances.hostSet.update({ hostIds: [] }); await visit(urls.hostSet); assert.equal(findAll('tbody tr').length, 0); - await click('.rose-layout-page-actions a:nth-child(1)') + await click('.rose-layout-page-actions a:nth-child(1)'); assert.equal(currentURL(), urls.createAndAddHost); await fillIn('[name="name"]', 'Test Name'); await fillIn('[name="description"]', 'description'); @@ -236,5 +247,4 @@ module('Acceptance | host-catalogs | host-sets | hosts', function (hooks) { await click('form [type="submit"]'); assert.ok(find('[role="alert"]')); }); - }); diff --git a/ui/core/tests/acceptance/host-catalogs/hosts-test.js b/ui/core/tests/acceptance/host-catalogs/hosts-test.js index ba1acae76..b8c5520e6 100644 --- a/ui/core/tests/acceptance/host-catalogs/hosts-test.js +++ b/ui/core/tests/acceptance/host-catalogs/hosts-test.js @@ -25,8 +25,8 @@ module('Acceptance | host-catalogs | hosts', function (hooks) { org: null, project: null, hostCatalog: null, - host: null - } + host: null, + }, }; const urls = { globalScope: null, @@ -56,7 +56,7 @@ module('Acceptance | host-catalogs | hosts', function (hooks) { }); instances.host = this.server.create('host', { scope: instances.scopes.project, - hostCatalog: instances.hostCatalog + hostCatalog: instances.hostCatalog, }); // Generate route URLs for resources urls.globalScope = `/scopes/global/scopes`; @@ -132,7 +132,10 @@ module('Acceptance | host-catalogs | hosts', function (hooks) { }); await visit(urls.newHost); await click('[type="submit"]'); - assert.ok(find('[role="alert"]').textContent.trim(), 'The request was invalid.'); + assert.ok( + find('[role="alert"]').textContent.trim(), + 'The request was invalid.' + ); assert.ok( find('.rose-form-error-message').textContent.trim(), 'Name is required.' @@ -147,7 +150,10 @@ module('Acceptance | host-catalogs | hosts', function (hooks) { await fillIn('[name="name"]', 'random string'); await click('.rose-form-actions [type="submit"]'); assert.equal(currentURL(), urls.host); - assert.equal(this.server.schema.hosts.all().models[0].name, 'random string'); + assert.equal( + this.server.schema.hosts.all().models[0].name, + 'random string' + ); }); test('can cancel changes to existing host', async function (assert) { @@ -185,7 +191,10 @@ module('Acceptance | host-catalogs | hosts', function (hooks) { await click('form [type="button"]', 'Activate edit mode'); await fillIn('[name="name"]', 'random string'); await click('[type="submit"]'); - assert.ok(find('[role="alert"]').textContent.trim(), 'The request was invalid.'); + assert.ok( + find('[role="alert"]').textContent.trim(), + 'The request was invalid.' + ); assert.ok( find('.rose-form-error-message').textContent.trim(), 'Name is required.' @@ -207,7 +216,10 @@ module('Acceptance | host-catalogs | hosts', function (hooks) { assert.ok(find('.rose-dialog')); await click('.rose-dialog-footer button:first-child'); assert.equal(currentURL(), urls.hosts); - assert.notEqual(this.server.schema.hosts.all().models[0].name, 'random string'); + assert.notEqual( + this.server.schema.hosts.all().models[0].name, + 'random string' + ); } }); @@ -226,7 +238,10 @@ module('Acceptance | host-catalogs | hosts', function (hooks) { assert.ok(find('.rose-dialog')); await click('.rose-dialog-footer button:last-child'); assert.equal(currentURL(), urls.host); - assert.notEqual(this.server.schema.hosts.all().models[0].name, 'random string'); + assert.notEqual( + this.server.schema.hosts.all().models[0].name, + 'random string' + ); } }); @@ -279,5 +294,4 @@ module('Acceptance | host-catalogs | hosts', function (hooks) { await click('.rose-layout-page-actions .rose-dropdown-button-danger'); assert.ok(find('[role="alert"]').textContent.trim(), 'Oops.'); }); - }); diff --git a/ui/core/tests/acceptance/roles-test.js b/ui/core/tests/acceptance/roles-test.js index aa2f2fac1..449580a1c 100644 --- a/ui/core/tests/acceptance/roles-test.js +++ b/ui/core/tests/acceptance/roles-test.js @@ -44,9 +44,13 @@ module('Acceptance | roles', function (hooks) { type: 'project', scope: { id: instances.scopes.org.id, type: instances.scopes.org.type }, }); - instances.role = this.server.create('role', { - scope: instances.scopes.org, - }, 'withPrincipals'); + instances.role = this.server.create( + 'role', + { + scope: instances.scopes.org, + }, + 'withPrincipals' + ); urls.roles = `/scopes/${instances.scopes.org.id}/roles`; urls.role = `${urls.roles}/${instances.role.id}`; urls.newRole = `${urls.roles}/new`; diff --git a/ui/core/tests/acceptance/roles/grants-test.js b/ui/core/tests/acceptance/roles/grants-test.js index f7391742b..d13eb4f46 100644 --- a/ui/core/tests/acceptance/roles/grants-test.js +++ b/ui/core/tests/acceptance/roles/grants-test.js @@ -1,5 +1,12 @@ import { module, test } from 'qunit'; -import { visit, currentURL, click, fillIn, find, findAll } from '@ember/test-helpers'; +import { + visit, + currentURL, + click, + fillIn, + find, + findAll, +} from '@ember/test-helpers'; import { setupApplicationTest } from 'ember-qunit'; import setupMirage from 'ember-cli-mirage/test-support/setup-mirage'; import a11yAudit from 'ember-a11y-testing/test-support/audit'; @@ -56,25 +63,35 @@ module('Acceptance | roles | grants', function (hooks) { assert.equal(findAll(`${grantsForm} [name="grant"]`).length, grantsCount); }); - test('update a grant', async function(assert) { + test('update a grant', async function (assert) { assert.expect(1); - this.server.post('/roles/:idMethod', (_, { params: { idMethod }, requestBody }) => { - const attrs = JSON.parse(requestBody); - assert.equal(attrs.grant_strings[0], 'id=123,action=delete', "A grant is updated"); - const id = idMethod.split(':')[0]; - return { id }; - }); + this.server.post( + '/roles/:idMethod', + (_, { params: { idMethod }, requestBody }) => { + const attrs = JSON.parse(requestBody); + assert.equal( + attrs.grant_strings[0], + 'id=123,action=delete', + 'A grant is updated' + ); + const id = idMethod.split(':')[0]; + return { id }; + } + ); await visit(urls.grants); await fillIn(`${grantsForm} [name="grant"]`, 'id=123,action=delete'); await click('.rose-form-actions [type="submit"]:not(:disabled)'); }); - test('cancel a grant update', async function(assert) { + test('cancel a grant update', async function (assert) { assert.expect(1); await visit(urls.grants); await fillIn(`${grantsForm} [name="grant"]`, 'id=123,action=delete'); await click('.rose-form-actions button:not([type="submit"])'); - assert.notEqual(find(`${grantsForm} [name="grant"]`).value, 'id=123,action=delete'); + assert.notEqual( + find(`${grantsForm} [name="grant"]`).value, + 'id=123,action=delete' + ); }); test('shows error message on grant update', async function (assert) { @@ -92,28 +109,34 @@ module('Acceptance | roles | grants', function (hooks) { ); }); await visit(urls.grants); - assert.equal(findAll(`${grantsForm} [name="grant"]`).length, - grantsCount); + assert.equal(findAll(`${grantsForm} [name="grant"]`).length, grantsCount); await fillIn(`${grantsForm} [name="grant"]`, 'id=123,action=delete'); await click('.rose-form-actions [type="submit"]:not(:disabled)'); assert.ok(find('[role="alert"]')); }); - test('create a grant', async function(assert) { + test('create a grant', async function (assert) { assert.expect(1); - this.server.post('/roles/:idMethod', (_, { params: { idMethod }, requestBody }) => { - const attrs = JSON.parse(requestBody); - assert.equal(attrs.grant_strings.length, grantsCount + 1, "A grant is created"); - const id = idMethod.split(':')[0]; - return { id }; - }); + this.server.post( + '/roles/:idMethod', + (_, { params: { idMethod }, requestBody }) => { + const attrs = JSON.parse(requestBody); + assert.equal( + attrs.grant_strings.length, + grantsCount + 1, + 'A grant is created' + ); + const id = idMethod.split(':')[0]; + return { id }; + } + ); await visit(urls.grants); await fillIn(`${newGrantForm} [name="grant"]`, 'id=123,action=delete'); await click(`${newGrantForm} [type="submit"]:not(:disabled)`); await click('.rose-form-actions [type="submit"]:not(:disabled)'); }); - test('cancel a grant creation', async function(assert) { + test('cancel a grant creation', async function (assert) { assert.expect(1); await visit(urls.grants); await fillIn(`${newGrantForm} [name="grant"]`, 'id=123,action=delete'); @@ -137,24 +160,25 @@ module('Acceptance | roles | grants', function (hooks) { ); }); await visit(urls.grants); - assert.equal(findAll(`${grantsForm} [name="grant"]`).length, - grantsCount); + assert.equal(findAll(`${grantsForm} [name="grant"]`).length, grantsCount); await fillIn(`${newGrantForm} [name="grant"]`, 'id=123,action=delete'); await click(`${newGrantForm} [type="submit"]:not(:disabled)`); await click('.rose-form-actions [type="submit"]:not(:disabled)'); assert.ok(find('[role="alert"]')); }); - test('delete a grant', async function(assert) { + test('delete a grant', async function (assert) { assert.expect(1); await visit(urls.grants); await click(`${grantsForm} button:not([type="submit"])`); await click('.rose-form-actions [type="submit"]:not(:disabled)'); - assert.equal(findAll(`${grantsForm} [name="grant"]`).length, - grantsCount - 1); + assert.equal( + findAll(`${grantsForm} [name="grant"]`).length, + grantsCount - 1 + ); }); - test('cancel a grant remove', async function(assert) { + test('cancel a grant remove', async function (assert) { assert.expect(1); await visit(urls.grants); await click(`${grantsForm} button`); @@ -177,8 +201,7 @@ module('Acceptance | roles | grants', function (hooks) { ); }); await visit(urls.grants); - assert.equal(findAll(`${grantsForm} [name="grant"]`).length, - grantsCount); + assert.equal(findAll(`${grantsForm} [name="grant"]`).length, grantsCount); await click(`${grantsForm} button:not([type="submit"])`); await click('.rose-form-actions [type="submit"]:not(:disabled)'); assert.ok(find('[role="alert"]')); diff --git a/ui/core/tests/acceptance/roles/principals-test.js b/ui/core/tests/acceptance/roles/principals-test.js index cebf3031b..b26cfe398 100644 --- a/ui/core/tests/acceptance/roles/principals-test.js +++ b/ui/core/tests/acceptance/roles/principals-test.js @@ -37,10 +37,16 @@ module('Acceptance | roles | principals', function (hooks) { type: 'org', scope: { id: 'global', type: 'global' }, }); - instances.role = this.server.create('role', { - scope: instances.scopes.org, - }, 'withPrincipals'); - principalsCount = this.server.db.roles[0].userIds.length + this.server.db.roles[0].groupIds.length; + instances.role = this.server.create( + 'role', + { + scope: instances.scopes.org, + }, + 'withPrincipals' + ); + principalsCount = + this.server.db.roles[0].userIds.length + + this.server.db.roles[0].groupIds.length; urls.roles = `/scopes/${instances.scopes.org.id}/roles`; urls.role = `${urls.roles}/${instances.role.id}`; urls.rolePrincipals = `${urls.role}/principals`; @@ -88,7 +94,7 @@ module('Acceptance | roles | principals', function (hooks) { instances.role.update({ userIds: [], groupIds: [] }); await visit(urls.rolePrincipals); assert.equal(findAll('tbody tr').length, 0); - await click('.rose-layout-page-actions a') + await click('.rose-layout-page-actions a'); assert.equal(currentURL(), urls.addPrincipals); // Click three times to select, unselect, then reselect (for coverage) await click('tbody label'); @@ -106,7 +112,7 @@ module('Acceptance | roles | principals', function (hooks) { // Remove a principal to populate association view await click('tbody tr .rose-dropdown-button-danger'); assert.equal(findAll('tbody tr').length, principalsCount - 1); - await click('.rose-layout-page-actions a') + await click('.rose-layout-page-actions a'); assert.equal(currentURL(), urls.addPrincipals); await click('tbody label'); await click('form [type="button"]'); diff --git a/ui/core/tests/acceptance/scopes-test.js b/ui/core/tests/acceptance/scopes-test.js index 9af9e1da8..df294416b 100644 --- a/ui/core/tests/acceptance/scopes-test.js +++ b/ui/core/tests/acceptance/scopes-test.js @@ -26,7 +26,7 @@ module('Acceptance | scopes', function (hooks) { org2: null, project: null, project2: null, - } + }, }; const urls = { globalScope: null, @@ -91,9 +91,7 @@ module('Acceptance | scopes', function (hooks) { assert.expect(1); this.server.get('/scopes/:id', ({ scopes }, { params: { id } }) => { const scope = scopes.find(id); - const response = (id === 'global') - ? new Response(404) - : scope; + const response = id === 'global' ? new Response(404) : scope; return response; }); await visit(urls.globalScope); @@ -128,7 +126,9 @@ module('Acceptance | scopes', function (hooks) { await visit(urls.projectScope); await a11yAudit(); assert.equal(currentURL(), urls.projectScopeEdit); - await click('.rose-header-nav .rose-dropdown + .rose-dropdown a:nth-child(2)'); + await click( + '.rose-header-nav .rose-dropdown + .rose-dropdown a:nth-child(2)' + ); assert.equal(currentURL(), urls.project2ScopeEdit); }); @@ -193,7 +193,10 @@ module('Acceptance | scopes', function (hooks) { }); await visit(urls.newOrgScope); await click('[type="submit"]'); - assert.ok(find('[role="alert"]').textContent.trim(), 'The request was invalid.'); + assert.ok( + find('[role="alert"]').textContent.trim(), + 'The request was invalid.' + ); assert.ok( find('.rose-form-error-message').textContent.trim(), 'Name is required.' @@ -208,7 +211,10 @@ module('Acceptance | scopes', function (hooks) { await fillIn('[name="name"]', 'random string'); await click('.rose-form-actions [type="submit"]'); assert.equal(currentURL(), urls.orgScopeEdit); - assert.equal(this.server.schema.scopes.where({ type: 'org' }).models[0].name, 'random string'); + assert.equal( + this.server.schema.scopes.where({ type: 'org' }).models[0].name, + 'random string' + ); }); test('can cancel changes to existing scope', async function (assert) { @@ -246,7 +252,10 @@ module('Acceptance | scopes', function (hooks) { await click('form [type="button"]', 'Activate edit mode'); await fillIn('[name="name"]', 'random string'); await click('[type="submit"]'); - assert.ok(find('[role="alert"]').textContent.trim(), 'The request was invalid.'); + assert.ok( + find('[role="alert"]').textContent.trim(), + 'The request was invalid.' + ); assert.ok( find('.rose-form-error-message').textContent.trim(), 'Name is required.' @@ -268,7 +277,10 @@ module('Acceptance | scopes', function (hooks) { assert.ok(find('.rose-dialog')); await click('.rose-dialog-footer button:first-child'); assert.equal(currentURL(), urls.globalScope); - assert.notEqual(this.server.schema.scopes.where({ type: 'org' }).models[0].name, 'random string'); + assert.notEqual( + this.server.schema.scopes.where({ type: 'org' }).models[0].name, + 'random string' + ); } }); @@ -287,7 +299,10 @@ module('Acceptance | scopes', function (hooks) { assert.ok(find('.rose-dialog')); await click('.rose-dialog-footer button:last-child'); assert.equal(currentURL(), urls.orgScopeEdit); - assert.notEqual(this.server.schema.scopes.where({ type: 'org' }).models[0].name, 'random string'); + assert.notEqual( + this.server.schema.scopes.where({ type: 'org' }).models[0].name, + 'random string' + ); } }); @@ -340,5 +355,4 @@ module('Acceptance | scopes', function (hooks) { await click('.rose-layout-page-actions .rose-dropdown-button-danger'); assert.ok(find('[role="alert"]').textContent.trim(), 'Oops.'); }); - }); diff --git a/ui/core/tests/acceptance/sessions-test.js b/ui/core/tests/acceptance/sessions-test.js index 6026eaa24..15a263925 100644 --- a/ui/core/tests/acceptance/sessions-test.js +++ b/ui/core/tests/acceptance/sessions-test.js @@ -39,13 +39,33 @@ module('Acceptance | sessions', function (hooks) { type: 'project', scope: { id: instances.scopes.org.id, type: instances.scopes.org.type }, }); - this.server.createList('group', 1, { scope: instances.scopes.org }, 'withMembers'); - this.server.createList('host-catalog', 1, { scope: instances.scopes.project }, 'withChildren'); - this.server.createList('target', 1, { scope: instances.scopes.project }, 'withRandomHostSets'); - instances.sessions = this.server.createList('session', 3, { - scope: instances.scopes.project, - status: 'active' - }, 'withAssociations'); + this.server.createList( + 'group', + 1, + { scope: instances.scopes.org }, + 'withMembers' + ); + this.server.createList( + 'host-catalog', + 1, + { scope: instances.scopes.project }, + 'withChildren' + ); + this.server.createList( + 'target', + 1, + { scope: instances.scopes.project }, + 'withRandomHostSets' + ); + instances.sessions = this.server.createList( + 'session', + 3, + { + scope: instances.scopes.project, + status: 'active', + }, + 'withAssociations' + ); urls.sessions = `/scopes/${instances.scopes.project.id}/sessions`; }); @@ -65,7 +85,7 @@ module('Acceptance | sessions', function (hooks) { assert.expect(2); instances.sessions[0].update({ userId: null, - targetId: null + targetId: null, }); authenticateSession({}); later(async () => { diff --git a/ui/core/tests/acceptance/targets-test.js b/ui/core/tests/acceptance/targets-test.js index 594756b52..d6907503c 100644 --- a/ui/core/tests/acceptance/targets-test.js +++ b/ui/core/tests/acceptance/targets-test.js @@ -24,7 +24,7 @@ module('Acceptance | targets', function (hooks) { global: null, org: null, project: null, - } + }, }; const urls = { globalScope: null, @@ -121,7 +121,10 @@ module('Acceptance | targets', function (hooks) { }); await visit(urls.newTarget); await click('[type="submit"]'); - assert.ok(find('[role="alert"]').textContent.trim(), 'The request was invalid.'); + assert.ok( + find('[role="alert"]').textContent.trim(), + 'The request was invalid.' + ); assert.ok( find('.rose-form-error-message').textContent.trim(), 'Name is required.' @@ -136,7 +139,10 @@ module('Acceptance | targets', function (hooks) { await fillIn('[name="name"]', 'random string'); await click('.rose-form-actions [type="submit"]'); assert.equal(currentURL(), urls.target); - assert.equal(this.server.schema.targets.all().models[0].name, 'random string'); + assert.equal( + this.server.schema.targets.all().models[0].name, + 'random string' + ); }); test('can cancel changes to existing target', async function (assert) { @@ -174,7 +180,10 @@ module('Acceptance | targets', function (hooks) { await click('form [type="button"]', 'Activate edit mode'); await fillIn('[name="name"]', 'random string'); await click('[type="submit"]'); - assert.ok(find('[role="alert"]').textContent.trim(), 'The request was invalid.'); + assert.ok( + find('[role="alert"]').textContent.trim(), + 'The request was invalid.' + ); assert.ok( find('.rose-form-error-message').textContent.trim(), 'Name is required.' @@ -196,7 +205,10 @@ module('Acceptance | targets', function (hooks) { assert.ok(find('.rose-dialog')); await click('.rose-dialog-footer button:first-child'); assert.equal(currentURL(), urls.targets); - assert.notEqual(this.server.schema.targets.all().models[0].name, 'random string'); + assert.notEqual( + this.server.schema.targets.all().models[0].name, + 'random string' + ); } }); @@ -215,7 +227,10 @@ module('Acceptance | targets', function (hooks) { assert.ok(find('.rose-dialog')); await click('.rose-dialog-footer button:last-child'); assert.equal(currentURL(), urls.target); - assert.notEqual(this.server.schema.targets.all().models[0].name, 'random string'); + assert.notEqual( + this.server.schema.targets.all().models[0].name, + 'random string' + ); } }); @@ -268,5 +283,4 @@ module('Acceptance | targets', function (hooks) { await click('.rose-layout-page-actions .rose-dropdown-button-danger'); assert.ok(find('[role="alert"]').textContent.trim(), 'Oops.'); }); - }); diff --git a/ui/core/tests/acceptance/targets/host-sets-test.js b/ui/core/tests/acceptance/targets/host-sets-test.js index 21655f223..3ea6f4a07 100644 --- a/ui/core/tests/acceptance/targets/host-sets-test.js +++ b/ui/core/tests/acceptance/targets/host-sets-test.js @@ -20,7 +20,7 @@ module('Acceptance | targets | host-sets', function (hooks) { global: null, org: null, project: null, - } + }, }; const urls = { globalScope: null, @@ -43,12 +43,16 @@ module('Acceptance | targets | host-sets', function (hooks) { type: 'project', scope: { id: instances.scopes.org.id, type: 'org' }, }); - instances.hostCatalog = this.server.create('host-catalog', { - scope: instances.scopes.project - }, 'withChildren'); + instances.hostCatalog = this.server.create( + 'host-catalog', + { + scope: instances.scopes.project, + }, + 'withChildren' + ); instances.target = this.server.create('target', { scope: instances.scopes.project, - hostSets: instances.hostCatalog.hostSets + hostSets: instances.hostCatalog.hostSets, }); // Generate route URLs for resources urls.globalScope = `/scopes/global/scopes`; @@ -106,7 +110,7 @@ module('Acceptance | targets | host-sets', function (hooks) { instances.target.update({ hostSetIds: [] }); await visit(urls.targetHostSets); assert.equal(findAll('tbody tr').length, 0); - await click('.rose-layout-page-actions a') + await click('.rose-layout-page-actions a'); assert.equal(currentURL(), urls.targetAddHostSets); // Click three times to select, unselect, then reselect (for coverage) await click('tbody label'); @@ -125,7 +129,7 @@ module('Acceptance | targets | host-sets', function (hooks) { // 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') + await click('.rose-layout-page-actions a'); assert.equal(currentURL(), urls.targetAddHostSets); await click('tbody label'); await click('form [type="button"]'); @@ -156,5 +160,4 @@ module('Acceptance | targets | host-sets', function (hooks) { assert.equal(currentURL(), urls.targetAddHostSets); assert.equal(instances.target.hostSets.length, 0); }); - }); diff --git a/ui/core/tests/acceptance/users/accounts-test.js b/ui/core/tests/acceptance/users/accounts-test.js index aa941f5ed..8b7caaba6 100644 --- a/ui/core/tests/acceptance/users/accounts-test.js +++ b/ui/core/tests/acceptance/users/accounts-test.js @@ -38,9 +38,13 @@ module('Acceptance | users | accounts', function (hooks) { type: 'org', scope: { id: 'global', type: 'global' }, }); - this.server.create('auth-method', { - scope: instances.scopes.org - }, 'withAccountsAndUsers'); + this.server.create( + 'auth-method', + { + scope: instances.scopes.org, + }, + 'withAccountsAndUsers' + ); instances.user = this.server.schema.users.all().models[0]; accountsCount = instances.user.accountIds.length; urls.users = `/scopes/${instances.scopes.org.id}/users`; @@ -85,7 +89,7 @@ module('Acceptance | users | accounts', function (hooks) { assert.ok(find('[role="alert"]')); }); - test('visiting account add accounts', async function(assert) { + test('visiting account add accounts', async function (assert) { assert.expect(1); await visit(urls.addAccounts); await a11yAudit(); @@ -114,7 +118,7 @@ module('Acceptance | users | accounts', function (hooks) { assert.equal(findAll('tbody tr').length, accountsCount); await click('tbody tr .rose-dropdown-button-danger'); assert.equal(findAll('tbody tr').length, accountsCount - 1); - await click('.rose-layout-page-actions a') + await click('.rose-layout-page-actions a'); assert.equal(currentURL(), urls.addAccounts); await click('tbody label'); await click('form [type="button"]'); diff --git a/ui/core/tests/integration/components/copyable-test.js b/ui/core/tests/integration/components/copyable-test.js index 0123c353c..f00a0b00a 100644 --- a/ui/core/tests/integration/components/copyable-test.js +++ b/ui/core/tests/integration/components/copyable-test.js @@ -3,11 +3,13 @@ import { setupRenderingTest } from 'ember-qunit'; import { render, find } from '@ember/test-helpers'; import { hbs } from 'ember-cli-htmlbars'; -module('Integration | Component | copyable', function(hooks) { +module('Integration | Component | copyable', function (hooks) { setupRenderingTest(hooks); - test('it renders', async function(assert) { - await render(hbs`text`); + test('it renders', async function (assert) { + await render( + hbs`text` + ); assert.ok(find('.copyable')); assert.equal(find('.copyable-content').textContent.trim(), 'text'); assert.equal(find('.copyable-button').textContent.trim(), 'Copy me'); diff --git a/ui/core/tests/integration/components/doc-link-test.js b/ui/core/tests/integration/components/doc-link-test.js index 43d0b9a1c..9ccf97487 100644 --- a/ui/core/tests/integration/components/doc-link-test.js +++ b/ui/core/tests/integration/components/doc-link-test.js @@ -3,10 +3,10 @@ import { setupRenderingTest } from 'ember-qunit'; import { render, find } from '@ember/test-helpers'; import { hbs } from 'ember-cli-htmlbars'; -module('Integration | Component | doc-link', function(hooks) { +module('Integration | Component | doc-link', function (hooks) { setupRenderingTest(hooks); - test('it renders', async function(assert) { + test('it renders', async function (assert) { assert.expect(1); await render(hbs``); assert.ok(find('.doc-link .rose-icon.large')); diff --git a/ui/core/tests/integration/components/error/message-test.js b/ui/core/tests/integration/components/error/message-test.js index c33db71b8..f7e92a534 100644 --- a/ui/core/tests/integration/components/error/message-test.js +++ b/ui/core/tests/integration/components/error/message-test.js @@ -54,7 +54,10 @@ module('Integration | Component | error/message', function (hooks) { find('.rose-message-title').textContent.trim(), 'Something went wrong' ); - assert.equal(find('.rose-message-subtitle').textContent.trim(), 'Error 599'); + assert.equal( + find('.rose-message-subtitle').textContent.trim(), + 'Error 599' + ); assert.equal( find('.rose-message-description').textContent.trim(), 'Please contact your administrator or try again later.' diff --git a/ui/core/tests/integration/components/pending-confirmations-test.js b/ui/core/tests/integration/components/pending-confirmations-test.js index 8c51630f4..865e32866 100644 --- a/ui/core/tests/integration/components/pending-confirmations-test.js +++ b/ui/core/tests/integration/components/pending-confirmations-test.js @@ -3,10 +3,10 @@ import { setupRenderingTest } from 'ember-qunit'; import { render, findAll, click } from '@ember/test-helpers'; import { hbs } from 'ember-cli-htmlbars'; -module('Integration | Component | pending-confirmations', function(hooks) { +module('Integration | Component | pending-confirmations', function (hooks) { setupRenderingTest(hooks); - test('it renders pending confirmations', async function(assert) { + test('it renders pending confirmations', async function (assert) { assert.expect(2); const service = this.owner.lookup('service:confirm'); service.enabled = true; @@ -25,7 +25,7 @@ module('Integration | Component | pending-confirmations', function(hooks) { assert.equal(findAll('.pending').length, 1, 'One pending confirmations'); }); - test('it exposes a confirm action that confirms the confirmation', async function(assert) { + test('it exposes a confirm action that confirms the confirmation', async function (assert) { assert.expect(3); const service = this.owner.lookup('service:confirm'); service.enabled = true; @@ -41,7 +41,7 @@ module('Integration | Component | pending-confirmations', function(hooks) { assert.ok(confirmation.done, 'Confirmation is done'); }); - test('it exposes a dismiss action that dismisses the confirmation', async function(assert) { + test('it exposes a dismiss action that dismisses the confirmation', async function (assert) { assert.expect(3); const service = this.owner.lookup('service:confirm'); service.enabled = true; diff --git a/ui/core/tests/integration/helpers/doc-url-test.js b/ui/core/tests/integration/helpers/doc-url-test.js index d4263c1eb..26d017095 100644 --- a/ui/core/tests/integration/helpers/doc-url-test.js +++ b/ui/core/tests/integration/helpers/doc-url-test.js @@ -4,10 +4,10 @@ import { render } from '@ember/test-helpers'; import { hbs } from 'ember-cli-htmlbars'; import config from 'ember-get-config'; -module('Integration | Helper | doc-url', function(hooks) { +module('Integration | Helper | doc-url', function (hooks) { setupRenderingTest(hooks); - test('it renders a URL generated from the documentation config', async function(assert) { + test('it renders a URL generated from the documentation config', async function (assert) { assert.expect(3); const baseURL = config.documentation.baseURL; const path = config.documentation.topics.account; @@ -17,13 +17,12 @@ module('Integration | Helper | doc-url', function(hooks) { assert.equal(this.element.textContent.trim(), `${baseURL}${path}`); }); - test('it throws an error if the specified documentation path cannot be found', async function(assert) { + test('it throws an error if the specified documentation path cannot be found', async function (assert) { assert.expect(2); const helper = this.owner.lookup('helper:doc-url'); - assert.ok(helper.compute(['account']), 'Specified document exists.') + assert.ok(helper.compute(['account']), 'Specified document exists.'); assert.throws(() => { helper.compute(['no.such.doc']); }, 'Specified documentation was not found, so the helper threw an error.'); }); - }); diff --git a/ui/core/tests/integration/helpers/format-date-iso-human-test.js b/ui/core/tests/integration/helpers/format-date-iso-human-test.js index 94eec92fa..da705231b 100644 --- a/ui/core/tests/integration/helpers/format-date-iso-human-test.js +++ b/ui/core/tests/integration/helpers/format-date-iso-human-test.js @@ -3,11 +3,11 @@ import { setupRenderingTest } from 'ember-qunit'; import { render } from '@ember/test-helpers'; import { hbs } from 'ember-cli-htmlbars'; -module('Integration | Helper | format-date-iso-human', function(hooks) { +module('Integration | Helper | format-date-iso-human', function (hooks) { setupRenderingTest(hooks); // Replace this with your real tests. - test('it renders', async function(assert) { + test('it renders', async function (assert) { this.set('inputValue', new Date('2020-01-01T00:00:00.999Z')); await render(hbs`{{format-date-iso-human inputValue}}`); diff --git a/ui/core/tests/integration/helpers/format-date-iso-test.js b/ui/core/tests/integration/helpers/format-date-iso-test.js index 2954d3890..12770ef76 100644 --- a/ui/core/tests/integration/helpers/format-date-iso-test.js +++ b/ui/core/tests/integration/helpers/format-date-iso-test.js @@ -3,11 +3,11 @@ import { setupRenderingTest } from 'ember-qunit'; import { render } from '@ember/test-helpers'; import { hbs } from 'ember-cli-htmlbars'; -module('Integration | Helper | format-date-iso', function(hooks) { +module('Integration | Helper | format-date-iso', function (hooks) { setupRenderingTest(hooks); // Replace this with your real tests. - test('it renders', async function(assert) { + test('it renders', async function (assert) { this.set('inputValue', new Date('2020-01-01T00:00:00.999Z')); await render(hbs`{{format-date-iso inputValue}}`); diff --git a/ui/core/tests/unit/authenticators/password-test.js b/ui/core/tests/unit/authenticators/password-test.js index 0314aed17..35e872b48 100644 --- a/ui/core/tests/unit/authenticators/password-test.js +++ b/ui/core/tests/unit/authenticators/password-test.js @@ -27,9 +27,12 @@ module('Unit | Authenticator | password', function (hooks) { test('it adds an authorization header to application adapter on restore', async function (assert) { assert.expect(1); const mockData = { id: 'token1234', token: 'token1234' }; - this.server.get(authenticator.buildTokenValidationEndpointURL(mockData.id), () => { - return new Response(200); - }); + this.server.get( + authenticator.buildTokenValidationEndpointURL(mockData.id), + () => { + return new Response(200); + } + ); authenticator.restore(mockData); assert.equal(applicationAdapter.headers.Authorization, 'Bearer token1234'); }); diff --git a/ui/core/tests/unit/controllers/scopes/scope/auth-methods/auth-method/accounts/account/set-password-test.js b/ui/core/tests/unit/controllers/scopes/scope/auth-methods/auth-method/accounts/account/set-password-test.js index daed6ca0a..12914dc5a 100644 --- a/ui/core/tests/unit/controllers/scopes/scope/auth-methods/auth-method/accounts/account/set-password-test.js +++ b/ui/core/tests/unit/controllers/scopes/scope/auth-methods/auth-method/accounts/account/set-password-test.js @@ -1,12 +1,17 @@ import { module, test } from 'qunit'; import { setupTest } from 'ember-qunit'; -module('Unit | Controller | scopes/scope/auth-methods/auth-method/accounts/account/set-password', function(hooks) { - setupTest(hooks); +module( + 'Unit | Controller | scopes/scope/auth-methods/auth-method/accounts/account/set-password', + function (hooks) { + setupTest(hooks); - // TODO: 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/set-password'); - assert.ok(controller); - }); -}); + // TODO: 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/set-password' + ); + assert.ok(controller); + }); + } +); diff --git a/ui/core/tests/unit/controllers/scopes/scope/groups/group/members-test.js b/ui/core/tests/unit/controllers/scopes/scope/groups/group/members-test.js index 026f44d5e..46dbddf58 100644 --- a/ui/core/tests/unit/controllers/scopes/scope/groups/group/members-test.js +++ b/ui/core/tests/unit/controllers/scopes/scope/groups/group/members-test.js @@ -1,12 +1,16 @@ import { module, test } from 'qunit'; import { setupTest } from 'ember-qunit'; -module('Unit | Controller | scopes/scope/groups/group/members', function(hooks) { +module('Unit | Controller | scopes/scope/groups/group/members', function ( + hooks +) { setupTest(hooks); // TODO: Replace this with your real tests. - test('it exists', function(assert) { - let controller = this.owner.lookup('controller:scopes/scope/groups/group/members'); + test('it exists', function (assert) { + let controller = this.owner.lookup( + 'controller:scopes/scope/groups/group/members' + ); assert.ok(controller); }); }); diff --git a/ui/core/tests/unit/controllers/scopes/scope/host-catalogs-test.js b/ui/core/tests/unit/controllers/scopes/scope/host-catalogs-test.js index 0c055095e..7ddd14806 100644 --- a/ui/core/tests/unit/controllers/scopes/scope/host-catalogs-test.js +++ b/ui/core/tests/unit/controllers/scopes/scope/host-catalogs-test.js @@ -1,11 +1,11 @@ import { module, test } from 'qunit'; import { setupTest } from 'ember-qunit'; -module('Unit | Controller | scopes/scope/host-catalogs', function(hooks) { +module('Unit | Controller | scopes/scope/host-catalogs', function (hooks) { setupTest(hooks); // TODO: Replace this with your real tests. - test('it exists', function(assert) { + test('it exists', function (assert) { let controller = this.owner.lookup('controller:scopes/scope/host-catalogs'); assert.ok(controller); }); diff --git a/ui/core/tests/unit/controllers/scopes/scope/host-catalogs/host-catalog-test.js b/ui/core/tests/unit/controllers/scopes/scope/host-catalogs/host-catalog-test.js index 32b03a815..fa1b421b7 100644 --- a/ui/core/tests/unit/controllers/scopes/scope/host-catalogs/host-catalog-test.js +++ b/ui/core/tests/unit/controllers/scopes/scope/host-catalogs/host-catalog-test.js @@ -1,12 +1,16 @@ import { module, test } from 'qunit'; import { setupTest } from 'ember-qunit'; -module('Unit | Controller | scopes/scope/host-catalogs/host-catalog', function(hooks) { +module('Unit | Controller | scopes/scope/host-catalogs/host-catalog', function ( + hooks +) { setupTest(hooks); // TODO: Replace this with your real tests. - test('it exists', function(assert) { - let controller = this.owner.lookup('controller:scopes/scope/host-catalogs/host-catalog'); + test('it exists', function (assert) { + let controller = this.owner.lookup( + 'controller:scopes/scope/host-catalogs/host-catalog' + ); assert.ok(controller); }); }); diff --git a/ui/core/tests/unit/controllers/scopes/scope/host-catalogs/host-catalog/host-sets-test.js b/ui/core/tests/unit/controllers/scopes/scope/host-catalogs/host-catalog/host-sets-test.js index 677b9c125..0cf42a0bf 100644 --- a/ui/core/tests/unit/controllers/scopes/scope/host-catalogs/host-catalog/host-sets-test.js +++ b/ui/core/tests/unit/controllers/scopes/scope/host-catalogs/host-catalog/host-sets-test.js @@ -1,12 +1,17 @@ import { module, test } from 'qunit'; import { setupTest } from 'ember-qunit'; -module('Unit | Controller | scopes/scope/host-catalogs/host-catalog/host-sets', function(hooks) { - setupTest(hooks); +module( + 'Unit | Controller | scopes/scope/host-catalogs/host-catalog/host-sets', + function (hooks) { + setupTest(hooks); - // TODO: Replace this with your real tests. - test('it exists', function(assert) { - let controller = this.owner.lookup('controller:scopes/scope/host-catalogs/host-catalog/host-sets'); - assert.ok(controller); - }); -}); + // TODO: Replace this with your real tests. + test('it exists', function (assert) { + let controller = this.owner.lookup( + 'controller:scopes/scope/host-catalogs/host-catalog/host-sets' + ); + assert.ok(controller); + }); + } +); diff --git a/ui/core/tests/unit/controllers/scopes/scope/host-catalogs/host-catalog/host-sets/host-set-test.js b/ui/core/tests/unit/controllers/scopes/scope/host-catalogs/host-catalog/host-sets/host-set-test.js index 49736df08..f2c89bd20 100644 --- a/ui/core/tests/unit/controllers/scopes/scope/host-catalogs/host-catalog/host-sets/host-set-test.js +++ b/ui/core/tests/unit/controllers/scopes/scope/host-catalogs/host-catalog/host-sets/host-set-test.js @@ -1,12 +1,17 @@ import { module, test } from 'qunit'; import { setupTest } from 'ember-qunit'; -module('Unit | Controller | scopes/scope/host-catalogs/host-catalog/host-sets/host-set', function(hooks) { - setupTest(hooks); +module( + 'Unit | Controller | scopes/scope/host-catalogs/host-catalog/host-sets/host-set', + function (hooks) { + setupTest(hooks); - // TODO: Replace this with your real tests. - test('it exists', function(assert) { - let controller = this.owner.lookup('controller:scopes/scope/host-catalogs/host-catalog/host-sets/host-set'); - assert.ok(controller); - }); -}); + // TODO: Replace this with your real tests. + test('it exists', function (assert) { + let controller = this.owner.lookup( + 'controller:scopes/scope/host-catalogs/host-catalog/host-sets/host-set' + ); + assert.ok(controller); + }); + } +); diff --git a/ui/core/tests/unit/controllers/scopes/scope/host-catalogs/host-catalog/host-sets/host-set/add-hosts-test.js b/ui/core/tests/unit/controllers/scopes/scope/host-catalogs/host-catalog/host-sets/host-set/add-hosts-test.js index 36621e39d..b4bd8c272 100644 --- a/ui/core/tests/unit/controllers/scopes/scope/host-catalogs/host-catalog/host-sets/host-set/add-hosts-test.js +++ b/ui/core/tests/unit/controllers/scopes/scope/host-catalogs/host-catalog/host-sets/host-set/add-hosts-test.js @@ -1,12 +1,17 @@ import { module, test } from 'qunit'; import { setupTest } from 'ember-qunit'; -module('Unit | Controller | scopes/scope/host-catalogs/host-catalog/host-sets/host-set/add-hosts', function(hooks) { - setupTest(hooks); +module( + 'Unit | Controller | scopes/scope/host-catalogs/host-catalog/host-sets/host-set/add-hosts', + function (hooks) { + setupTest(hooks); - // TODO: Replace this with your real tests. - test('it exists', function(assert) { - let controller = this.owner.lookup('controller:scopes/scope/host-catalogs/host-catalog/host-sets/host-set/add-hosts'); - assert.ok(controller); - }); -}); + // TODO: Replace this with your real tests. + test('it exists', function (assert) { + let controller = this.owner.lookup( + 'controller:scopes/scope/host-catalogs/host-catalog/host-sets/host-set/add-hosts' + ); + assert.ok(controller); + }); + } +); diff --git a/ui/core/tests/unit/controllers/scopes/scope/host-catalogs/host-catalog/host-sets/host-set/create-and-add-host-test.js b/ui/core/tests/unit/controllers/scopes/scope/host-catalogs/host-catalog/host-sets/host-set/create-and-add-host-test.js index bebd552c3..8a0028241 100644 --- a/ui/core/tests/unit/controllers/scopes/scope/host-catalogs/host-catalog/host-sets/host-set/create-and-add-host-test.js +++ b/ui/core/tests/unit/controllers/scopes/scope/host-catalogs/host-catalog/host-sets/host-set/create-and-add-host-test.js @@ -1,12 +1,17 @@ import { module, test } from 'qunit'; import { setupTest } from 'ember-qunit'; -module('Unit | Controller | scopes/scope/host-catalogs/host-catalog/host-sets/host-set/create-and-add-host', function(hooks) { - setupTest(hooks); +module( + 'Unit | Controller | scopes/scope/host-catalogs/host-catalog/host-sets/host-set/create-and-add-host', + function (hooks) { + setupTest(hooks); - // TODO: Replace this with your real tests. - test('it exists', function(assert) { - let controller = this.owner.lookup('controller:scopes/scope/host-catalogs/host-catalog/host-sets/host-set/create-and-add-host'); - assert.ok(controller); - }); -}); + // TODO: Replace this with your real tests. + test('it exists', function (assert) { + let controller = this.owner.lookup( + 'controller:scopes/scope/host-catalogs/host-catalog/host-sets/host-set/create-and-add-host' + ); + assert.ok(controller); + }); + } +); diff --git a/ui/core/tests/unit/controllers/scopes/scope/host-catalogs/host-catalog/host-sets/host-set/hosts-test.js b/ui/core/tests/unit/controllers/scopes/scope/host-catalogs/host-catalog/host-sets/host-set/hosts-test.js index 0d3c2be24..08257086f 100644 --- a/ui/core/tests/unit/controllers/scopes/scope/host-catalogs/host-catalog/host-sets/host-set/hosts-test.js +++ b/ui/core/tests/unit/controllers/scopes/scope/host-catalogs/host-catalog/host-sets/host-set/hosts-test.js @@ -1,12 +1,17 @@ import { module, test } from 'qunit'; import { setupTest } from 'ember-qunit'; -module('Unit | Controller | scopes/scope/host-catalogs/host-catalog/host-sets/host-set/hosts', function(hooks) { - setupTest(hooks); +module( + 'Unit | Controller | scopes/scope/host-catalogs/host-catalog/host-sets/host-set/hosts', + function (hooks) { + setupTest(hooks); - // TODO: Replace this with your real tests. - test('it exists', function(assert) { - let controller = this.owner.lookup('controller:scopes/scope/host-catalogs/host-catalog/host-sets/host-set/hosts'); - assert.ok(controller); - }); -}); + // TODO: Replace this with your real tests. + test('it exists', function (assert) { + let controller = this.owner.lookup( + 'controller:scopes/scope/host-catalogs/host-catalog/host-sets/host-set/hosts' + ); + assert.ok(controller); + }); + } +); diff --git a/ui/core/tests/unit/controllers/scopes/scope/host-catalogs/host-catalog/hosts-test.js b/ui/core/tests/unit/controllers/scopes/scope/host-catalogs/host-catalog/hosts-test.js index f19f65477..23b72aaed 100644 --- a/ui/core/tests/unit/controllers/scopes/scope/host-catalogs/host-catalog/hosts-test.js +++ b/ui/core/tests/unit/controllers/scopes/scope/host-catalogs/host-catalog/hosts-test.js @@ -1,12 +1,17 @@ import { module, test } from 'qunit'; import { setupTest } from 'ember-qunit'; -module('Unit | Controller | scopes/scope/host-catalogs/host-catalog/hosts', function(hooks) { - setupTest(hooks); +module( + 'Unit | Controller | scopes/scope/host-catalogs/host-catalog/hosts', + function (hooks) { + setupTest(hooks); - // TODO: Replace this with your real tests. - test('it exists', function(assert) { - let controller = this.owner.lookup('controller:scopes/scope/host-catalogs/host-catalog/hosts'); - assert.ok(controller); - }); -}); + // TODO: Replace this with your real tests. + test('it exists', function (assert) { + let controller = this.owner.lookup( + 'controller:scopes/scope/host-catalogs/host-catalog/hosts' + ); + assert.ok(controller); + }); + } +); diff --git a/ui/core/tests/unit/controllers/scopes/scope/host-catalogs/host-catalog/hosts/host-test.js b/ui/core/tests/unit/controllers/scopes/scope/host-catalogs/host-catalog/hosts/host-test.js index 15bc7b716..6598f1dcb 100644 --- a/ui/core/tests/unit/controllers/scopes/scope/host-catalogs/host-catalog/hosts/host-test.js +++ b/ui/core/tests/unit/controllers/scopes/scope/host-catalogs/host-catalog/hosts/host-test.js @@ -1,12 +1,17 @@ import { module, test } from 'qunit'; import { setupTest } from 'ember-qunit'; -module('Unit | Controller | scopes/scope/host-catalogs/host-catalog/hosts/host', function(hooks) { - setupTest(hooks); +module( + 'Unit | Controller | scopes/scope/host-catalogs/host-catalog/hosts/host', + function (hooks) { + setupTest(hooks); - // TODO: Replace this with your real tests. - test('it exists', function(assert) { - let controller = this.owner.lookup('controller:scopes/scope/host-catalogs/host-catalog/hosts/host'); - assert.ok(controller); - }); -}); + // TODO: Replace this with your real tests. + test('it exists', function (assert) { + let controller = this.owner.lookup( + 'controller:scopes/scope/host-catalogs/host-catalog/hosts/host' + ); + assert.ok(controller); + }); + } +); diff --git a/ui/core/tests/unit/controllers/scopes/scope/roles/role/grants-test.js b/ui/core/tests/unit/controllers/scopes/scope/roles/role/grants-test.js index 41a7c1fcc..92448108d 100644 --- a/ui/core/tests/unit/controllers/scopes/scope/roles/role/grants-test.js +++ b/ui/core/tests/unit/controllers/scopes/scope/roles/role/grants-test.js @@ -1,12 +1,14 @@ import { module, test } from 'qunit'; import { setupTest } from 'ember-qunit'; -module('Unit | Controller | scopes/scope/roles/role/grants', function(hooks) { +module('Unit | Controller | scopes/scope/roles/role/grants', function (hooks) { setupTest(hooks); // TODO: Replace this with your real tests. - test('it exists', function(assert) { - let controller = this.owner.lookup('controller:scopes/scope/roles/role/grants'); + test('it exists', function (assert) { + let controller = this.owner.lookup( + 'controller:scopes/scope/roles/role/grants' + ); assert.ok(controller); }); }); diff --git a/ui/core/tests/unit/controllers/scopes/scope/roles/role/principals-test.js b/ui/core/tests/unit/controllers/scopes/scope/roles/role/principals-test.js index 7ca6f77b9..14de1a906 100644 --- a/ui/core/tests/unit/controllers/scopes/scope/roles/role/principals-test.js +++ b/ui/core/tests/unit/controllers/scopes/scope/roles/role/principals-test.js @@ -1,12 +1,16 @@ import { module, test } from 'qunit'; import { setupTest } from 'ember-qunit'; -module('Unit | Controller | scopes/scope/roles/role/principals', function(hooks) { +module('Unit | Controller | scopes/scope/roles/role/principals', function ( + hooks +) { setupTest(hooks); // TODO: Replace this with your real tests. - test('it exists', function(assert) { - let controller = this.owner.lookup('controller:scopes/scope/roles/role/principals'); + test('it exists', function (assert) { + let controller = this.owner.lookup( + 'controller:scopes/scope/roles/role/principals' + ); assert.ok(controller); }); }); diff --git a/ui/core/tests/unit/controllers/scopes/scope/scopes-test.js b/ui/core/tests/unit/controllers/scopes/scope/scopes-test.js index 6a6b181de..6c9cce714 100644 --- a/ui/core/tests/unit/controllers/scopes/scope/scopes-test.js +++ b/ui/core/tests/unit/controllers/scopes/scope/scopes-test.js @@ -1,11 +1,11 @@ import { module, test } from 'qunit'; import { setupTest } from 'ember-qunit'; -module('Unit | Controller | scopes/scope/scopes', function(hooks) { +module('Unit | Controller | scopes/scope/scopes', function (hooks) { setupTest(hooks); // TODO: Replace this with your real tests. - test('it exists', function(assert) { + test('it exists', function (assert) { let controller = this.owner.lookup('controller:scopes/scope/scopes'); assert.ok(controller); }); diff --git a/ui/core/tests/unit/controllers/scopes/scope/sessions-test.js b/ui/core/tests/unit/controllers/scopes/scope/sessions-test.js index 58e72740c..757e0168a 100644 --- a/ui/core/tests/unit/controllers/scopes/scope/sessions-test.js +++ b/ui/core/tests/unit/controllers/scopes/scope/sessions-test.js @@ -1,11 +1,11 @@ import { module, test } from 'qunit'; import { setupTest } from 'ember-qunit'; -module('Unit | Controller | scopes/scope/sessions', function(hooks) { +module('Unit | Controller | scopes/scope/sessions', function (hooks) { setupTest(hooks); // TODO: Replace this with your real tests. - test('it exists', function(assert) { + test('it exists', function (assert) { let controller = this.owner.lookup('controller:scopes/scope/sessions'); assert.ok(controller); }); diff --git a/ui/core/tests/unit/controllers/scopes/scope/targets-test.js b/ui/core/tests/unit/controllers/scopes/scope/targets-test.js index 16e710ca3..659ce9907 100644 --- a/ui/core/tests/unit/controllers/scopes/scope/targets-test.js +++ b/ui/core/tests/unit/controllers/scopes/scope/targets-test.js @@ -1,11 +1,11 @@ import { module, test } from 'qunit'; import { setupTest } from 'ember-qunit'; -module('Unit | Controller | scopes/scope/targets', function(hooks) { +module('Unit | Controller | scopes/scope/targets', function (hooks) { setupTest(hooks); // TODO: Replace this with your real tests. - test('it exists', function(assert) { + test('it exists', function (assert) { let controller = this.owner.lookup('controller:scopes/scope/targets'); assert.ok(controller); }); diff --git a/ui/core/tests/unit/controllers/scopes/scope/targets/target-test.js b/ui/core/tests/unit/controllers/scopes/scope/targets/target-test.js index d6e49be75..76e8c2676 100644 --- a/ui/core/tests/unit/controllers/scopes/scope/targets/target-test.js +++ b/ui/core/tests/unit/controllers/scopes/scope/targets/target-test.js @@ -1,12 +1,14 @@ import { module, test } from 'qunit'; import { setupTest } from 'ember-qunit'; -module('Unit | Controller | scopes/scope/targets/target', function(hooks) { +module('Unit | Controller | scopes/scope/targets/target', 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'); + test('it exists', function (assert) { + let controller = this.owner.lookup( + 'controller:scopes/scope/targets/target' + ); assert.ok(controller); }); }); diff --git a/ui/core/tests/unit/controllers/scopes/scope/targets/target/add-host-sets-test.js b/ui/core/tests/unit/controllers/scopes/scope/targets/target/add-host-sets-test.js index bef629ad8..bd24fcaf8 100644 --- a/ui/core/tests/unit/controllers/scopes/scope/targets/target/add-host-sets-test.js +++ b/ui/core/tests/unit/controllers/scopes/scope/targets/target/add-host-sets-test.js @@ -1,12 +1,17 @@ import { module, test } from 'qunit'; import { setupTest } from 'ember-qunit'; -module('Unit | Controller | scopes/scope/targets/target/add-host-sets', function(hooks) { - setupTest(hooks); +module( + 'Unit | Controller | scopes/scope/targets/target/add-host-sets', + 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'); - assert.ok(controller); - }); -}); + // 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' + ); + assert.ok(controller); + }); + } +); diff --git a/ui/core/tests/unit/controllers/scopes/scope/targets/target/host-sets-test.js b/ui/core/tests/unit/controllers/scopes/scope/targets/target/host-sets-test.js index d2f2ef7ea..1cc1b3aa1 100644 --- a/ui/core/tests/unit/controllers/scopes/scope/targets/target/host-sets-test.js +++ b/ui/core/tests/unit/controllers/scopes/scope/targets/target/host-sets-test.js @@ -1,12 +1,16 @@ import { module, test } from 'qunit'; import { setupTest } from 'ember-qunit'; -module('Unit | Controller | scopes/scope/targets/target/host-sets', function(hooks) { +module('Unit | Controller | scopes/scope/targets/target/host-sets', 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'); + test('it exists', function (assert) { + let controller = this.owner.lookup( + 'controller:scopes/scope/targets/target/host-sets' + ); assert.ok(controller); }); }); diff --git a/ui/core/tests/unit/controllers/scopes/scope/users/user/accounts-test.js b/ui/core/tests/unit/controllers/scopes/scope/users/user/accounts-test.js index 5bbf27235..f11f78bce 100644 --- a/ui/core/tests/unit/controllers/scopes/scope/users/user/accounts-test.js +++ b/ui/core/tests/unit/controllers/scopes/scope/users/user/accounts-test.js @@ -1,12 +1,16 @@ import { module, test } from 'qunit'; import { setupTest } from 'ember-qunit'; -module('Unit | Controller | scopes/scope/users/user/accounts', function(hooks) { +module('Unit | Controller | scopes/scope/users/user/accounts', function ( + hooks +) { setupTest(hooks); // TODO: Replace this with your real tests. - test('it exists', function(assert) { - let controller = this.owner.lookup('controller:scopes/scope/users/user/accounts'); + test('it exists', function (assert) { + let controller = this.owner.lookup( + 'controller:scopes/scope/users/user/accounts' + ); assert.ok(controller); }); }); diff --git a/ui/core/tests/unit/controllers/scopes/scope/users/user/add-accounts-test.js b/ui/core/tests/unit/controllers/scopes/scope/users/user/add-accounts-test.js index a71b3d2e0..451f97d18 100644 --- a/ui/core/tests/unit/controllers/scopes/scope/users/user/add-accounts-test.js +++ b/ui/core/tests/unit/controllers/scopes/scope/users/user/add-accounts-test.js @@ -1,12 +1,16 @@ import { module, test } from 'qunit'; import { setupTest } from 'ember-qunit'; -module('Unit | Controller | scopes/scope/users/user/add-accounts', function(hooks) { +module('Unit | Controller | scopes/scope/users/user/add-accounts', function ( + hooks +) { setupTest(hooks); // Replace this with your real tests. - test('it exists', function(assert) { - let controller = this.owner.lookup('controller:scopes/scope/users/user/add-accounts'); + test('it exists', function (assert) { + let controller = this.owner.lookup( + 'controller:scopes/scope/users/user/add-accounts' + ); assert.ok(controller); }); }); diff --git a/ui/core/tests/unit/routes/account-test.js b/ui/core/tests/unit/routes/account-test.js index ab640d01d..dd2269f79 100644 --- a/ui/core/tests/unit/routes/account-test.js +++ b/ui/core/tests/unit/routes/account-test.js @@ -1,10 +1,10 @@ import { module, test } from 'qunit'; import { setupTest } from 'ember-qunit'; -module('Unit | Route | account', function(hooks) { +module('Unit | Route | account', function (hooks) { setupTest(hooks); - test('it exists', function(assert) { + test('it exists', function (assert) { let route = this.owner.lookup('route:account'); assert.ok(route); }); diff --git a/ui/core/tests/unit/routes/account/change-password-test.js b/ui/core/tests/unit/routes/account/change-password-test.js index ee6856d35..12707843f 100644 --- a/ui/core/tests/unit/routes/account/change-password-test.js +++ b/ui/core/tests/unit/routes/account/change-password-test.js @@ -1,10 +1,10 @@ import { module, test } from 'qunit'; import { setupTest } from 'ember-qunit'; -module('Unit | Route | account/change-password', function(hooks) { +module('Unit | Route | account/change-password', function (hooks) { setupTest(hooks); - test('it exists', function(assert) { + test('it exists', function (assert) { let route = this.owner.lookup('route:account/change-password'); assert.ok(route); }); diff --git a/ui/core/tests/unit/routes/scopes/scope/edit-test.js b/ui/core/tests/unit/routes/scopes/scope/edit-test.js index 0b4334ea0..2c018e7f4 100644 --- a/ui/core/tests/unit/routes/scopes/scope/edit-test.js +++ b/ui/core/tests/unit/routes/scopes/scope/edit-test.js @@ -1,10 +1,10 @@ import { module, test } from 'qunit'; import { setupTest } from 'ember-qunit'; -module('Unit | Route | scopes/scope/edit', function(hooks) { +module('Unit | Route | scopes/scope/edit', function (hooks) { setupTest(hooks); - test('it exists', function(assert) { + test('it exists', function (assert) { let route = this.owner.lookup('route:scopes/scope/edit'); assert.ok(route); }); diff --git a/ui/core/tests/unit/routes/scopes/scope/host-catalogs-test.js b/ui/core/tests/unit/routes/scopes/scope/host-catalogs-test.js index 391eaa2c5..ea06d2979 100644 --- a/ui/core/tests/unit/routes/scopes/scope/host-catalogs-test.js +++ b/ui/core/tests/unit/routes/scopes/scope/host-catalogs-test.js @@ -1,10 +1,10 @@ import { module, test } from 'qunit'; import { setupTest } from 'ember-qunit'; -module('Unit | Route | scopes/scope/host-catalogs', function(hooks) { +module('Unit | Route | scopes/scope/host-catalogs', function (hooks) { setupTest(hooks); - test('it exists', function(assert) { + test('it exists', function (assert) { let route = this.owner.lookup('route:scopes/scope/host-catalogs'); assert.ok(route); }); diff --git a/ui/core/tests/unit/routes/scopes/scope/host-catalogs/host-catalog-test.js b/ui/core/tests/unit/routes/scopes/scope/host-catalogs/host-catalog-test.js index cefbf9457..7fc517187 100644 --- a/ui/core/tests/unit/routes/scopes/scope/host-catalogs/host-catalog-test.js +++ b/ui/core/tests/unit/routes/scopes/scope/host-catalogs/host-catalog-test.js @@ -1,11 +1,15 @@ import { module, test } from 'qunit'; import { setupTest } from 'ember-qunit'; -module('Unit | Route | scopes/scope/host-catalogs/host-catalog', function(hooks) { +module('Unit | Route | scopes/scope/host-catalogs/host-catalog', function ( + hooks +) { setupTest(hooks); - test('it exists', function(assert) { - let route = this.owner.lookup('route:scopes/scope/host-catalogs/host-catalog'); + test('it exists', function (assert) { + let route = this.owner.lookup( + 'route:scopes/scope/host-catalogs/host-catalog' + ); assert.ok(route); }); }); diff --git a/ui/core/tests/unit/routes/scopes/scope/host-catalogs/host-catalog/host-sets-test.js b/ui/core/tests/unit/routes/scopes/scope/host-catalogs/host-catalog/host-sets-test.js index 8178e1810..738b9e120 100644 --- a/ui/core/tests/unit/routes/scopes/scope/host-catalogs/host-catalog/host-sets-test.js +++ b/ui/core/tests/unit/routes/scopes/scope/host-catalogs/host-catalog/host-sets-test.js @@ -1,11 +1,16 @@ import { module, test } from 'qunit'; import { setupTest } from 'ember-qunit'; -module('Unit | Route | scopes/scope/host-catalogs/host-catalog/host-sets', function(hooks) { - setupTest(hooks); +module( + 'Unit | Route | scopes/scope/host-catalogs/host-catalog/host-sets', + function (hooks) { + setupTest(hooks); - test('it exists', function(assert) { - let route = this.owner.lookup('route:scopes/scope/host-catalogs/host-catalog/host-sets'); - assert.ok(route); - }); -}); + test('it exists', function (assert) { + let route = this.owner.lookup( + 'route:scopes/scope/host-catalogs/host-catalog/host-sets' + ); + assert.ok(route); + }); + } +); diff --git a/ui/core/tests/unit/routes/scopes/scope/host-catalogs/host-catalog/host-sets/host-set-test.js b/ui/core/tests/unit/routes/scopes/scope/host-catalogs/host-catalog/host-sets/host-set-test.js index 56f46755c..af2ce2972 100644 --- a/ui/core/tests/unit/routes/scopes/scope/host-catalogs/host-catalog/host-sets/host-set-test.js +++ b/ui/core/tests/unit/routes/scopes/scope/host-catalogs/host-catalog/host-sets/host-set-test.js @@ -1,11 +1,16 @@ import { module, test } from 'qunit'; import { setupTest } from 'ember-qunit'; -module('Unit | Route | scopes/scope/host-catalogs/host-catalog/host-sets/host-set', function(hooks) { - setupTest(hooks); +module( + 'Unit | Route | scopes/scope/host-catalogs/host-catalog/host-sets/host-set', + function (hooks) { + setupTest(hooks); - test('it exists', function(assert) { - let route = this.owner.lookup('route:scopes/scope/host-catalogs/host-catalog/host-sets/host-set'); - assert.ok(route); - }); -}); + test('it exists', function (assert) { + let route = this.owner.lookup( + 'route:scopes/scope/host-catalogs/host-catalog/host-sets/host-set' + ); + assert.ok(route); + }); + } +); diff --git a/ui/core/tests/unit/routes/scopes/scope/host-catalogs/host-catalog/host-sets/host-set/add-hosts-test.js b/ui/core/tests/unit/routes/scopes/scope/host-catalogs/host-catalog/host-sets/host-set/add-hosts-test.js index cfcfcffdb..d478b589e 100644 --- a/ui/core/tests/unit/routes/scopes/scope/host-catalogs/host-catalog/host-sets/host-set/add-hosts-test.js +++ b/ui/core/tests/unit/routes/scopes/scope/host-catalogs/host-catalog/host-sets/host-set/add-hosts-test.js @@ -1,11 +1,16 @@ import { module, test } from 'qunit'; import { setupTest } from 'ember-qunit'; -module('Unit | Route | scopes/scope/host-catalogs/host-catalog/host-sets/host-set/add-hosts', function(hooks) { - setupTest(hooks); +module( + 'Unit | Route | scopes/scope/host-catalogs/host-catalog/host-sets/host-set/add-hosts', + function (hooks) { + setupTest(hooks); - test('it exists', function(assert) { - let route = this.owner.lookup('route:scopes/scope/host-catalogs/host-catalog/host-sets/host-set/add-hosts'); - assert.ok(route); - }); -}); + test('it exists', function (assert) { + let route = this.owner.lookup( + 'route:scopes/scope/host-catalogs/host-catalog/host-sets/host-set/add-hosts' + ); + assert.ok(route); + }); + } +); diff --git a/ui/core/tests/unit/routes/scopes/scope/host-catalogs/host-catalog/host-sets/host-set/create-and-add-host-test.js b/ui/core/tests/unit/routes/scopes/scope/host-catalogs/host-catalog/host-sets/host-set/create-and-add-host-test.js index 9c8d8b120..4f5f0c4a2 100644 --- a/ui/core/tests/unit/routes/scopes/scope/host-catalogs/host-catalog/host-sets/host-set/create-and-add-host-test.js +++ b/ui/core/tests/unit/routes/scopes/scope/host-catalogs/host-catalog/host-sets/host-set/create-and-add-host-test.js @@ -1,11 +1,16 @@ import { module, test } from 'qunit'; import { setupTest } from 'ember-qunit'; -module('Unit | Route | scopes/scope/host-catalogs/host-catalog/host-sets/host-set/create-and-add-host', function(hooks) { - setupTest(hooks); +module( + 'Unit | Route | scopes/scope/host-catalogs/host-catalog/host-sets/host-set/create-and-add-host', + function (hooks) { + setupTest(hooks); - test('it exists', function(assert) { - let route = this.owner.lookup('route:scopes/scope/host-catalogs/host-catalog/host-sets/host-set/create-and-add-host'); - assert.ok(route); - }); -}); + test('it exists', function (assert) { + let route = this.owner.lookup( + 'route:scopes/scope/host-catalogs/host-catalog/host-sets/host-set/create-and-add-host' + ); + assert.ok(route); + }); + } +); diff --git a/ui/core/tests/unit/routes/scopes/scope/host-catalogs/host-catalog/host-sets/host-set/hosts-test.js b/ui/core/tests/unit/routes/scopes/scope/host-catalogs/host-catalog/host-sets/host-set/hosts-test.js index 728788fe7..e89d90536 100644 --- a/ui/core/tests/unit/routes/scopes/scope/host-catalogs/host-catalog/host-sets/host-set/hosts-test.js +++ b/ui/core/tests/unit/routes/scopes/scope/host-catalogs/host-catalog/host-sets/host-set/hosts-test.js @@ -1,11 +1,16 @@ import { module, test } from 'qunit'; import { setupTest } from 'ember-qunit'; -module('Unit | Route | scopes/scope/host-catalogs/host-catalog/host-sets/host-set/hosts', function(hooks) { - setupTest(hooks); +module( + 'Unit | Route | scopes/scope/host-catalogs/host-catalog/host-sets/host-set/hosts', + function (hooks) { + setupTest(hooks); - test('it exists', function(assert) { - let route = this.owner.lookup('route:scopes/scope/host-catalogs/host-catalog/host-sets/host-set/hosts'); - assert.ok(route); - }); -}); + test('it exists', function (assert) { + let route = this.owner.lookup( + 'route:scopes/scope/host-catalogs/host-catalog/host-sets/host-set/hosts' + ); + assert.ok(route); + }); + } +); diff --git a/ui/core/tests/unit/routes/scopes/scope/host-catalogs/host-catalog/host-sets/host-set/index-test.js b/ui/core/tests/unit/routes/scopes/scope/host-catalogs/host-catalog/host-sets/host-set/index-test.js index f2c55644a..27a6837d1 100644 --- a/ui/core/tests/unit/routes/scopes/scope/host-catalogs/host-catalog/host-sets/host-set/index-test.js +++ b/ui/core/tests/unit/routes/scopes/scope/host-catalogs/host-catalog/host-sets/host-set/index-test.js @@ -1,11 +1,16 @@ import { module, test } from 'qunit'; import { setupTest } from 'ember-qunit'; -module('Unit | Route | scopes/scope/host-catalogs/host-catalog/host-sets/host-set/index', function(hooks) { - setupTest(hooks); +module( + 'Unit | Route | scopes/scope/host-catalogs/host-catalog/host-sets/host-set/index', + function (hooks) { + setupTest(hooks); - test('it exists', function(assert) { - let route = this.owner.lookup('route:scopes/scope/host-catalogs/host-catalog/host-sets/host-set/index'); - assert.ok(route); - }); -}); + test('it exists', function (assert) { + let route = this.owner.lookup( + 'route:scopes/scope/host-catalogs/host-catalog/host-sets/host-set/index' + ); + assert.ok(route); + }); + } +); diff --git a/ui/core/tests/unit/routes/scopes/scope/host-catalogs/host-catalog/host-sets/index-test.js b/ui/core/tests/unit/routes/scopes/scope/host-catalogs/host-catalog/host-sets/index-test.js index c158018f5..a93cac047 100644 --- a/ui/core/tests/unit/routes/scopes/scope/host-catalogs/host-catalog/host-sets/index-test.js +++ b/ui/core/tests/unit/routes/scopes/scope/host-catalogs/host-catalog/host-sets/index-test.js @@ -1,11 +1,16 @@ import { module, test } from 'qunit'; import { setupTest } from 'ember-qunit'; -module('Unit | Route | scopes/scope/host-catalogs/host-catalog/host-sets/index', function(hooks) { - setupTest(hooks); +module( + 'Unit | Route | scopes/scope/host-catalogs/host-catalog/host-sets/index', + function (hooks) { + setupTest(hooks); - test('it exists', function(assert) { - let route = this.owner.lookup('route:scopes/scope/host-catalogs/host-catalog/host-sets/index'); - assert.ok(route); - }); -}); + test('it exists', function (assert) { + let route = this.owner.lookup( + 'route:scopes/scope/host-catalogs/host-catalog/host-sets/index' + ); + assert.ok(route); + }); + } +); diff --git a/ui/core/tests/unit/routes/scopes/scope/host-catalogs/host-catalog/host-sets/new-test.js b/ui/core/tests/unit/routes/scopes/scope/host-catalogs/host-catalog/host-sets/new-test.js index 3216994c2..62e7be844 100644 --- a/ui/core/tests/unit/routes/scopes/scope/host-catalogs/host-catalog/host-sets/new-test.js +++ b/ui/core/tests/unit/routes/scopes/scope/host-catalogs/host-catalog/host-sets/new-test.js @@ -1,11 +1,16 @@ import { module, test } from 'qunit'; import { setupTest } from 'ember-qunit'; -module('Unit | Route | scopes/scope/host-catalogs/host-catalog/host-sets/new', function(hooks) { - setupTest(hooks); +module( + 'Unit | Route | scopes/scope/host-catalogs/host-catalog/host-sets/new', + function (hooks) { + setupTest(hooks); - test('it exists', function(assert) { - let route = this.owner.lookup('route:scopes/scope/host-catalogs/host-catalog/host-sets/new'); - assert.ok(route); - }); -}); + test('it exists', function (assert) { + let route = this.owner.lookup( + 'route:scopes/scope/host-catalogs/host-catalog/host-sets/new' + ); + assert.ok(route); + }); + } +); diff --git a/ui/core/tests/unit/routes/scopes/scope/host-catalogs/host-catalog/hosts-test.js b/ui/core/tests/unit/routes/scopes/scope/host-catalogs/host-catalog/hosts-test.js index 7c2891d51..fed34f8de 100644 --- a/ui/core/tests/unit/routes/scopes/scope/host-catalogs/host-catalog/hosts-test.js +++ b/ui/core/tests/unit/routes/scopes/scope/host-catalogs/host-catalog/hosts-test.js @@ -1,11 +1,16 @@ import { module, test } from 'qunit'; import { setupTest } from 'ember-qunit'; -module('Unit | Route | scopes/scope/host-catalogs/host-catalog/hosts', function(hooks) { - setupTest(hooks); +module( + 'Unit | Route | scopes/scope/host-catalogs/host-catalog/hosts', + function (hooks) { + setupTest(hooks); - test('it exists', function(assert) { - let route = this.owner.lookup('route:scopes/scope/host-catalogs/host-catalog/hosts'); - assert.ok(route); - }); -}); + test('it exists', function (assert) { + let route = this.owner.lookup( + 'route:scopes/scope/host-catalogs/host-catalog/hosts' + ); + assert.ok(route); + }); + } +); diff --git a/ui/core/tests/unit/routes/scopes/scope/host-catalogs/host-catalog/hosts/host-test.js b/ui/core/tests/unit/routes/scopes/scope/host-catalogs/host-catalog/hosts/host-test.js index d40fb98a9..69b038391 100644 --- a/ui/core/tests/unit/routes/scopes/scope/host-catalogs/host-catalog/hosts/host-test.js +++ b/ui/core/tests/unit/routes/scopes/scope/host-catalogs/host-catalog/hosts/host-test.js @@ -1,11 +1,16 @@ import { module, test } from 'qunit'; import { setupTest } from 'ember-qunit'; -module('Unit | Route | scopes/scope/host-catalogs/host-catalog/hosts/host', function(hooks) { - setupTest(hooks); +module( + 'Unit | Route | scopes/scope/host-catalogs/host-catalog/hosts/host', + function (hooks) { + setupTest(hooks); - test('it exists', function(assert) { - let route = this.owner.lookup('route:scopes/scope/host-catalogs/host-catalog/hosts/host'); - assert.ok(route); - }); -}); + test('it exists', function (assert) { + let route = this.owner.lookup( + 'route:scopes/scope/host-catalogs/host-catalog/hosts/host' + ); + assert.ok(route); + }); + } +); diff --git a/ui/core/tests/unit/routes/scopes/scope/host-catalogs/host-catalog/hosts/host/index-test.js b/ui/core/tests/unit/routes/scopes/scope/host-catalogs/host-catalog/hosts/host/index-test.js index 1f6b2379b..dfe25ec65 100644 --- a/ui/core/tests/unit/routes/scopes/scope/host-catalogs/host-catalog/hosts/host/index-test.js +++ b/ui/core/tests/unit/routes/scopes/scope/host-catalogs/host-catalog/hosts/host/index-test.js @@ -1,11 +1,16 @@ import { module, test } from 'qunit'; import { setupTest } from 'ember-qunit'; -module('Unit | Route | scopes/scope/host-catalogs/host-catalog/hosts/host/index', function(hooks) { - setupTest(hooks); +module( + 'Unit | Route | scopes/scope/host-catalogs/host-catalog/hosts/host/index', + function (hooks) { + setupTest(hooks); - test('it exists', function(assert) { - let route = this.owner.lookup('route:scopes/scope/host-catalogs/host-catalog/hosts/host/index'); - assert.ok(route); - }); -}); + test('it exists', function (assert) { + let route = this.owner.lookup( + 'route:scopes/scope/host-catalogs/host-catalog/hosts/host/index' + ); + assert.ok(route); + }); + } +); diff --git a/ui/core/tests/unit/routes/scopes/scope/host-catalogs/host-catalog/hosts/index-test.js b/ui/core/tests/unit/routes/scopes/scope/host-catalogs/host-catalog/hosts/index-test.js index 5bccae028..af8bfa88d 100644 --- a/ui/core/tests/unit/routes/scopes/scope/host-catalogs/host-catalog/hosts/index-test.js +++ b/ui/core/tests/unit/routes/scopes/scope/host-catalogs/host-catalog/hosts/index-test.js @@ -1,11 +1,16 @@ import { module, test } from 'qunit'; import { setupTest } from 'ember-qunit'; -module('Unit | Route | scopes/scope/host-catalogs/host-catalog/hosts/index', function(hooks) { - setupTest(hooks); +module( + 'Unit | Route | scopes/scope/host-catalogs/host-catalog/hosts/index', + function (hooks) { + setupTest(hooks); - test('it exists', function(assert) { - let route = this.owner.lookup('route:scopes/scope/host-catalogs/host-catalog/hosts/index'); - assert.ok(route); - }); -}); + test('it exists', function (assert) { + let route = this.owner.lookup( + 'route:scopes/scope/host-catalogs/host-catalog/hosts/index' + ); + assert.ok(route); + }); + } +); diff --git a/ui/core/tests/unit/routes/scopes/scope/host-catalogs/host-catalog/hosts/new-test.js b/ui/core/tests/unit/routes/scopes/scope/host-catalogs/host-catalog/hosts/new-test.js index e7d31cca4..873cf3116 100644 --- a/ui/core/tests/unit/routes/scopes/scope/host-catalogs/host-catalog/hosts/new-test.js +++ b/ui/core/tests/unit/routes/scopes/scope/host-catalogs/host-catalog/hosts/new-test.js @@ -1,11 +1,16 @@ import { module, test } from 'qunit'; import { setupTest } from 'ember-qunit'; -module('Unit | Route | scopes/scope/host-catalogs/host-catalog/hosts/new', function(hooks) { - setupTest(hooks); +module( + 'Unit | Route | scopes/scope/host-catalogs/host-catalog/hosts/new', + function (hooks) { + setupTest(hooks); - test('it exists', function(assert) { - let route = this.owner.lookup('route:scopes/scope/host-catalogs/host-catalog/hosts/new'); - assert.ok(route); - }); -}); + test('it exists', function (assert) { + let route = this.owner.lookup( + 'route:scopes/scope/host-catalogs/host-catalog/hosts/new' + ); + assert.ok(route); + }); + } +); diff --git a/ui/core/tests/unit/routes/scopes/scope/host-catalogs/host-catalog/index-test.js b/ui/core/tests/unit/routes/scopes/scope/host-catalogs/host-catalog/index-test.js index 6bd3f5df2..f46433c15 100644 --- a/ui/core/tests/unit/routes/scopes/scope/host-catalogs/host-catalog/index-test.js +++ b/ui/core/tests/unit/routes/scopes/scope/host-catalogs/host-catalog/index-test.js @@ -1,11 +1,16 @@ import { module, test } from 'qunit'; import { setupTest } from 'ember-qunit'; -module('Unit | Route | scopes/scope/host-catalogs/host-catalog/index', function(hooks) { - setupTest(hooks); +module( + 'Unit | Route | scopes/scope/host-catalogs/host-catalog/index', + function (hooks) { + setupTest(hooks); - test('it exists', function(assert) { - let route = this.owner.lookup('route:scopes/scope/host-catalogs/host-catalog/index'); - assert.ok(route); - }); -}); + test('it exists', function (assert) { + let route = this.owner.lookup( + 'route:scopes/scope/host-catalogs/host-catalog/index' + ); + assert.ok(route); + }); + } +); diff --git a/ui/core/tests/unit/routes/scopes/scope/host-catalogs/index-test.js b/ui/core/tests/unit/routes/scopes/scope/host-catalogs/index-test.js index a64c67754..5f126a91f 100644 --- a/ui/core/tests/unit/routes/scopes/scope/host-catalogs/index-test.js +++ b/ui/core/tests/unit/routes/scopes/scope/host-catalogs/index-test.js @@ -1,10 +1,10 @@ import { module, test } from 'qunit'; import { setupTest } from 'ember-qunit'; -module('Unit | Route | scopes/scope/host-catalogs/index', function(hooks) { +module('Unit | Route | scopes/scope/host-catalogs/index', function (hooks) { setupTest(hooks); - test('it exists', function(assert) { + test('it exists', function (assert) { let route = this.owner.lookup('route:scopes/scope/host-catalogs/index'); assert.ok(route); }); diff --git a/ui/core/tests/unit/routes/scopes/scope/host-catalogs/new-test.js b/ui/core/tests/unit/routes/scopes/scope/host-catalogs/new-test.js index c2d2397d3..4d1db59a8 100644 --- a/ui/core/tests/unit/routes/scopes/scope/host-catalogs/new-test.js +++ b/ui/core/tests/unit/routes/scopes/scope/host-catalogs/new-test.js @@ -1,10 +1,10 @@ import { module, test } from 'qunit'; import { setupTest } from 'ember-qunit'; -module('Unit | Route | scopes/scope/host-catalogs/new', function(hooks) { +module('Unit | Route | scopes/scope/host-catalogs/new', function (hooks) { setupTest(hooks); - test('it exists', function(assert) { + test('it exists', function (assert) { let route = this.owner.lookup('route:scopes/scope/host-catalogs/new'); assert.ok(route); }); diff --git a/ui/core/tests/unit/routes/scopes/scope/new-test.js b/ui/core/tests/unit/routes/scopes/scope/new-test.js index 76ed6531b..b765958b4 100644 --- a/ui/core/tests/unit/routes/scopes/scope/new-test.js +++ b/ui/core/tests/unit/routes/scopes/scope/new-test.js @@ -1,10 +1,10 @@ import { module, test } from 'qunit'; import { setupTest } from 'ember-qunit'; -module('Unit | Route | scopes/scope/new', function(hooks) { +module('Unit | Route | scopes/scope/new', function (hooks) { setupTest(hooks); - test('it exists', function(assert) { + test('it exists', function (assert) { let route = this.owner.lookup('route:scopes/scope/new'); assert.ok(route); }); diff --git a/ui/core/tests/unit/routes/scopes/scope/scopes-test.js b/ui/core/tests/unit/routes/scopes/scope/scopes-test.js index 7cb21ef85..ae410743c 100644 --- a/ui/core/tests/unit/routes/scopes/scope/scopes-test.js +++ b/ui/core/tests/unit/routes/scopes/scope/scopes-test.js @@ -1,10 +1,10 @@ import { module, test } from 'qunit'; import { setupTest } from 'ember-qunit'; -module('Unit | Route | scopes/scope/scopes', function(hooks) { +module('Unit | Route | scopes/scope/scopes', function (hooks) { setupTest(hooks); - test('it exists', function(assert) { + test('it exists', function (assert) { let route = this.owner.lookup('route:scopes/scope/scopes'); assert.ok(route); }); diff --git a/ui/core/tests/unit/routes/scopes/scope/scopes/index-test.js b/ui/core/tests/unit/routes/scopes/scope/scopes/index-test.js index ca7e3fb91..051390273 100644 --- a/ui/core/tests/unit/routes/scopes/scope/scopes/index-test.js +++ b/ui/core/tests/unit/routes/scopes/scope/scopes/index-test.js @@ -1,10 +1,10 @@ import { module, test } from 'qunit'; import { setupTest } from 'ember-qunit'; -module('Unit | Route | scopes/scope/scopes/index', function(hooks) { +module('Unit | Route | scopes/scope/scopes/index', function (hooks) { setupTest(hooks); - test('it exists', function(assert) { + test('it exists', function (assert) { let route = this.owner.lookup('route:scopes/scope/scopes/index'); assert.ok(route); }); diff --git a/ui/core/tests/unit/routes/scopes/scope/sessions-test.js b/ui/core/tests/unit/routes/scopes/scope/sessions-test.js index 078865278..ca645c5c5 100644 --- a/ui/core/tests/unit/routes/scopes/scope/sessions-test.js +++ b/ui/core/tests/unit/routes/scopes/scope/sessions-test.js @@ -1,10 +1,10 @@ import { module, test } from 'qunit'; import { setupTest } from 'ember-qunit'; -module('Unit | Route | scopes/scope/sessions', function(hooks) { +module('Unit | Route | scopes/scope/sessions', function (hooks) { setupTest(hooks); - test('it exists', function(assert) { + test('it exists', function (assert) { let route = this.owner.lookup('route:scopes/scope/sessions'); assert.ok(route); }); diff --git a/ui/core/tests/unit/routes/scopes/scope/sessions/index-test.js b/ui/core/tests/unit/routes/scopes/scope/sessions/index-test.js index 3d18fa306..5e7590cbd 100644 --- a/ui/core/tests/unit/routes/scopes/scope/sessions/index-test.js +++ b/ui/core/tests/unit/routes/scopes/scope/sessions/index-test.js @@ -1,10 +1,10 @@ import { module, test } from 'qunit'; import { setupTest } from 'ember-qunit'; -module('Unit | Route | scopes/scope/sessions/index', function(hooks) { +module('Unit | Route | scopes/scope/sessions/index', function (hooks) { setupTest(hooks); - test('it exists', function(assert) { + test('it exists', function (assert) { let route = this.owner.lookup('route:scopes/scope/sessions/index'); assert.ok(route); }); diff --git a/ui/core/tests/unit/routes/scopes/scope/targets-test.js b/ui/core/tests/unit/routes/scopes/scope/targets-test.js index 45d66036b..0d357c6b8 100644 --- a/ui/core/tests/unit/routes/scopes/scope/targets-test.js +++ b/ui/core/tests/unit/routes/scopes/scope/targets-test.js @@ -1,10 +1,10 @@ import { module, test } from 'qunit'; import { setupTest } from 'ember-qunit'; -module('Unit | Route | scopes/scope/targets', function(hooks) { +module('Unit | Route | scopes/scope/targets', function (hooks) { setupTest(hooks); - test('it exists', function(assert) { + test('it exists', function (assert) { let route = this.owner.lookup('route:scopes/scope/targets'); assert.ok(route); }); diff --git a/ui/core/tests/unit/routes/scopes/scope/targets/index-test.js b/ui/core/tests/unit/routes/scopes/scope/targets/index-test.js index fea08576c..74d495fcb 100644 --- a/ui/core/tests/unit/routes/scopes/scope/targets/index-test.js +++ b/ui/core/tests/unit/routes/scopes/scope/targets/index-test.js @@ -1,10 +1,10 @@ import { module, test } from 'qunit'; import { setupTest } from 'ember-qunit'; -module('Unit | Route | scopes/scope/targets/index', function(hooks) { +module('Unit | Route | scopes/scope/targets/index', function (hooks) { setupTest(hooks); - test('it exists', function(assert) { + test('it exists', function (assert) { let route = this.owner.lookup('route:scopes/scope/targets/index'); assert.ok(route); }); diff --git a/ui/core/tests/unit/routes/scopes/scope/targets/new-test.js b/ui/core/tests/unit/routes/scopes/scope/targets/new-test.js index 1c1402d57..07841ae1e 100644 --- a/ui/core/tests/unit/routes/scopes/scope/targets/new-test.js +++ b/ui/core/tests/unit/routes/scopes/scope/targets/new-test.js @@ -1,10 +1,10 @@ import { module, test } from 'qunit'; import { setupTest } from 'ember-qunit'; -module('Unit | Route | scopes/scope/targets/new', function(hooks) { +module('Unit | Route | scopes/scope/targets/new', function (hooks) { setupTest(hooks); - test('it exists', function(assert) { + test('it exists', function (assert) { let route = this.owner.lookup('route:scopes/scope/targets/new'); assert.ok(route); }); diff --git a/ui/core/tests/unit/routes/scopes/scope/targets/target-test.js b/ui/core/tests/unit/routes/scopes/scope/targets/target-test.js index d2cb9f9fa..038d5760e 100644 --- a/ui/core/tests/unit/routes/scopes/scope/targets/target-test.js +++ b/ui/core/tests/unit/routes/scopes/scope/targets/target-test.js @@ -1,10 +1,10 @@ import { module, test } from 'qunit'; import { setupTest } from 'ember-qunit'; -module('Unit | Route | scopes/scope/targets/target', function(hooks) { +module('Unit | Route | scopes/scope/targets/target', function (hooks) { setupTest(hooks); - test('it exists', function(assert) { + test('it exists', function (assert) { let route = this.owner.lookup('route:scopes/scope/targets/target'); assert.ok(route); }); diff --git a/ui/core/tests/unit/routes/scopes/scope/targets/target/add-host-sets-test.js b/ui/core/tests/unit/routes/scopes/scope/targets/target/add-host-sets-test.js index c07db35c9..cc7f6a011 100644 --- a/ui/core/tests/unit/routes/scopes/scope/targets/target/add-host-sets-test.js +++ b/ui/core/tests/unit/routes/scopes/scope/targets/target/add-host-sets-test.js @@ -1,11 +1,15 @@ import { module, test } from 'qunit'; import { setupTest } from 'ember-qunit'; -module('Unit | Route | scopes/scope/targets/target/add-host-sets', function(hooks) { +module('Unit | Route | scopes/scope/targets/target/add-host-sets', function ( + hooks +) { setupTest(hooks); - test('it exists', function(assert) { - let route = this.owner.lookup('route:scopes/scope/targets/target/add-host-sets'); + test('it exists', function (assert) { + let route = this.owner.lookup( + 'route:scopes/scope/targets/target/add-host-sets' + ); assert.ok(route); }); }); diff --git a/ui/core/tests/unit/routes/scopes/scope/targets/target/host-sets-test.js b/ui/core/tests/unit/routes/scopes/scope/targets/target/host-sets-test.js index 1309e5b03..77d9430d2 100644 --- a/ui/core/tests/unit/routes/scopes/scope/targets/target/host-sets-test.js +++ b/ui/core/tests/unit/routes/scopes/scope/targets/target/host-sets-test.js @@ -1,11 +1,15 @@ import { module, test } from 'qunit'; import { setupTest } from 'ember-qunit'; -module('Unit | Route | scopes/scope/targets/target/host-sets', function(hooks) { +module('Unit | Route | scopes/scope/targets/target/host-sets', function ( + hooks +) { setupTest(hooks); - test('it exists', function(assert) { - let route = this.owner.lookup('route:scopes/scope/targets/target/host-sets'); + test('it exists', function (assert) { + let route = this.owner.lookup( + 'route:scopes/scope/targets/target/host-sets' + ); assert.ok(route); }); }); diff --git a/ui/core/tests/unit/routes/scopes/scope/targets/target/index-test.js b/ui/core/tests/unit/routes/scopes/scope/targets/target/index-test.js index 6f4f3b248..fcf704760 100644 --- a/ui/core/tests/unit/routes/scopes/scope/targets/target/index-test.js +++ b/ui/core/tests/unit/routes/scopes/scope/targets/target/index-test.js @@ -1,10 +1,10 @@ import { module, test } from 'qunit'; import { setupTest } from 'ember-qunit'; -module('Unit | Route | scopes/scope/targets/target/index', function(hooks) { +module('Unit | Route | scopes/scope/targets/target/index', function (hooks) { setupTest(hooks); - test('it exists', function(assert) { + test('it exists', function (assert) { let route = this.owner.lookup('route:scopes/scope/targets/target/index'); assert.ok(route); }); diff --git a/ui/core/tests/unit/routes/scopes/scope/users/user/accounts-test.js b/ui/core/tests/unit/routes/scopes/scope/users/user/accounts-test.js index a98f97d71..c5b3e9b05 100644 --- a/ui/core/tests/unit/routes/scopes/scope/users/user/accounts-test.js +++ b/ui/core/tests/unit/routes/scopes/scope/users/user/accounts-test.js @@ -1,10 +1,10 @@ import { module, test } from 'qunit'; import { setupTest } from 'ember-qunit'; -module('Unit | Route | scopes/scope/users/user/accounts', function(hooks) { +module('Unit | Route | scopes/scope/users/user/accounts', function (hooks) { setupTest(hooks); - test('it exists', function(assert) { + test('it exists', function (assert) { let route = this.owner.lookup('route:scopes/scope/users/user/accounts'); assert.ok(route); }); diff --git a/ui/core/tests/unit/routes/scopes/scope/users/user/add-accounts-test.js b/ui/core/tests/unit/routes/scopes/scope/users/user/add-accounts-test.js index 2aac18540..a55e4bfa4 100644 --- a/ui/core/tests/unit/routes/scopes/scope/users/user/add-accounts-test.js +++ b/ui/core/tests/unit/routes/scopes/scope/users/user/add-accounts-test.js @@ -1,10 +1,10 @@ import { module, test } from 'qunit'; import { setupTest } from 'ember-qunit'; -module('Unit | Route | scopes/scope/users/user/add-accounts', function(hooks) { +module('Unit | Route | scopes/scope/users/user/add-accounts', function (hooks) { setupTest(hooks); - test('it exists', function(assert) { + test('it exists', function (assert) { let route = this.owner.lookup('route:scopes/scope/users/user/add-accounts'); assert.ok(route); }); diff --git a/ui/core/tests/unit/services/confirm-test.js b/ui/core/tests/unit/services/confirm-test.js index 0fb7f20d3..c421c90d6 100644 --- a/ui/core/tests/unit/services/confirm-test.js +++ b/ui/core/tests/unit/services/confirm-test.js @@ -1,10 +1,10 @@ import { module, test } from 'qunit'; import { setupTest } from 'ember-qunit'; -module('Unit | Service | confirm', function(hooks) { +module('Unit | Service | confirm', function (hooks) { setupTest(hooks); - test('`confirm()` emits promise-like instances', function(assert) { + test('`confirm()` emits promise-like instances', function (assert) { assert.expect(3); const service = this.owner.lookup('service:confirm'); service.enabled = true; @@ -14,7 +14,7 @@ module('Unit | Service | confirm', function(hooks) { assert.ok(confirmation.finally, 'confirmation has a finally method'); }); - test('`pending` is an array of pending confirmations', function(assert) { + test('`pending` is an array of pending confirmations', function (assert) { assert.expect(3); const service = this.owner.lookup('service:confirm'); service.enabled = true; @@ -25,7 +25,7 @@ module('Unit | Service | confirm', function(hooks) { assert.equal(service.pending.length, 0, 'Confirmation was confirmed'); }); - test('confirmations may be confirmed or dismissed', function(assert) { + test('confirmations may be confirmed or dismissed', function (assert) { assert.expect(4); const service = this.owner.lookup('service:confirm'); service.enabled = true; @@ -39,7 +39,7 @@ module('Unit | Service | confirm', function(hooks) { assert.ok(confirmation.done, 'Confirmation is done via dismiss'); }); - test('confirmations resolve on confirm', function(assert) { + test('confirmations resolve on confirm', function (assert) { assert.expect(1); const service = this.owner.lookup('service:confirm'); service.enabled = true; @@ -48,7 +48,7 @@ module('Unit | Service | confirm', function(hooks) { confirmation.confirm(); }); - test('confirmations reject on dismiss', function(assert) { + test('confirmations reject on dismiss', function (assert) { assert.expect(1); const service = this.owner.lookup('service:confirm'); service.enabled = true; @@ -57,7 +57,7 @@ module('Unit | Service | confirm', function(hooks) { confirmation.dismiss(); }); - test('confirmations have a finally method', function(assert) { + test('confirmations have a finally method', function (assert) { assert.expect(2); const service = this.owner.lookup('service:confirm'); service.enabled = true; diff --git a/ui/core/tests/unit/services/scope-test.js b/ui/core/tests/unit/services/scope-test.js index 95493c0b4..df15e7547 100644 --- a/ui/core/tests/unit/services/scope-test.js +++ b/ui/core/tests/unit/services/scope-test.js @@ -1,11 +1,11 @@ import { module, test } from 'qunit'; import { setupTest } from 'ember-qunit'; -module('Unit | Service | scope', function(hooks) { +module('Unit | Service | scope', function (hooks) { setupTest(hooks); // TODO: Replace this with your real tests. - test('it exists', function(assert) { + test('it exists', function (assert) { let service = this.owner.lookup('service:scope'); assert.ok(service); }); diff --git a/ui/desktop/app/controllers/scopes/scope/authenticate.js b/ui/desktop/app/controllers/scopes/scope/authenticate.js index 5c36ec58e..25ebcd1df 100644 --- a/ui/desktop/app/controllers/scopes/scope/authenticate.js +++ b/ui/desktop/app/controllers/scopes/scope/authenticate.js @@ -11,7 +11,6 @@ export default class ScopesScopeAuthenticateController extends Controller { return [ ...this.model.scopes.filter((scope) => scope.id === 'global'), ...this.model.scopes.filter((scope) => scope.id !== 'global'), - ] + ]; } - } diff --git a/ui/desktop/app/helpers/is-loading.js b/ui/desktop/app/helpers/is-loading.js index ca34b363a..d4c239939 100644 --- a/ui/desktop/app/helpers/is-loading.js +++ b/ui/desktop/app/helpers/is-loading.js @@ -6,7 +6,6 @@ import { inject as service } from '@ember/service'; * service's `isLoading` attribute. */ export default class extends Helper { - // =services @service loading; @@ -20,5 +19,4 @@ export default class extends Helper { compute() { return this.loading.isLoading; } - } diff --git a/ui/desktop/app/router.js b/ui/desktop/app/router.js index 98626ddce..3ebda9c66 100644 --- a/ui/desktop/app/router.js +++ b/ui/desktop/app/router.js @@ -7,10 +7,10 @@ export default class Router extends EmberRouter { } Router.map(function () { - this.route('scopes', function() { - this.route('scope', { path: ':scope_id' }, function() { - this.route('targets', function() {}); - this.route('authenticate', function() { + this.route('scopes', function () { + this.route('scope', { path: ':scope_id' }, function () { + this.route('targets', function () {}); + this.route('authenticate', function () { this.route('method', { path: ':auth_method_id' }); }); }); diff --git a/ui/desktop/app/routes/application.js b/ui/desktop/app/routes/application.js index 1c1211c89..0dc41c9bd 100644 --- a/ui/desktop/app/routes/application.js +++ b/ui/desktop/app/routes/application.js @@ -12,7 +12,6 @@ import loading from 'ember-loading/decorator'; export default class ApplicationRoute extends Route.extend( ApplicationRouteMixin ) { - // =services @service session; @@ -112,5 +111,4 @@ export default class ApplicationRoute extends Route.extend( } return true; } - } diff --git a/ui/desktop/app/routes/index.js b/ui/desktop/app/routes/index.js index 1bc0a0f02..18b3bd24f 100644 --- a/ui/desktop/app/routes/index.js +++ b/ui/desktop/app/routes/index.js @@ -2,7 +2,6 @@ import Route from '@ember/routing/route'; import { inject as service } from '@ember/service'; export default class IndexRoute extends Route { - // =services @service session; diff --git a/ui/desktop/app/routes/origin.js b/ui/desktop/app/routes/origin.js index cb5ba961e..e46824ef8 100644 --- a/ui/desktop/app/routes/origin.js +++ b/ui/desktop/app/routes/origin.js @@ -3,7 +3,6 @@ import { inject as service } from '@ember/service'; import { action } from '@ember/object'; export default class OriginRoute extends Route { - // =services @service session; @@ -40,10 +39,10 @@ export default class OriginRoute extends Route { this.replaceWith('index'); } catch (e) { // If scopes don't load, we assume this is not a Boundary API - const errorMessage = - this.intl.t('errors.origin-verification-failed.description'); + const errorMessage = this.intl.t( + 'errors.origin-verification-failed.description' + ); this.notify.error(errorMessage, { closeAfter: null }); } } - } diff --git a/ui/desktop/app/routes/scopes/scope/authenticate.js b/ui/desktop/app/routes/scopes/scope/authenticate.js index 8a803e790..7e49a5b9b 100644 --- a/ui/desktop/app/routes/scopes/scope/authenticate.js +++ b/ui/desktop/app/routes/scopes/scope/authenticate.js @@ -22,8 +22,8 @@ export default class ScopesScopeAuthenticateRoute extends Route { const { id: scope_id } = this.modelFor('scopes.scope'); return hash({ scope: this.modelFor('scopes.scope'), - scopes: this.modelFor('scopes').filter(scope => scope.isOrg), - authMethods: this.store.query('auth-method', { scope_id }) + scopes: this.modelFor('scopes').filter((scope) => scope.isOrg), + authMethods: this.store.query('auth-method', { scope_id }), }); } } diff --git a/ui/desktop/app/styles/_notify.scss b/ui/desktop/app/styles/_notify.scss index 784bc746f..438f0950c 100644 --- a/ui/desktop/app/styles/_notify.scss +++ b/ui/desktop/app/styles/_notify.scss @@ -61,19 +61,19 @@ .ember-notify-show { -webkit-animation-duration: 500ms; -webkit-animation-name: ember-notify-show; - -webkit-animation-timing-function: cubic-bezier(.175, .885, .32, 1.275); + -webkit-animation-timing-function: cubic-bezier(0.175, 0.885, 0.32, 1.275); animation-duration: 500ms; animation-name: ember-notify-show; - animation-timing-function: cubic-bezier(.175, .885, .32, 1.275); + animation-timing-function: cubic-bezier(0.175, 0.885, 0.32, 1.275); } .ember-notify-hide { -webkit-animation-duration: 250ms; -webkit-animation-name: ember-notify-hide; - -webkit-animation-timing-function: cubic-bezier(.6, -.28, .735, .045); + -webkit-animation-timing-function: cubic-bezier(0.6, -0.28, 0.735, 0.045); animation-duration: 250ms; animation-name: ember-notify-hide; - animation-timing-function: cubic-bezier(.6, -.28, .735, .045); + animation-timing-function: cubic-bezier(0.6, -0.28, 0.735, 0.045); &:hover { -moz-animation-play-state: paused; diff --git a/ui/desktop/app/styles/app.scss b/ui/desktop/app/styles/app.scss index 134df4cd9..6b60d508c 100644 --- a/ui/desktop/app/styles/app.scss +++ b/ui/desktop/app/styles/app.scss @@ -45,7 +45,7 @@ .rose-dropdown { $icon-width: sizing.rems(m) + sizing.rems(s); - $indent: $icon-width + sizing.rems(xs); + $indent: $icon-width + sizing.rems(xs); .rose-form-radio-label { display: flex; @@ -114,7 +114,14 @@ &.loading { &::after { animation: gradient 1s linear infinite; - background: repeating-linear-gradient(to right, var(--subtle), var(--subtle), var(--info), var(--subtle), var(--subtle)); + background: repeating-linear-gradient( + to right, + var(--subtle), + var(--subtle), + var(--info), + var(--subtle), + var(--subtle) + ); background-position: -100% 0; background-size: 200% auto; content: ' '; @@ -125,8 +132,12 @@ top: 100%; @keyframes gradient { - 0% { background-position: -100% 0; } - 100% { background-position: -200% 0; } + 0% { + background-position: -100% 0; + } + 100% { + background-position: -200% 0; + } } } } @@ -148,8 +159,12 @@ color: inherit; @keyframes fadeBackground { - 0% { background-color: var(--action-subtler-1); } - 100% { background-color: transparent; } + 0% { + background-color: var(--action-subtler-1); + } + 100% { + background-color: transparent; + } } } } diff --git a/ui/desktop/tests/acceptance/authentication-test.js b/ui/desktop/tests/acceptance/authentication-test.js index 2bff4d4eb..96c1258fc 100644 --- a/ui/desktop/tests/acceptance/authentication-test.js +++ b/ui/desktop/tests/acceptance/authentication-test.js @@ -19,7 +19,7 @@ import { invalidateSession, } from 'ember-simple-auth/test-support'; -module('Acceptance | authentication', function(hooks) { +module('Acceptance | authentication', function (hooks) { setupApplicationTest(hooks); setupMirage(hooks); @@ -30,19 +30,19 @@ module('Acceptance | authentication', function(hooks) { scopes: { global: null, org: null, - project: null + project: null, }, authMethods: { global: null, - org: null + org: null, }, hostCatalog: null, - target: null + target: null, }; const stubs = { global: null, - org: null + org: null, }; const urls = { @@ -56,9 +56,9 @@ module('Acceptance | authentication', function(hooks) { global: null, methods: { global: null, - } + }, }, - targets: null + targets: null, }; const setDefaultOrigin = (test) => { @@ -73,23 +73,35 @@ module('Acceptance | authentication', function(hooks) { // create scopes instances.scopes.global = this.server.create('scope', { id: 'global' }); stubs.global = { id: 'global', type: 'global' }; - instances.scopes.org = this.server.create( - 'scope', - { type: 'org', scope: stubs.global } - ); + instances.scopes.org = this.server.create('scope', { + type: 'org', + scope: stubs.global, + }); stubs.org = { id: instances.scopes.org.id, type: 'org' }; - instances.scopes.project = this.server.create( - 'scope', - { type: 'project', scope: stubs.org } - ); + instances.scopes.project = this.server.create('scope', { + type: 'project', + scope: stubs.org, + }); stubs.project = { id: instances.scopes.project.id, type: 'project' }; // create other resources - instances.authMethods.global = this.server.create('auth-method', { scope: instances.scopes.global }); - instances.authMethods.org = this.server.create('auth-method', { scope: instances.scopes.org }); + instances.authMethods.global = this.server.create('auth-method', { + scope: instances.scopes.global, + }); + instances.authMethods.org = this.server.create('auth-method', { + scope: instances.scopes.org, + }); - instances.hostCatalog = this.server.create('host-catalog', { scope: instances.scopes.project }, 'withChildren'); - instances.target = this.server.create('target', { scope: instances.scopes.project }, 'withRandomHostSets'); + instances.hostCatalog = this.server.create( + 'host-catalog', + { scope: instances.scopes.project }, + 'withChildren' + ); + instances.target = this.server.create( + 'target', + { scope: instances.scopes.project }, + 'withRandomHostSets' + ); urls.scopes.global = `/scopes/${instances.scopes.global.id}`; urls.scopes.org = `/scopes/${instances.scopes.org.id}`; @@ -118,8 +130,7 @@ module('Acceptance | authentication', function(hooks) { if (event.origin !== window.location.origin) return; const { method, payload } = event.data; if (method) { - const response = - await mockIPC.invoke(method, payload); + const response = await mockIPC.invoke(method, payload); event.ports[0].postMessage(response); } }; @@ -148,5 +159,4 @@ module('Acceptance | authentication', function(hooks) { assert.equal(currentURL(), urls.authenticate.global); assert.ok(find('.rose-message')); }); - }); diff --git a/ui/desktop/tests/acceptance/origin-test.js b/ui/desktop/tests/acceptance/origin-test.js index c0b722a03..8830cc483 100644 --- a/ui/desktop/tests/acceptance/origin-test.js +++ b/ui/desktop/tests/acceptance/origin-test.js @@ -19,7 +19,7 @@ import { invalidateSession, } from 'ember-simple-auth/test-support'; -module('Acceptance | authentication', function(hooks) { +module('Acceptance | authentication', function (hooks) { setupApplicationTest(hooks); setupMirage(hooks); @@ -30,19 +30,19 @@ module('Acceptance | authentication', function(hooks) { scopes: { global: null, org: null, - project: null + project: null, }, authMethods: { global: null, - org: null + org: null, }, hostCatalog: null, - target: null + target: null, }; const stubs = { global: null, - org: null + org: null, }; const urls = { @@ -54,9 +54,9 @@ module('Acceptance | authentication', function(hooks) { }, authenticate: { global: null, - org: null + org: null, }, - targets: null + targets: null, }; hooks.beforeEach(function () { @@ -65,23 +65,35 @@ module('Acceptance | authentication', function(hooks) { // create scopes instances.scopes.global = this.server.create('scope', { id: 'global' }); stubs.global = { id: 'global', type: 'global' }; - instances.scopes.org = this.server.create( - 'scope', - { type: 'org', scope: stubs.global } - ); + instances.scopes.org = this.server.create('scope', { + type: 'org', + scope: stubs.global, + }); stubs.org = { id: instances.scopes.org.id, type: 'org' }; - instances.scopes.project = this.server.create( - 'scope', - { type: 'project', scope: stubs.org } - ); + instances.scopes.project = this.server.create('scope', { + type: 'project', + scope: stubs.org, + }); stubs.project = { id: instances.scopes.project.id, type: 'project' }; // create other resources - instances.authMethods.global = this.server.create('auth-method', { scope: instances.scopes.global }); - instances.authMethods.org = this.server.create('auth-method', { scope: instances.scopes.org }); + instances.authMethods.global = this.server.create('auth-method', { + scope: instances.scopes.global, + }); + instances.authMethods.org = this.server.create('auth-method', { + scope: instances.scopes.org, + }); - instances.hostCatalog = this.server.create('host-catalog', { scope: instances.scopes.project }, 'withChildren'); - instances.target = this.server.create('target', { scope: instances.scopes.project }, 'withRandomHostSets'); + instances.hostCatalog = this.server.create( + 'host-catalog', + { scope: instances.scopes.project }, + 'withChildren' + ); + instances.target = this.server.create( + 'target', + { scope: instances.scopes.project }, + 'withRandomHostSets' + ); urls.scopes.global = `/scopes/${instances.scopes.global.id}`; urls.scopes.org = `/scopes/${instances.scopes.org.id}`; @@ -110,8 +122,7 @@ module('Acceptance | authentication', function(hooks) { if (event.origin !== window.location.origin) return; const { method, payload } = event.data; if (method) { - const response = - await mockIPC.invoke(method, payload); + const response = await mockIPC.invoke(method, payload); event.ports[0].postMessage(response); } }; diff --git a/ui/desktop/tests/unit/authenticators/password-test.js b/ui/desktop/tests/unit/authenticators/password-test.js index 0314aed17..35e872b48 100644 --- a/ui/desktop/tests/unit/authenticators/password-test.js +++ b/ui/desktop/tests/unit/authenticators/password-test.js @@ -27,9 +27,12 @@ module('Unit | Authenticator | password', function (hooks) { test('it adds an authorization header to application adapter on restore', async function (assert) { assert.expect(1); const mockData = { id: 'token1234', token: 'token1234' }; - this.server.get(authenticator.buildTokenValidationEndpointURL(mockData.id), () => { - return new Response(200); - }); + this.server.get( + authenticator.buildTokenValidationEndpointURL(mockData.id), + () => { + return new Response(200); + } + ); authenticator.restore(mockData); assert.equal(applicationAdapter.headers.Authorization, 'Bearer token1234'); }); diff --git a/ui/desktop/tests/unit/controllers/application-test.js b/ui/desktop/tests/unit/controllers/application-test.js index e4b814b28..26017d69f 100644 --- a/ui/desktop/tests/unit/controllers/application-test.js +++ b/ui/desktop/tests/unit/controllers/application-test.js @@ -1,11 +1,11 @@ import { module, test } from 'qunit'; import { setupTest } from 'ember-qunit'; -module('Unit | Controller | application', function(hooks) { +module('Unit | Controller | application', function (hooks) { setupTest(hooks); // TODO: Replace this with your real tests. - test('it exists', function(assert) { + test('it exists', function (assert) { let controller = this.owner.lookup('controller:application'); assert.ok(controller); }); diff --git a/ui/desktop/tests/unit/controllers/scopes/scope/authenticate-test.js b/ui/desktop/tests/unit/controllers/scopes/scope/authenticate-test.js index 70b276418..912d62cc8 100644 --- a/ui/desktop/tests/unit/controllers/scopes/scope/authenticate-test.js +++ b/ui/desktop/tests/unit/controllers/scopes/scope/authenticate-test.js @@ -1,11 +1,11 @@ import { module, test } from 'qunit'; import { setupTest } from 'ember-qunit'; -module('Unit | Controller | scopes/scope/authenticate', function(hooks) { +module('Unit | Controller | scopes/scope/authenticate', function (hooks) { setupTest(hooks); // TODO: Replace this with your real tests. - test('it exists', function(assert) { + test('it exists', function (assert) { let controller = this.owner.lookup('controller:scopes/scope/authenticate'); assert.ok(controller); }); diff --git a/ui/desktop/tests/unit/routes/application-test.js b/ui/desktop/tests/unit/routes/application-test.js index 21e9fb300..a65ec1f35 100644 --- a/ui/desktop/tests/unit/routes/application-test.js +++ b/ui/desktop/tests/unit/routes/application-test.js @@ -1,10 +1,10 @@ import { module, test } from 'qunit'; import { setupTest } from 'ember-qunit'; -module('Unit | Route | application', function(hooks) { +module('Unit | Route | application', function (hooks) { setupTest(hooks); - test('it exists', function(assert) { + test('it exists', function (assert) { let route = this.owner.lookup('route:application'); assert.ok(route); }); diff --git a/ui/desktop/tests/unit/routes/origin-test.js b/ui/desktop/tests/unit/routes/origin-test.js index 93e187a4c..f878cd30d 100644 --- a/ui/desktop/tests/unit/routes/origin-test.js +++ b/ui/desktop/tests/unit/routes/origin-test.js @@ -1,10 +1,10 @@ import { module, test } from 'qunit'; import { setupTest } from 'ember-qunit'; -module('Unit | Route | origin', function(hooks) { +module('Unit | Route | origin', function (hooks) { setupTest(hooks); - test('it exists', function(assert) { + test('it exists', function (assert) { let route = this.owner.lookup('route:origin'); assert.ok(route); }); diff --git a/ui/desktop/tests/unit/routes/scopes/index-test.js b/ui/desktop/tests/unit/routes/scopes/index-test.js index c2fb98357..22a5c073a 100644 --- a/ui/desktop/tests/unit/routes/scopes/index-test.js +++ b/ui/desktop/tests/unit/routes/scopes/index-test.js @@ -1,10 +1,10 @@ import { module, test } from 'qunit'; import { setupTest } from 'ember-qunit'; -module('Unit | Route | scopes/index', function(hooks) { +module('Unit | Route | scopes/index', function (hooks) { setupTest(hooks); - test('it exists', function(assert) { + test('it exists', function (assert) { let route = this.owner.lookup('route:scopes/index'); assert.ok(route); }); diff --git a/ui/desktop/tests/unit/routes/scopes/scope/authenticate-test.js b/ui/desktop/tests/unit/routes/scopes/scope/authenticate-test.js index 2ee818453..5a1db715d 100644 --- a/ui/desktop/tests/unit/routes/scopes/scope/authenticate-test.js +++ b/ui/desktop/tests/unit/routes/scopes/scope/authenticate-test.js @@ -1,10 +1,10 @@ import { module, test } from 'qunit'; import { setupTest } from 'ember-qunit'; -module('Unit | Route | scopes/scope/authenticate', function(hooks) { +module('Unit | Route | scopes/scope/authenticate', function (hooks) { setupTest(hooks); - test('it exists', function(assert) { + test('it exists', function (assert) { let route = this.owner.lookup('route:scopes/scope/authenticate'); assert.ok(route); }); diff --git a/ui/desktop/tests/unit/routes/scopes/scope/authenticate/index-test.js b/ui/desktop/tests/unit/routes/scopes/scope/authenticate/index-test.js index 88d5a1121..d9e86f2da 100644 --- a/ui/desktop/tests/unit/routes/scopes/scope/authenticate/index-test.js +++ b/ui/desktop/tests/unit/routes/scopes/scope/authenticate/index-test.js @@ -1,10 +1,10 @@ import { module, test } from 'qunit'; import { setupTest } from 'ember-qunit'; -module('Unit | Route | scopes/scope/authenticate/index', function(hooks) { +module('Unit | Route | scopes/scope/authenticate/index', function (hooks) { setupTest(hooks); - test('it exists', function(assert) { + test('it exists', function (assert) { let route = this.owner.lookup('route:scopes/scope/authenticate/index'); assert.ok(route); }); diff --git a/ui/desktop/tests/unit/routes/scopes/scope/authenticate/method-test.js b/ui/desktop/tests/unit/routes/scopes/scope/authenticate/method-test.js index 5aed2aefe..f077f994b 100644 --- a/ui/desktop/tests/unit/routes/scopes/scope/authenticate/method-test.js +++ b/ui/desktop/tests/unit/routes/scopes/scope/authenticate/method-test.js @@ -1,10 +1,10 @@ import { module, test } from 'qunit'; import { setupTest } from 'ember-qunit'; -module('Unit | Route | scopes/scope/authenticate/method', function(hooks) { +module('Unit | Route | scopes/scope/authenticate/method', function (hooks) { setupTest(hooks); - test('it exists', function(assert) { + test('it exists', function (assert) { let route = this.owner.lookup('route:scopes/scope/authenticate/method'); assert.ok(route); });