diff --git a/ui/core/app/authenticators/password.js b/ui/core/app/authenticators/password.js
index 41e75d078..a70c89ac7 100644
--- a/ui/core/app/authenticators/password.js
+++ b/ui/core/app/authenticators/password.js
@@ -7,7 +7,6 @@ import { inject as service } from '@ember/service';
* endpoint, while deauthentication occurs on a scope endpoint.
*/
export default class PasswordAuthenticator extends BasePasswordAuthenticator {
-
// =services
@service store;
@@ -24,7 +23,7 @@ export default class PasswordAuthenticator extends BasePasswordAuthenticator {
*/
buildAuthEndpointURL({
scope: { id: scopeID },
- authMethod: { id: authMethodID }
+ authMethod: { id: authMethodID },
}) {
const adapter = this.store.adapterFor('application');
const options = { adapterOptions: { scopeID, method: 'authenticate' } };
@@ -43,5 +42,4 @@ export default class PasswordAuthenticator extends BasePasswordAuthenticator {
const options = { adapterOptions: { method: 'deauthenticate' } };
return adapter.buildURL('scope', scopeID, options, 'findRecord');
}
-
}
diff --git a/ui/core/app/controllers/application.js b/ui/core/app/controllers/application.js
index 3fd811d62..565eb7d7a 100644
--- a/ui/core/app/controllers/application.js
+++ b/ui/core/app/controllers/application.js
@@ -2,9 +2,7 @@ import Controller from '@ember/controller';
import { inject as service } from '@ember/service';
export default class ApplicationController extends Controller {
-
// =services
@service session;
-
}
diff --git a/ui/core/app/controllers/orgs/org/groups/group.js b/ui/core/app/controllers/orgs/org/groups/group.js
index 972fb39ed..0d12865f7 100644
--- a/ui/core/app/controllers/orgs/org/groups/group.js
+++ b/ui/core/app/controllers/orgs/org/groups/group.js
@@ -8,5 +8,4 @@ export default class OrgsOrgGroupsGroupController extends Controller {
* @type {string}
*/
@alias('model.displayName') breadCrumb;
-
}
diff --git a/ui/core/app/controllers/orgs/org/groups/new.js b/ui/core/app/controllers/orgs/org/groups/new.js
index 9ca97fbe5..1c5eeb7c9 100644
--- a/ui/core/app/controllers/orgs/org/groups/new.js
+++ b/ui/core/app/controllers/orgs/org/groups/new.js
@@ -14,5 +14,4 @@ export default class OrgsOrgGroupsNewController extends Controller {
get breadCrumb() {
return this.intl.t('titles.new');
}
-
}
diff --git a/ui/core/app/controllers/orgs/org/projects.js b/ui/core/app/controllers/orgs/org/projects.js
index e1199f8e8..60c1441a7 100644
--- a/ui/core/app/controllers/orgs/org/projects.js
+++ b/ui/core/app/controllers/orgs/org/projects.js
@@ -2,7 +2,6 @@ import Controller from '@ember/controller';
import { inject as service } from '@ember/service';
export default class OrgsOrgProjectsController extends Controller {
-
// =services
@service intl;
@@ -15,5 +14,4 @@ export default class OrgsOrgProjectsController extends Controller {
get breadCrumb() {
return this.intl.t('resources.projects');
}
-
}
diff --git a/ui/core/app/controllers/orgs/org/projects/new.js b/ui/core/app/controllers/orgs/org/projects/new.js
index 5f9540189..769d6e195 100644
--- a/ui/core/app/controllers/orgs/org/projects/new.js
+++ b/ui/core/app/controllers/orgs/org/projects/new.js
@@ -2,7 +2,6 @@ import Controller from '@ember/controller';
import { inject as service } from '@ember/service';
export default class OrgsOrgProjectsNewController extends Controller {
-
// =services
@service intl;
@@ -15,5 +14,4 @@ export default class OrgsOrgProjectsNewController extends Controller {
get breadCrumb() {
return this.intl.t('titles.new');
}
-
}
diff --git a/ui/core/app/controllers/orgs/org/projects/project.js b/ui/core/app/controllers/orgs/org/projects/project.js
index d56cf15d9..c449ef523 100644
--- a/ui/core/app/controllers/orgs/org/projects/project.js
+++ b/ui/core/app/controllers/orgs/org/projects/project.js
@@ -2,12 +2,10 @@ import Controller from '@ember/controller';
import { alias } from '@ember/object/computed';
export default class OrgsOrgProjectsProjectController extends Controller {
-
// =attributes
/**
* @type {string}
*/
@alias('model.displayName') breadCrumb;
-
}
diff --git a/ui/core/app/controllers/orgs/org/projects/project/host-catalogs.js b/ui/core/app/controllers/orgs/org/projects/project/host-catalogs.js
index 80dde2c39..ed10e744b 100644
--- a/ui/core/app/controllers/orgs/org/projects/project/host-catalogs.js
+++ b/ui/core/app/controllers/orgs/org/projects/project/host-catalogs.js
@@ -2,7 +2,6 @@ import Controller from '@ember/controller';
import { inject as service } from '@ember/service';
export default class OrgsOrgProjectsProjectHostCatalogsController extends Controller {
-
// =services
@service intl;
@@ -15,5 +14,4 @@ export default class OrgsOrgProjectsProjectHostCatalogsController extends Contro
get breadCrumb() {
return this.intl.t('resources.host-catalogs');
}
-
}
diff --git a/ui/core/app/controllers/orgs/org/projects/project/host-catalogs/host-catalog.js b/ui/core/app/controllers/orgs/org/projects/project/host-catalogs/host-catalog.js
index 57d0c2724..1e733a5aa 100644
--- a/ui/core/app/controllers/orgs/org/projects/project/host-catalogs/host-catalog.js
+++ b/ui/core/app/controllers/orgs/org/projects/project/host-catalogs/host-catalog.js
@@ -2,12 +2,10 @@ import Controller from '@ember/controller';
import { alias } from '@ember/object/computed';
export default class OrgsOrgProjectsProjectHostCatalogsHostCatalogController extends Controller {
-
// =attributes
/**
* @type {string}
*/
@alias('model.displayName') breadCrumb;
-
}
diff --git a/ui/core/app/controllers/orgs/org/projects/project/host-catalogs/new.js b/ui/core/app/controllers/orgs/org/projects/project/host-catalogs/new.js
index 4fb2aed63..02b865cd0 100644
--- a/ui/core/app/controllers/orgs/org/projects/project/host-catalogs/new.js
+++ b/ui/core/app/controllers/orgs/org/projects/project/host-catalogs/new.js
@@ -2,7 +2,6 @@ import Controller from '@ember/controller';
import { inject as service } from '@ember/service';
export default class OrgsOrgProjectsProjectHostCatalogsNewController extends Controller {
-
// =services
@service intl;
@@ -15,5 +14,4 @@ export default class OrgsOrgProjectsProjectHostCatalogsNewController extends Con
get breadCrumb() {
return this.intl.t('titles.new');
}
-
}
diff --git a/ui/core/app/controllers/orgs/org/roles.js b/ui/core/app/controllers/orgs/org/roles.js
index 7f62b0e1a..16f84ae44 100644
--- a/ui/core/app/controllers/orgs/org/roles.js
+++ b/ui/core/app/controllers/orgs/org/roles.js
@@ -14,5 +14,4 @@ export default class OrgsOrgRolesController extends Controller {
get breadCrumb() {
return this.intl.t('resources.roles');
}
-
}
diff --git a/ui/core/app/controllers/orgs/org/roles/new.js b/ui/core/app/controllers/orgs/org/roles/new.js
index 38a098eaa..126c6a1b8 100644
--- a/ui/core/app/controllers/orgs/org/roles/new.js
+++ b/ui/core/app/controllers/orgs/org/roles/new.js
@@ -14,5 +14,4 @@ export default class OrgsOrgRolesNewController extends Controller {
get breadCrumb() {
return this.intl.t('titles.new');
}
-
}
diff --git a/ui/core/app/controllers/orgs/org/roles/role.js b/ui/core/app/controllers/orgs/org/roles/role.js
index 23fe25882..90425d113 100644
--- a/ui/core/app/controllers/orgs/org/roles/role.js
+++ b/ui/core/app/controllers/orgs/org/roles/role.js
@@ -8,5 +8,4 @@ export default class OrgsOrgRolesRoleController extends Controller {
* @type {string}
*/
@alias('model.displayName') breadCrumb;
-
}
diff --git a/ui/core/app/controllers/orgs/org/users.js b/ui/core/app/controllers/orgs/org/users.js
index ae81e0302..fe28ecf0f 100644
--- a/ui/core/app/controllers/orgs/org/users.js
+++ b/ui/core/app/controllers/orgs/org/users.js
@@ -14,5 +14,4 @@ export default class OrgsOrgUsersController extends Controller {
get breadCrumb() {
return this.intl.t('resources.users');
}
-
}
diff --git a/ui/core/app/controllers/scopes/scope.js b/ui/core/app/controllers/scopes/scope.js
index 5bc636752..de850e223 100644
--- a/ui/core/app/controllers/scopes/scope.js
+++ b/ui/core/app/controllers/scopes/scope.js
@@ -2,9 +2,7 @@ import Controller from '@ember/controller';
import { inject as service } from '@ember/service';
export default class ScopesScopeController extends Controller {
-
// =services
@service session;
-
}
diff --git a/ui/core/app/controllers/scopes/scope/groups.js b/ui/core/app/controllers/scopes/scope/groups.js
new file mode 100644
index 000000000..000d18739
--- /dev/null
+++ b/ui/core/app/controllers/scopes/scope/groups.js
@@ -0,0 +1,18 @@
+import Controller from '@ember/controller';
+import { inject as service } from '@ember/service';
+
+export default class ScopesScopeGroupsController extends Controller {
+ // =services
+
+ @service intl;
+
+ // =attributes
+
+ /**
+ * Translated groups breadcrumb
+ * @type {string}
+ */
+ get breadCrumb() {
+ return this.intl.t('resources.groups');
+ }
+}
diff --git a/ui/core/app/controllers/scopes/scope/groups/group.js b/ui/core/app/controllers/scopes/scope/groups/group.js
new file mode 100644
index 000000000..dcd1e5296
--- /dev/null
+++ b/ui/core/app/controllers/scopes/scope/groups/group.js
@@ -0,0 +1,13 @@
+import Controller from '@ember/controller';
+
+export default class ScopesScopeGroupsGroupController extends Controller {
+ // =attributes
+
+ /**
+ * A group breadcrumb
+ * @type {string}
+ */
+ get breadCrumb() {
+ return this.model.displayName;
+ }
+}
diff --git a/ui/core/app/controllers/scopes/scope/groups/new.js b/ui/core/app/controllers/scopes/scope/groups/new.js
new file mode 100644
index 000000000..0de96d821
--- /dev/null
+++ b/ui/core/app/controllers/scopes/scope/groups/new.js
@@ -0,0 +1,18 @@
+import Controller from '@ember/controller';
+import { inject as service } from '@ember/service';
+
+export default class ScopesScopeGroupsNewController extends Controller {
+ // =services
+
+ @service intl;
+
+ // =attributes
+
+ /**
+ * Translated new group breadcrumb
+ * @type {string}
+ */
+ get breadCrumb() {
+ return this.intl.t('titles.new');
+ }
+}
diff --git a/ui/core/app/controllers/scopes/scope/projects.js b/ui/core/app/controllers/scopes/scope/projects.js
index cdd9bda8a..af28cf813 100644
--- a/ui/core/app/controllers/scopes/scope/projects.js
+++ b/ui/core/app/controllers/scopes/scope/projects.js
@@ -2,7 +2,6 @@ import Controller from '@ember/controller';
import { inject as service } from '@ember/service';
export default class ScopesScopeProjectsController extends Controller {
-
// =services
@service intl;
@@ -15,5 +14,4 @@ export default class ScopesScopeProjectsController extends Controller {
get breadCrumb() {
return this.intl.t('resources.projects');
}
-
}
diff --git a/ui/core/app/controllers/scopes/scope/projects/new.js b/ui/core/app/controllers/scopes/scope/projects/new.js
index 50b30d187..d1f87399f 100644
--- a/ui/core/app/controllers/scopes/scope/projects/new.js
+++ b/ui/core/app/controllers/scopes/scope/projects/new.js
@@ -2,7 +2,6 @@ import Controller from '@ember/controller';
import { inject as service } from '@ember/service';
export default class ScopesScopeProjectsNewController extends Controller {
-
// =services
@service intl;
@@ -15,5 +14,4 @@ export default class ScopesScopeProjectsNewController extends Controller {
get breadCrumb() {
return this.intl.t('titles.new');
}
-
}
diff --git a/ui/core/app/controllers/scopes/scope/projects/project.js b/ui/core/app/controllers/scopes/scope/projects/project.js
index 8fc8bbb1c..8d1219267 100644
--- a/ui/core/app/controllers/scopes/scope/projects/project.js
+++ b/ui/core/app/controllers/scopes/scope/projects/project.js
@@ -1,7 +1,6 @@
import Controller from '@ember/controller';
export default class ScopesScopeProjectsProjectController extends Controller {
-
// =attributes
/**
@@ -10,5 +9,4 @@ export default class ScopesScopeProjectsProjectController extends Controller {
get breadCrumb() {
return this.model.displayName;
}
-
}
diff --git a/ui/core/app/controllers/scopes/scope/roles.js b/ui/core/app/controllers/scopes/scope/roles.js
new file mode 100644
index 000000000..bbd84249e
--- /dev/null
+++ b/ui/core/app/controllers/scopes/scope/roles.js
@@ -0,0 +1,18 @@
+import Controller from '@ember/controller';
+import { inject as service } from '@ember/service';
+
+export default class ScopesScopeRolesController extends Controller {
+ // =services
+
+ @service intl;
+
+ // =attributes
+
+ /**
+ * Translated roles breadcrumb
+ * @type {string}
+ */
+ get breadCrumb() {
+ return this.intl.t('resources.roles');
+ }
+}
diff --git a/ui/core/app/controllers/scopes/scope/roles/new.js b/ui/core/app/controllers/scopes/scope/roles/new.js
new file mode 100644
index 000000000..598ec9760
--- /dev/null
+++ b/ui/core/app/controllers/scopes/scope/roles/new.js
@@ -0,0 +1,18 @@
+import Controller from '@ember/controller';
+import { inject as service } from '@ember/service';
+
+export default class ScopesScopeRolesNewController extends Controller {
+ // =services
+
+ @service intl;
+
+ // =attributes
+
+ /**
+ * Translated new role breadcrumb
+ * @type {string}
+ */
+ get breadCrumb() {
+ return this.intl.t('titles.new');
+ }
+}
diff --git a/ui/core/app/controllers/scopes/scope/roles/role.js b/ui/core/app/controllers/scopes/scope/roles/role.js
new file mode 100644
index 000000000..39ba35717
--- /dev/null
+++ b/ui/core/app/controllers/scopes/scope/roles/role.js
@@ -0,0 +1,13 @@
+import Controller from '@ember/controller';
+
+export default class ScopesScopeRolesRoleController extends Controller {
+ // =attributes
+
+ /**
+ * A role breadcrumb
+ * @type {string}
+ */
+ get breadCrumb() {
+ return this.model.displayName;
+ }
+}
diff --git a/ui/core/app/controllers/scopes/scope/users.js b/ui/core/app/controllers/scopes/scope/users.js
new file mode 100644
index 000000000..c88b342fc
--- /dev/null
+++ b/ui/core/app/controllers/scopes/scope/users.js
@@ -0,0 +1,18 @@
+import Controller from '@ember/controller';
+import { inject as service } from '@ember/service';
+
+export default class ScopesScopeUsersController extends Controller {
+ // =services
+
+ @service intl;
+
+ // =attributes
+
+ /**
+ * Translated users breadcrumb
+ * @type {string}
+ */
+ get breadCrumb() {
+ return this.intl.t('resources.users');
+ }
+}
diff --git a/ui/core/app/controllers/scopes/scope/users/new.js b/ui/core/app/controllers/scopes/scope/users/new.js
new file mode 100644
index 000000000..91d3f0cb4
--- /dev/null
+++ b/ui/core/app/controllers/scopes/scope/users/new.js
@@ -0,0 +1,18 @@
+import Controller from '@ember/controller';
+import { inject as service } from '@ember/service';
+
+export default class ScopesScopeUsersNewController extends Controller {
+ // =services
+
+ @service intl;
+
+ // =attributes
+
+ /**
+ * Translated new user breadcrumb
+ * @type {string}
+ */
+ get breadCrumb() {
+ return this.intl.t('titles.new');
+ }
+}
diff --git a/ui/core/app/controllers/scopes/scope/users/user.js b/ui/core/app/controllers/scopes/scope/users/user.js
new file mode 100644
index 000000000..6f7d42c7a
--- /dev/null
+++ b/ui/core/app/controllers/scopes/scope/users/user.js
@@ -0,0 +1,13 @@
+import Controller from '@ember/controller';
+
+export default class ScopesScopeUsersUserController extends Controller {
+ // =attributes
+
+ /**
+ * An user breadcrumb
+ * @type {string}
+ */
+ get breadCrumb() {
+ return this.model.displayName;
+ }
+}
diff --git a/ui/core/app/router.js b/ui/core/app/router.js
index 4385741d0..5275ca1a7 100644
--- a/ui/core/app/router.js
+++ b/ui/core/app/router.js
@@ -7,11 +7,22 @@ export default class Router extends EmberRouter {
}
Router.map(function () {
-
- this.route('scopes', function() {
- this.route('scope', { path: ':scope_id' }, function() {
- this.route('authenticate', function() {
- this.route('method', { path: ':auth_method_id'});
+ this.route('scopes', function () {
+ this.route('scope', { path: ':scope_id' }, function () {
+ this.route('authenticate', function () {
+ this.route('method', { path: ':auth_method_id' });
+ });
+ this.route('users', function () {
+ this.route('user', { path: ':user_id' }, function () {});
+ this.route('new');
+ });
+ this.route('groups', function () {
+ this.route('group', { path: ':group_id' }, function () {});
+ this.route('new');
+ });
+ this.route('roles', function () {
+ this.route('role', { path: ':role_id' }, function () {});
+ this.route('new');
});
this.route('projects', function() {
this.route('project', { path: ':project_id' }, function() {
@@ -28,27 +39,31 @@ Router.map(function () {
this.route('orgs', function () {
this.route('org', { path: ':org_id' }, function () {
this.route('projects', function () {
- this.route('project', { path: ':project_id' }, function() {
- this.route('host-catalogs', function() {
- this.route('host-catalog', { path: ':host_catalog_id' }, function() {});
+ this.route('project', { path: ':project_id' }, function () {
+ this.route('host-catalogs', function () {
+ this.route(
+ 'host-catalog',
+ { path: ':host_catalog_id' },
+ function () {}
+ );
this.route('new');
});
});
this.route('new');
});
- this.route('users', function() {
- this.route('user', { path: ':user_id' }, function() {});
+ this.route('users', function () {
+ this.route('user', { path: ':user_id' }, function () {});
this.route('new');
});
- this.route('roles', function() {
- this.route('role', { path: ':role_id' }, function() {});
+ this.route('roles', function () {
+ this.route('role', { path: ':role_id' }, function () {});
this.route('new');
});
- this.route('groups', function() {
- this.route('group', { path: ':group_id' }, function() {});
+ this.route('groups', function () {
+ this.route('group', { path: ':group_id' }, function () {});
this.route('new');
});
});
diff --git a/ui/core/app/routes/application.js b/ui/core/app/routes/application.js
index 024a0b887..e67f524e1 100644
--- a/ui/core/app/routes/application.js
+++ b/ui/core/app/routes/application.js
@@ -12,7 +12,6 @@ import { later } from '@ember/runloop';
export default class ApplicationRoute extends Route.extend(
ApplicationRouteMixin
) {
-
// =services
@service session;
diff --git a/ui/core/app/routes/index.js b/ui/core/app/routes/index.js
index 4ec1a62b0..c8728d037 100644
--- a/ui/core/app/routes/index.js
+++ b/ui/core/app/routes/index.js
@@ -1,7 +1,6 @@
import Route from '@ember/routing/route';
export default class IndexRoute extends Route {
-
// =methods
/**
@@ -10,5 +9,4 @@ export default class IndexRoute extends Route {
redirect() {
this.transitionTo('scopes');
}
-
}
diff --git a/ui/core/app/routes/orgs.js b/ui/core/app/routes/orgs.js
index 199076b0b..f41f51d52 100644
--- a/ui/core/app/routes/orgs.js
+++ b/ui/core/app/routes/orgs.js
@@ -1,7 +1,6 @@
import Route from '@ember/routing/route';
export default class OrgsRoute extends Route {
-
// =methods
/**
@@ -11,5 +10,4 @@ export default class OrgsRoute extends Route {
model() {
return this.store.findAll('org');
}
-
}
diff --git a/ui/core/app/routes/orgs/org/groups/group/index.js b/ui/core/app/routes/orgs/org/groups/group/index.js
index 521f73a9c..9bd8f2675 100644
--- a/ui/core/app/routes/orgs/org/groups/group/index.js
+++ b/ui/core/app/routes/orgs/org/groups/group/index.js
@@ -1,4 +1,3 @@
import Route from '@ember/routing/route';
-export default class OrgsOrgGroupsGroupIndexRoute extends Route {
-}
+export default class OrgsOrgGroupsGroupIndexRoute extends Route {}
diff --git a/ui/core/app/routes/orgs/org/projects/index.js b/ui/core/app/routes/orgs/org/projects/index.js
index c22022cf9..be2068f6d 100644
--- a/ui/core/app/routes/orgs/org/projects/index.js
+++ b/ui/core/app/routes/orgs/org/projects/index.js
@@ -1,3 +1,3 @@
import Route from '@ember/routing/route';
-export default class OrgsOrgProjectsIndexRoute extends Route { }
+export default class OrgsOrgProjectsIndexRoute extends Route {}
diff --git a/ui/core/app/routes/orgs/org/projects/project.js b/ui/core/app/routes/orgs/org/projects/project.js
index 8f06533bc..3171733ff 100644
--- a/ui/core/app/routes/orgs/org/projects/project.js
+++ b/ui/core/app/routes/orgs/org/projects/project.js
@@ -38,7 +38,7 @@ export default class OrgsOrgProjectsProjectRoute extends Route {
this.render('orgs/org/projects/project/_sidebar', {
into: 'orgs/org',
outlet: 'sidebar',
- model: model
+ model: model,
});
super.renderTemplate(...arguments);
}
diff --git a/ui/core/app/routes/orgs/org/projects/project/host-catalogs.js b/ui/core/app/routes/orgs/org/projects/project/host-catalogs.js
index eacc28056..685266cb4 100644
--- a/ui/core/app/routes/orgs/org/projects/project/host-catalogs.js
+++ b/ui/core/app/routes/orgs/org/projects/project/host-catalogs.js
@@ -1,7 +1,6 @@
import Route from '@ember/routing/route';
export default class OrgsOrgProjectsProjectHostCatalogsRoute extends Route {
-
// =methods
/**
diff --git a/ui/core/app/routes/orgs/org/projects/project/host-catalogs/host-catalog.js b/ui/core/app/routes/orgs/org/projects/project/host-catalogs/host-catalog.js
index ace30520a..47d79f7bb 100644
--- a/ui/core/app/routes/orgs/org/projects/project/host-catalogs/host-catalog.js
+++ b/ui/core/app/routes/orgs/org/projects/project/host-catalogs/host-catalog.js
@@ -3,7 +3,6 @@ import { inject as service } from '@ember/service';
import { action } from '@ember/object';
export default class OrgsOrgProjectsProjectHostCatalogsHostCatalogRoute extends Route {
-
// =services
@service notify;
@@ -63,5 +62,4 @@ export default class OrgsOrgProjectsProjectHostCatalogsHostCatalogRoute extends
this.notify.error(error.message, { closeAfter: null });
}
}
-
}
diff --git a/ui/core/app/routes/orgs/org/projects/project/host-catalogs/host-catalog/index.js b/ui/core/app/routes/orgs/org/projects/project/host-catalogs/host-catalog/index.js
index ffba38db4..a4ba3aa0e 100644
--- a/ui/core/app/routes/orgs/org/projects/project/host-catalogs/host-catalog/index.js
+++ b/ui/core/app/routes/orgs/org/projects/project/host-catalogs/host-catalog/index.js
@@ -1,4 +1,3 @@
import Route from '@ember/routing/route';
-export default class OrgsOrgProjectsProjectHostCatalogsHostCatalogIndexRoute extends Route {
-}
+export default class OrgsOrgProjectsProjectHostCatalogsHostCatalogIndexRoute extends Route {}
diff --git a/ui/core/app/routes/orgs/org/projects/project/host-catalogs/index.js b/ui/core/app/routes/orgs/org/projects/project/host-catalogs/index.js
index a29543a30..b760aed44 100644
--- a/ui/core/app/routes/orgs/org/projects/project/host-catalogs/index.js
+++ b/ui/core/app/routes/orgs/org/projects/project/host-catalogs/index.js
@@ -1,4 +1,3 @@
import Route from '@ember/routing/route';
-export default class OrgsOrgProjectsProjectHostCatalogsIndexRoute extends Route {
-}
+export default class OrgsOrgProjectsProjectHostCatalogsIndexRoute extends Route {}
diff --git a/ui/core/app/routes/orgs/org/projects/project/host-catalogs/new.js b/ui/core/app/routes/orgs/org/projects/project/host-catalogs/new.js
index a2f4e2bc6..c2c224e88 100644
--- a/ui/core/app/routes/orgs/org/projects/project/host-catalogs/new.js
+++ b/ui/core/app/routes/orgs/org/projects/project/host-catalogs/new.js
@@ -39,7 +39,10 @@ export default class OrgsOrgProjectsProjectHostCatalogsNewRoute extends Route {
async save(hostCatalog) {
try {
await hostCatalog.save();
- this.transitionTo('orgs.org.projects.project.host-catalogs.host-catalog', hostCatalog);
+ this.transitionTo(
+ 'orgs.org.projects.project.host-catalogs.host-catalog',
+ hostCatalog
+ );
// TODO: replace with translated strings
this.notify.success('Host catalog created.');
} catch (error) {
diff --git a/ui/core/app/routes/orgs/org/projects/project/index.js b/ui/core/app/routes/orgs/org/projects/project/index.js
index 0843242d7..0fc6b90b7 100644
--- a/ui/core/app/routes/orgs/org/projects/project/index.js
+++ b/ui/core/app/routes/orgs/org/projects/project/index.js
@@ -1,4 +1,3 @@
import Route from '@ember/routing/route';
-export default class OrgsOrgProjectsProjectIndexRoute extends Route {
-}
+export default class OrgsOrgProjectsProjectIndexRoute extends Route {}
diff --git a/ui/core/app/routes/orgs/org/roles.js b/ui/core/app/routes/orgs/org/roles.js
index 807c2aeee..972aaf816 100644
--- a/ui/core/app/routes/orgs/org/roles.js
+++ b/ui/core/app/routes/orgs/org/roles.js
@@ -10,5 +10,4 @@ export default class OrgsOrgRolesRoute extends Route {
model() {
return this.store.findAll('role');
}
-
}
diff --git a/ui/core/app/routes/orgs/org/users/index.js b/ui/core/app/routes/orgs/org/users/index.js
index b6203b0d4..b3047d27e 100644
--- a/ui/core/app/routes/orgs/org/users/index.js
+++ b/ui/core/app/routes/orgs/org/users/index.js
@@ -1,4 +1,3 @@
import Route from '@ember/routing/route';
-export default class OrgsOrgUsersIndexRoute extends Route {
-}
+export default class OrgsOrgUsersIndexRoute extends Route {}
diff --git a/ui/core/app/routes/scopes.js b/ui/core/app/routes/scopes.js
index a849878ba..337b319c9 100644
--- a/ui/core/app/routes/scopes.js
+++ b/ui/core/app/routes/scopes.js
@@ -2,7 +2,6 @@ import Route from '@ember/routing/route';
import { A } from '@ember/array';
export default class ScopesRoute extends Route {
-
// =methods
/**
@@ -20,5 +19,4 @@ export default class ScopesRoute extends Route {
// expected to default to the global scope, thus returning org scopes.
return this.store.findAll('scope').catch(() => A([]));
}
-
}
diff --git a/ui/core/app/routes/scopes/index.js b/ui/core/app/routes/scopes/index.js
index 06a263171..562a27a15 100644
--- a/ui/core/app/routes/scopes/index.js
+++ b/ui/core/app/routes/scopes/index.js
@@ -3,7 +3,6 @@ import { inject as service } from '@ember/service';
import { get } from '@ember/object';
export default class ScopesIndexRoute extends Route {
-
// =services
@service session;
@@ -17,13 +16,14 @@ export default class ScopesIndexRoute extends Route {
* @param {?ScopeModel} model.firstObject
*/
redirect({ firstObject }) {
- const authenticatedScopeID =
- get(this.session, 'data.authenticated.scope.id');
+ const authenticatedScopeID = get(
+ this.session,
+ 'data.authenticated.scope.id'
+ );
if (authenticatedScopeID) {
this.transitionTo('scopes.scope', authenticatedScopeID);
} else if (firstObject) {
this.transitionTo('scopes.scope', firstObject.id);
}
}
-
}
diff --git a/ui/core/app/routes/scopes/scope.js b/ui/core/app/routes/scopes/scope.js
index 939ef5076..2707a238b 100644
--- a/ui/core/app/routes/scopes/scope.js
+++ b/ui/core/app/routes/scopes/scope.js
@@ -1,7 +1,6 @@
import Route from '@ember/routing/route';
export default class ScopesScopeRoute extends Route {
-
// =methods
/**
@@ -15,12 +14,11 @@ export default class ScopesScopeRoute extends Route {
* @return {Promise{ScopeModel}}
*/
model({ scope_id: id }) {
- return this.store.findRecord('scope', id)
- .catch(() => {
- const maybeExistingScope = this.store.peekRecord('scope', id);
- // TODO it's unclear if creating a temporary unsaved scope is reliable
- // we may need to revert to a POJO.
- return maybeExistingScope || this.store.createRecord('scope', { id });
- });
+ return this.store.findRecord('scope', id).catch(() => {
+ const maybeExistingScope = this.store.peekRecord('scope', id);
+ // TODO it's unclear if creating a temporary unsaved scope is reliable
+ // we may need to revert to a POJO.
+ return maybeExistingScope || this.store.createRecord('scope', { id });
+ });
}
}
diff --git a/ui/core/app/routes/scopes/scope/authenticate.js b/ui/core/app/routes/scopes/scope/authenticate.js
index 93f565baa..d7dae560d 100644
--- a/ui/core/app/routes/scopes/scope/authenticate.js
+++ b/ui/core/app/routes/scopes/scope/authenticate.js
@@ -3,7 +3,6 @@ import { inject as service } from '@ember/service';
import { hash } from 'rsvp';
export default class ScopesScopeAuthenticateRoute extends Route {
-
// =services
@service session;
@@ -41,5 +40,4 @@ export default class ScopesScopeAuthenticateRoute extends Route {
this.transitionTo(this.routeIfAlreadyAuthenticated);
}
}
-
}
diff --git a/ui/core/app/routes/scopes/scope/authenticate/index.js b/ui/core/app/routes/scopes/scope/authenticate/index.js
index 5ee523b46..9d6ce9d61 100644
--- a/ui/core/app/routes/scopes/scope/authenticate/index.js
+++ b/ui/core/app/routes/scopes/scope/authenticate/index.js
@@ -1,7 +1,6 @@
import Route from '@ember/routing/route';
export default class ScopesScopeAuthenticateIndexRoute extends Route {
-
// =methods
/**
@@ -16,5 +15,4 @@ export default class ScopesScopeAuthenticateIndexRoute extends Route {
this.transitionTo('scopes.scope.authenticate.method', firstAuthMethod);
}
}
-
}
diff --git a/ui/core/app/routes/scopes/scope/authenticate/method.js b/ui/core/app/routes/scopes/scope/authenticate/method.js
index b52406722..5208b152d 100644
--- a/ui/core/app/routes/scopes/scope/authenticate/method.js
+++ b/ui/core/app/routes/scopes/scope/authenticate/method.js
@@ -3,7 +3,6 @@ import { inject as service } from '@ember/service';
import { action } from '@ember/object';
export default class ScopesScopeAuthenticateMethodRoute extends Route {
-
// =services
@service session;
@@ -62,5 +61,4 @@ export default class ScopesScopeAuthenticateMethodRoute extends Route {
this.notify.error(errorMessage, { closeAfter: null });
}
}
-
}
diff --git a/ui/core/app/routes/scopes/scope/groups.js b/ui/core/app/routes/scopes/scope/groups.js
new file mode 100644
index 000000000..7eed4406e
--- /dev/null
+++ b/ui/core/app/routes/scopes/scope/groups.js
@@ -0,0 +1,70 @@
+import Route from '@ember/routing/route';
+import { inject as service } from '@ember/service';
+import { action } from '@ember/object';
+
+export default class ScopesScopeGroupsRoute extends Route {
+ // =services
+
+ @service intl;
+ @service notify;
+
+ // =methods
+
+ /**
+ * Load all groups under current scope
+ * @return {Promise[GroupModel]}
+ */
+ async model() {
+ const { id: scopeID } = this.modelFor('scopes.scope');
+ return this.store.findAll('group', { adapterOptions: { scopeID } });
+ }
+
+ // =actions
+ /**
+ * Rollback changes on a group.
+ * @param {GroupModel} group
+ */
+ @action
+ cancel(group) {
+ const { isNew } = group;
+ group.rollbackAttributes();
+ if (isNew) this.transitionTo('scopes.scope.groups');
+ }
+
+ /**
+ * Save a group in current scope.
+ * @param {GroupModel} group
+ */
+ @action
+ async save(group) {
+ const { isNew } = group;
+ try {
+ await group.save();
+ this.refresh();
+ this.notify.success(
+ this.intl.t(isNew ? 'notify.create-success' : 'notify.save-success')
+ );
+ this.transitionTo('scopes.scope.groups.group', group);
+ } catch (error) {
+ //TODO: replace with translated strings
+ this.notify.error(error.message, { closeAfter: null });
+ }
+ }
+
+ /**
+ * Delete a group in current scope and redirect to index
+ * @param {GroupModel} group
+ */
+ @action
+ async delete(group) {
+ try {
+ await group.destroyRecord();
+ this.refresh();
+ this.notify.success(this.intl.t('notify.delete-success'));
+ this.transitionTo('scopes.scope.groups');
+ } catch (error) {
+ //TODO: replace with translated strings
+ this.notify.error(error.message, { closeAfter: null });
+ }
+ }
+}
diff --git a/ui/core/app/routes/scopes/scope/groups/group.js b/ui/core/app/routes/scopes/scope/groups/group.js
new file mode 100644
index 000000000..6231ab13f
--- /dev/null
+++ b/ui/core/app/routes/scopes/scope/groups/group.js
@@ -0,0 +1,18 @@
+import Route from '@ember/routing/route';
+
+export default class ScopesScopeGroupsGroupRoute extends Route {
+ // =methods
+
+ /**
+ * Load a group in current scope.
+ * @param {object} params
+ * @param {string} params.group_id
+ * @return {groupModel}
+ */
+ async model({ group_id }) {
+ const { id: scopeID } = this.modelFor('scopes.scope');
+ return this.store.findRecord('group', group_id, {
+ adapterOptions: { scopeID },
+ });
+ }
+}
diff --git a/ui/core/app/routes/scopes/scope/groups/group/index.js b/ui/core/app/routes/scopes/scope/groups/group/index.js
new file mode 100644
index 000000000..90f0fb3a1
--- /dev/null
+++ b/ui/core/app/routes/scopes/scope/groups/group/index.js
@@ -0,0 +1,3 @@
+import Route from '@ember/routing/route';
+
+export default class ScopesScopeGroupsGroupIndexRoute extends Route {}
diff --git a/ui/core/app/routes/scopes/scope/groups/index.js b/ui/core/app/routes/scopes/scope/groups/index.js
new file mode 100644
index 000000000..7d2a20fb0
--- /dev/null
+++ b/ui/core/app/routes/scopes/scope/groups/index.js
@@ -0,0 +1,3 @@
+import Route from '@ember/routing/route';
+
+export default class ScopesScopeGroupsIndexRoute extends Route {}
diff --git a/ui/core/app/routes/scopes/scope/groups/new.js b/ui/core/app/routes/scopes/scope/groups/new.js
new file mode 100644
index 000000000..baf98da65
--- /dev/null
+++ b/ui/core/app/routes/scopes/scope/groups/new.js
@@ -0,0 +1,14 @@
+import Route from '@ember/routing/route';
+
+export default class ScopesScopeGroupsNewRoute extends Route {
+ // =methods
+
+ /**
+ * Creates a new unsaved group.
+ * @return {GroupModel}
+ */
+ model() {
+ const scopeModel = this.modelFor('scopes.scope');
+ return this.store.createRecord('group', { scopeModel });
+ }
+}
diff --git a/ui/core/app/routes/scopes/scope/index.js b/ui/core/app/routes/scopes/scope/index.js
index 0215ea9da..36261b82d 100644
--- a/ui/core/app/routes/scopes/scope/index.js
+++ b/ui/core/app/routes/scopes/scope/index.js
@@ -1,7 +1,6 @@
import Route from '@ember/routing/route';
export default class ScopesScopeIndexRoute extends Route {
-
// =methods
/**
@@ -10,5 +9,4 @@ export default class ScopesScopeIndexRoute extends Route {
redirect() {
this.transitionTo('scopes.scope.authenticate');
}
-
}
diff --git a/ui/core/app/routes/scopes/scope/projects.js b/ui/core/app/routes/scopes/scope/projects.js
index a7ab28af6..8d9ef9c00 100644
--- a/ui/core/app/routes/scopes/scope/projects.js
+++ b/ui/core/app/routes/scopes/scope/projects.js
@@ -3,9 +3,9 @@ import { inject as service } from '@ember/service';
import { action } from '@ember/object';
export default class ScopesScopeProjectsRoute extends Route {
-
// =services
+ @service intl;
@service notify;
@service session;
@@ -61,11 +61,13 @@ export default class ScopesScopeProjectsRoute extends Route {
*/
@action
async save(project) {
+ const { isNew } = project;
try {
await project.save();
this.refresh();
- // TODO: replace with translated strings
- this.notify.success('Save succeeded.');
+ this.notify.success(
+ this.intl.t(isNew ? 'notify.create-success' : 'notify.save-success')
+ );
this.transitionTo('scopes.scope.projects.project', project);
} catch (error) {
// TODO: replace with translated strings
@@ -82,13 +84,11 @@ export default class ScopesScopeProjectsRoute extends Route {
try {
await project.destroyRecord();
this.refresh();
+ this.notify.success('notify.delete-success');
this.transitionTo('scopes.scope.projects');
- // TODO: replace with translated strings
- this.notify.success('Deleted project succesfully.');
} catch (error) {
// TODO: replace with translated strings
this.notify.error(error.message, { closeAfter: null });
}
}
-
}
diff --git a/ui/core/app/routes/scopes/scope/projects/index.js b/ui/core/app/routes/scopes/scope/projects/index.js
index 294371052..d763c183c 100644
--- a/ui/core/app/routes/scopes/scope/projects/index.js
+++ b/ui/core/app/routes/scopes/scope/projects/index.js
@@ -1,4 +1,3 @@
import Route from '@ember/routing/route';
-export default class ScopesScopeProjectsIndexRoute extends Route {
-}
+export default class ScopesScopeProjectsIndexRoute extends Route {}
diff --git a/ui/core/app/routes/scopes/scope/projects/new.js b/ui/core/app/routes/scopes/scope/projects/new.js
index 1781f5269..207ca3dbc 100644
--- a/ui/core/app/routes/scopes/scope/projects/new.js
+++ b/ui/core/app/routes/scopes/scope/projects/new.js
@@ -1,7 +1,6 @@
import Route from '@ember/routing/route';
export default class ScopesScopeProjectsNewRoute extends Route {
-
// =methods
/**
@@ -12,8 +11,7 @@ export default class ScopesScopeProjectsNewRoute extends Route {
const { id } = this.modelFor('scopes.scope');
return this.store.createRecord('scope', {
type: 'project',
- scopeID: id
+ scopeID: id,
});
}
-
}
diff --git a/ui/core/app/routes/scopes/scope/projects/project.js b/ui/core/app/routes/scopes/scope/projects/project.js
index e5d96124b..dae7bbcd3 100644
--- a/ui/core/app/routes/scopes/scope/projects/project.js
+++ b/ui/core/app/routes/scopes/scope/projects/project.js
@@ -1,7 +1,6 @@
import Route from '@ember/routing/route';
export default class ScopesScopeProjectsProjectRoute extends Route {
-
// =methods
/**
@@ -28,5 +27,4 @@ export default class ScopesScopeProjectsProjectRoute extends Route {
});
super.renderTemplate(...arguments);
}
-
}
diff --git a/ui/core/app/routes/scopes/scope/projects/project/index.js b/ui/core/app/routes/scopes/scope/projects/project/index.js
index f5511f2e7..a004bac08 100644
--- a/ui/core/app/routes/scopes/scope/projects/project/index.js
+++ b/ui/core/app/routes/scopes/scope/projects/project/index.js
@@ -1,4 +1,3 @@
import Route from '@ember/routing/route';
-export default class ScopesScopeProjectsProjectIndexRoute extends Route {
-}
+export default class ScopesScopeProjectsProjectIndexRoute extends Route {}
diff --git a/ui/core/app/routes/scopes/scope/roles.js b/ui/core/app/routes/scopes/scope/roles.js
new file mode 100644
index 000000000..84cf2ae0f
--- /dev/null
+++ b/ui/core/app/routes/scopes/scope/roles.js
@@ -0,0 +1,70 @@
+import Route from '@ember/routing/route';
+import { inject as service } from '@ember/service';
+import { action } from '@ember/object';
+
+export default class ScopesScopeRolesRoute extends Route {
+ // =services
+
+ @service intl;
+ @service notify;
+
+ // =methods
+
+ /**
+ * Load all roles under current scope.
+ * @return {Promise{[RoleModel]}}
+ */
+ async model() {
+ const { id: scopeID } = this.modelFor('scopes.scope');
+ return this.store.findAll('role', { adapterOptions: { scopeID } });
+ }
+
+ // =actions
+ /**
+ * Rollback changes on an role.
+ * @param {RoleModel} role
+ */
+ @action
+ cancel(role) {
+ const { isNew } = role;
+ role.rollbackAttributes();
+ if (isNew) this.transitionTo('scopes.scope.roles');
+ }
+
+ /**
+ * Save an role in current scope.
+ * @param {RoleModel} role
+ */
+ @action
+ async save(role) {
+ const { isNew } = role;
+ try {
+ await role.save();
+ this.refresh();
+ this.notify.success(
+ this.intl.t(isNew ? 'notify.create-success' : 'notify.save-success')
+ );
+ this.transitionTo('scopes.scope.roles.role', role);
+ } catch (error) {
+ // TODO: replace with translated strings
+ this.notify.error(error.message, { closeAfter: null });
+ }
+ }
+
+ /**
+ * Delete role in current scope and redirect to index.
+ * @param {RoleModel} role
+ */
+ @action
+ async delete(role) {
+ try {
+ await role.destroyRecord();
+ this.refresh();
+ this.notify.success(this.intl.t('notify.delete-success'));
+ this.transitionTo('scopes.scope.roles');
+ } catch (error) {
+ // TODO: replace with translated strings
+ this.notify.error(error.message, { closeAfter: null });
+ }
+ }
+}
diff --git a/ui/core/app/routes/scopes/scope/roles/index.js b/ui/core/app/routes/scopes/scope/roles/index.js
new file mode 100644
index 000000000..f2a8d7af1
--- /dev/null
+++ b/ui/core/app/routes/scopes/scope/roles/index.js
@@ -0,0 +1,3 @@
+import Route from '@ember/routing/route';
+
+export default class ScopesScopeRolesIndexRoute extends Route {}
diff --git a/ui/core/app/routes/scopes/scope/roles/new.js b/ui/core/app/routes/scopes/scope/roles/new.js
new file mode 100644
index 000000000..6b5e27688
--- /dev/null
+++ b/ui/core/app/routes/scopes/scope/roles/new.js
@@ -0,0 +1,14 @@
+import Route from '@ember/routing/route';
+
+export default class ScopesScopeRolesNewRoute extends Route {
+ // =methods
+
+ /**
+ * Creates a new unsaved role.
+ * @return {RoleModel}
+ */
+ model() {
+ const scopeModel = this.modelFor('scopes.scope');
+ return this.store.createRecord('role', { scopeModel });
+ }
+}
diff --git a/ui/core/app/routes/scopes/scope/roles/role.js b/ui/core/app/routes/scopes/scope/roles/role.js
new file mode 100644
index 000000000..7fb8d3db7
--- /dev/null
+++ b/ui/core/app/routes/scopes/scope/roles/role.js
@@ -0,0 +1,18 @@
+import Route from '@ember/routing/route';
+
+export default class ScopesScopeRolesRoleRoute extends Route {
+ // =methods
+
+ /**
+ * Load a role in current scope.
+ * @param {object} params
+ * @param {string} params.role_id
+ * @return {RoleModel}
+ */
+ async model({ role_id }) {
+ const { id: scopeID } = this.modelFor('scopes.scope');
+ return this.store.findRecord('role', role_id, {
+ adapterOptions: { scopeID },
+ });
+ }
+}
diff --git a/ui/core/app/routes/scopes/scope/roles/role/index.js b/ui/core/app/routes/scopes/scope/roles/role/index.js
new file mode 100644
index 000000000..359e9c9f5
--- /dev/null
+++ b/ui/core/app/routes/scopes/scope/roles/role/index.js
@@ -0,0 +1,3 @@
+import Route from '@ember/routing/route';
+
+export default class ScopesScopeRolesRoleIndexRoute extends Route {}
diff --git a/ui/core/app/routes/scopes/scope/users.js b/ui/core/app/routes/scopes/scope/users.js
new file mode 100644
index 000000000..f1982b769
--- /dev/null
+++ b/ui/core/app/routes/scopes/scope/users.js
@@ -0,0 +1,71 @@
+import Route from '@ember/routing/route';
+import { inject as service } from '@ember/service';
+import { action } from '@ember/object';
+
+export default class ScopesScopeUsersRoute extends Route {
+ // =services
+
+ @service intl;
+ @service notify;
+
+ // =methods
+
+ /**
+ * Load all users under current scope.
+ * @return {Promise{[UserModel]}}
+ */
+ async model() {
+ const { id: scopeID } = this.modelFor('scopes.scope');
+ return this.store.findAll('user', { adapterOptions: { scopeID } });
+ }
+
+ // =actions
+ /**
+ * Rollback changes on an user.
+ * @param {UserModel} user
+ */
+ @action
+ cancel(user) {
+ const { isNew } = user;
+ user.rollbackAttributes();
+ if (isNew) this.transitionTo('scopes.scope.users');
+ }
+
+ /**
+ * Save an user in current scope.
+ * @param {UserModel} user
+ * @param {Event} e
+ */
+ @action
+ async save(user) {
+ const { isNew } = user;
+ try {
+ await user.save();
+ this.refresh();
+ this.notify.success(
+ this.intl.t(isNew ? 'notify.create-success' : 'notify.save-success')
+ );
+ this.transitionTo('scopes.scope.users.user', user);
+ } catch (error) {
+ // TODO: replace with translated strings
+ this.notify.error(error.message, { closeAfter: null });
+ }
+ }
+
+ /**
+ * Delete user in current scope and redirect to index.
+ * @param {UserModel} user
+ */
+ @action
+ async delete(user) {
+ try {
+ await user.destroyRecord();
+ this.refresh();
+ this.notify.success(this.intl.t('notify.delete-success'));
+ this.transitionTo('scopes.scope.users');
+ } catch (error) {
+ // TODO: replace with translated strings
+ this.notify.error(error.message, { closeAfter: null });
+ }
+ }
+}
diff --git a/ui/core/app/routes/scopes/scope/users/index.js b/ui/core/app/routes/scopes/scope/users/index.js
new file mode 100644
index 000000000..f59170106
--- /dev/null
+++ b/ui/core/app/routes/scopes/scope/users/index.js
@@ -0,0 +1,3 @@
+import Route from '@ember/routing/route';
+
+export default class ScopesScopeUsersIndexRoute extends Route {}
diff --git a/ui/core/app/routes/scopes/scope/users/new.js b/ui/core/app/routes/scopes/scope/users/new.js
new file mode 100644
index 000000000..469680a4e
--- /dev/null
+++ b/ui/core/app/routes/scopes/scope/users/new.js
@@ -0,0 +1,14 @@
+import Route from '@ember/routing/route';
+
+export default class ScopesScopeUsersNewRoute extends Route {
+ // =methods
+
+ /**
+ * Creates a new unsaved user.
+ * @return {UserModel}
+ */
+ model() {
+ const scopeModel = this.modelFor('scopes.scope');
+ return this.store.createRecord('user', { scopeModel });
+ }
+}
diff --git a/ui/core/app/routes/scopes/scope/users/user.js b/ui/core/app/routes/scopes/scope/users/user.js
new file mode 100644
index 000000000..ffbf19e7e
--- /dev/null
+++ b/ui/core/app/routes/scopes/scope/users/user.js
@@ -0,0 +1,18 @@
+import Route from '@ember/routing/route';
+
+export default class ScopesScopeUsersUserRoute extends Route {
+ // =methods
+
+ /**
+ * Load a user in current scope.
+ * @param {object} params
+ * @param {string} params.user_id
+ * @return {UserModel}
+ */
+ async model({ user_id }) {
+ const { id: scopeID } = this.modelFor('scopes.scope');
+ return this.store.findRecord('user', user_id, {
+ adapterOptions: { scopeID },
+ });
+ }
+}
diff --git a/ui/core/app/routes/scopes/scope/users/user/index.js b/ui/core/app/routes/scopes/scope/users/user/index.js
new file mode 100644
index 000000000..fde042f35
--- /dev/null
+++ b/ui/core/app/routes/scopes/scope/users/user/index.js
@@ -0,0 +1,3 @@
+import Route from '@ember/routing/route';
+
+export default class ScopesScopeUsersUserIndexRoute extends Route {}
diff --git a/ui/core/app/session-stores/application.js b/ui/core/app/session-stores/application.js
index 80d0603db..48b3bc4be 100644
--- a/ui/core/app/session-stores/application.js
+++ b/ui/core/app/session-stores/application.js
@@ -4,7 +4,6 @@ import { get } from '@ember/object';
//import config from '../config/environment';
export default class ApplicationSessionStore extends LocalStorageSessionStore {
-
@service store;
/**
@@ -41,7 +40,6 @@ export default class ApplicationSessionStore extends LocalStorageSessionStore {
const authenticated = get(sessionData, 'authenticated');
if (scope && authenticated) authenticated.scope = scope;
}
-
}
// import CookieSessionStore from 'auth/session-stores/cookie';
diff --git a/ui/core/app/templates/scopes/scope.hbs b/ui/core/app/templates/scopes/scope.hbs
index 172eefc48..172b8d490 100644
--- a/ui/core/app/templates/scopes/scope.hbs
+++ b/ui/core/app/templates/scopes/scope.hbs
@@ -7,6 +7,18 @@
{{t "resources.projects"}}
+
+
+
+ {{t "resources.users"}}
+
+
+ {{t "resources.groups"}}
+
+
+ {{t "resources.roles"}}
+
+
{{outlet "sidebar"}}
diff --git a/ui/core/app/templates/scopes/scope/groups.hbs b/ui/core/app/templates/scopes/scope/groups.hbs
new file mode 100644
index 000000000..c53da7f4b
--- /dev/null
+++ b/ui/core/app/templates/scopes/scope/groups.hbs
@@ -0,0 +1,3 @@
+{{title (t "resources.groups")}}
+
+{{outlet}}
diff --git a/ui/core/app/templates/scopes/scope/groups/group.hbs b/ui/core/app/templates/scopes/scope/groups/group.hbs
new file mode 100644
index 000000000..d66e83390
--- /dev/null
+++ b/ui/core/app/templates/scopes/scope/groups/group.hbs
@@ -0,0 +1,3 @@
+{{title @model.displayName}}
+
+{{outlet}}
diff --git a/ui/core/app/templates/scopes/scope/groups/group/index.hbs b/ui/core/app/templates/scopes/scope/groups/group/index.hbs
new file mode 100644
index 000000000..ac8915f59
--- /dev/null
+++ b/ui/core/app/templates/scopes/scope/groups/group/index.hbs
@@ -0,0 +1,35 @@
+
+
+
+
+
+
+
+ {{t "resources.group"}}
+
+
+
+
+
+ {{t 'titles.details'}}
+
+
+
+
+
+
+
+
+ {{t 'actions.delete'}}
+
+
+
+
diff --git a/ui/core/app/templates/scopes/scope/groups/index.hbs b/ui/core/app/templates/scopes/scope/groups/index.hbs
new file mode 100644
index 000000000..cddaa478b
--- /dev/null
+++ b/ui/core/app/templates/scopes/scope/groups/index.hbs
@@ -0,0 +1,63 @@
+
+
+
+
+
+
+
+ {{t "resources.groups"}}
+
+
+
+ {{#if @model}}
+ {{t 'titles.new'}}
+ {{/if}}
+
+
+
+
+ {{#if @model}}
+
+
+
+
+ {{t 'form.label.name'}}
+ {{t 'form.label.description'}}
+
+
+
+ {{#each @model as |group|}}
+
+
+
+ {{group.name}}
+
+
+ {{group.description}}
+
+ {{/each}}
+
+
+
+ {{else}}
+
+
+
+
+ {{t 'descriptions.groups-welcome'}}
+
+
+
+ {{t 'titles.new'}}
+
+
+
+
+ {{/if}}
+
+
+
+
diff --git a/ui/core/app/templates/scopes/scope/groups/new.hbs b/ui/core/app/templates/scopes/scope/groups/new.hbs
new file mode 100644
index 000000000..b8f782b23
--- /dev/null
+++ b/ui/core/app/templates/scopes/scope/groups/new.hbs
@@ -0,0 +1,21 @@
+{{title (t 'titles.new')}}
+
+
+
+
+
+
+
+
+ {{t "titles.new"}}
+
+
+
+
+
+
+
diff --git a/ui/core/app/templates/scopes/scope/roles.hbs b/ui/core/app/templates/scopes/scope/roles.hbs
new file mode 100644
index 000000000..6d511b7f7
--- /dev/null
+++ b/ui/core/app/templates/scopes/scope/roles.hbs
@@ -0,0 +1,3 @@
+{{title (t "resources.roles")}}
+
+{{outlet}}
diff --git a/ui/core/app/templates/scopes/scope/roles/index.hbs b/ui/core/app/templates/scopes/scope/roles/index.hbs
new file mode 100644
index 000000000..e0e28cf9a
--- /dev/null
+++ b/ui/core/app/templates/scopes/scope/roles/index.hbs
@@ -0,0 +1,63 @@
+
+
+
+
+
+
+
+ {{t "resources.roles"}}
+
+
+
+ {{#if @model}}
+ {{t 'titles.new'}}
+ {{/if}}
+
+
+
+
+ {{#if @model}}
+
+
+
+
+ {{t 'form.label.name'}}
+ {{t 'form.label.description'}}
+
+
+
+ {{#each @model as |role|}}
+
+
+
+ {{role.displayName}}
+
+
+ {{role.description}}
+
+ {{/each}}
+
+
+
+ {{else}}
+
+
+
+
+ {{t 'descriptions.roles-welcome'}}
+
+
+
+ {{t 'titles.new'}}
+
+
+
+
+ {{/if}}
+
+
+
+
diff --git a/ui/core/app/templates/scopes/scope/roles/new.hbs b/ui/core/app/templates/scopes/scope/roles/new.hbs
new file mode 100644
index 000000000..efddd8fb9
--- /dev/null
+++ b/ui/core/app/templates/scopes/scope/roles/new.hbs
@@ -0,0 +1,19 @@
+{{title (t 'titles.new')}}
+
+
+
+
+
+
+
+ {{t "titles.new"}}
+
+
+
+
+
+
diff --git a/ui/core/app/templates/scopes/scope/roles/role.hbs b/ui/core/app/templates/scopes/scope/roles/role.hbs
new file mode 100644
index 000000000..d66e83390
--- /dev/null
+++ b/ui/core/app/templates/scopes/scope/roles/role.hbs
@@ -0,0 +1,3 @@
+{{title @model.displayName}}
+
+{{outlet}}
diff --git a/ui/core/app/templates/scopes/scope/roles/role/index.hbs b/ui/core/app/templates/scopes/scope/roles/role/index.hbs
new file mode 100644
index 000000000..1b35c1929
--- /dev/null
+++ b/ui/core/app/templates/scopes/scope/roles/role/index.hbs
@@ -0,0 +1,27 @@
+
+
+
+
+
+
+
+ {{t "resources.role"}}
+
+
+
+
+
+
+ {{t 'actions.delete'}}
+
+
+
+
diff --git a/ui/core/app/templates/scopes/scope/users.hbs b/ui/core/app/templates/scopes/scope/users.hbs
new file mode 100644
index 000000000..67ccbeb9e
--- /dev/null
+++ b/ui/core/app/templates/scopes/scope/users.hbs
@@ -0,0 +1,3 @@
+{{title (t "resources.users")}}
+
+{{outlet}}
diff --git a/ui/core/app/templates/scopes/scope/users/index.hbs b/ui/core/app/templates/scopes/scope/users/index.hbs
new file mode 100644
index 000000000..1ee0f3ac2
--- /dev/null
+++ b/ui/core/app/templates/scopes/scope/users/index.hbs
@@ -0,0 +1,63 @@
+
+
+
+
+
+
+
+ {{t "resources.users"}}
+
+
+
+ {{#if @model}}
+ {{t 'titles.new'}}
+ {{/if}}
+
+
+
+
+ {{#if @model}}
+
+
+
+
+ {{t 'form.label.name'}}
+ {{t 'form.label.description'}}
+
+
+
+ {{#each @model as |user|}}
+
+
+
+ {{user.name}}
+
+
+ {{user.description}}
+
+ {{/each}}
+
+
+
+ {{else}}
+
+
+
+
+ {{t 'descriptions.users-welcome'}}
+
+
+
+ {{t 'titles.new'}}
+
+
+
+
+ {{/if}}
+
+
+
+
diff --git a/ui/core/app/templates/scopes/scope/users/new.hbs b/ui/core/app/templates/scopes/scope/users/new.hbs
new file mode 100644
index 000000000..08e72531c
--- /dev/null
+++ b/ui/core/app/templates/scopes/scope/users/new.hbs
@@ -0,0 +1,21 @@
+{{title (t 'titles.new')}}
+
+
+
+
+
+
+
+
+ {{t "titles.new"}}
+
+
+
+
+
+
+
diff --git a/ui/core/app/templates/scopes/scope/users/user.hbs b/ui/core/app/templates/scopes/scope/users/user.hbs
new file mode 100644
index 000000000..d66e83390
--- /dev/null
+++ b/ui/core/app/templates/scopes/scope/users/user.hbs
@@ -0,0 +1,3 @@
+{{title @model.displayName}}
+
+{{outlet}}
diff --git a/ui/core/app/templates/scopes/scope/users/user/index.hbs b/ui/core/app/templates/scopes/scope/users/user/index.hbs
new file mode 100644
index 000000000..d80978336
--- /dev/null
+++ b/ui/core/app/templates/scopes/scope/users/user/index.hbs
@@ -0,0 +1,35 @@
+
+
+
+
+
+
+
+ {{t "resources.user"}}
+
+
+
+
+
+ {{t 'titles.details'}}
+
+
+
+
+
+
+
+
+ {{t 'actions.delete'}}
+
+
+
+
diff --git a/ui/core/mirage/config.js b/ui/core/mirage/config.js
index fec96c052..5d54a9320 100644
--- a/ui/core/mirage/config.js
+++ b/ui/core/mirage/config.js
@@ -65,7 +65,7 @@ export default function() {
this.patch('/scopes/:scope_id/roles/:id');
this.del('/scopes/:scope_id/roles/:id');
- // group
+ // IAM: Groups
this.get('/scopes/:scope_id/groups');
this.post('/scopes/:scope_id/groups');
this.get('/scopes/:scope_id/groups/:id');
diff --git a/ui/core/mirage/scenarios/default.js b/ui/core/mirage/scenarios/default.js
index 7bc409465..01b55037b 100644
--- a/ui/core/mirage/scenarios/default.js
+++ b/ui/core/mirage/scenarios/default.js
@@ -17,12 +17,12 @@ export default function(server) {
server.createList('auth-method', 3, { scope });
// User
- server.createList('user', 5);
+ server.createList('user', 5, { scope });
// Role
- server.createList('role', 5);
+ server.createList('role', 5, { scope });
// Groups
- server.createList('group', 5);
+ server.createList('group', 5, { scope });
// Other resources
diff --git a/ui/core/tests/acceptance/authentication-test.js b/ui/core/tests/acceptance/authentication-test.js
index f6fa1c8ab..3481337bb 100644
--- a/ui/core/tests/acceptance/authentication-test.js
+++ b/ui/core/tests/acceptance/authentication-test.js
@@ -9,7 +9,7 @@ import {
invalidateSession,
} from 'ember-simple-auth/test-support';
-module('Acceptance | authentication', function(hooks) {
+module('Acceptance | authentication', function (hooks) {
setupApplicationTest(hooks);
setupMirage(hooks);
@@ -30,10 +30,14 @@ module('Acceptance | authentication', function(hooks) {
invalidateSession();
indexURL = '/';
globalScope = this.server.create('scope', { id: 'global' });
- orgScope = this.server.create('scope', {
- type: 'org',
- scope: { id: globalScope.id, type: globalScope.type }
- }, 'withChildren');
+ orgScope = this.server.create(
+ 'scope',
+ {
+ type: 'org',
+ scope: { id: globalScope.id, type: globalScope.type },
+ },
+ 'withChildren'
+ );
scope = { id: orgScope.id, type: orgScope.type };
authMethod = this.server.create('auth-method', { scope });
orgScopeID = orgScope.id;
@@ -45,14 +49,14 @@ module('Acceptance | authentication', function(hooks) {
projectsURL = `/scopes/${orgScopeID}/projects`;
});
- test('visiting auth methods authenticate route redirects to first auth method', async function(assert) {
+ test('visiting auth methods authenticate route redirects to first auth method', async function (assert) {
assert.expect(1);
await visit(authenticateURL);
await a11yAudit();
assert.equal(currentURL(), authMethodAuthenticateURL);
});
- test('visiting any authentication parent route while unauthenticated redirects to first authenticate method', async function(assert) {
+ test('visiting any authentication parent route while unauthenticated redirects to first authenticate method', async function (assert) {
assert.expect(3);
await visit(indexURL);
assert.equal(currentURL(), authMethodAuthenticateURL);
@@ -61,21 +65,21 @@ module('Acceptance | authentication', function(hooks) {
assert.notOk(currentSession().isAuthenticated);
});
- test('visiting projects while unauthenticated redirects to first authenticate method', async function(assert) {
+ test('visiting projects while unauthenticated redirects to first authenticate method', async function (assert) {
assert.expect(2);
await visit(projectsURL);
assert.equal(currentURL(), authMethodAuthenticateURL);
assert.notOk(currentSession().isAuthenticated);
});
- test('visiting auth method authenticate route', async function(assert) {
+ test('visiting auth method authenticate route', async function (assert) {
assert.expect(1);
await visit(authMethodAuthenticateURL);
await a11yAudit();
assert.equal(currentURL(), authMethodAuthenticateURL);
});
- test('visiting any authentication parent route while already authenticated redirects to projects', async function(assert) {
+ test('visiting any authentication parent route while already authenticated redirects to projects', async function (assert) {
assert.expect(6);
authenticateSession({ scope });
await visit(indexURL);
@@ -91,7 +95,7 @@ module('Acceptance | authentication', function(hooks) {
assert.ok(currentSession().isAuthenticated);
});
- test('failed authentication shows a notification message', async function(assert) {
+ test('failed authentication shows a notification message', async function (assert) {
assert.expect(3);
await visit(authMethodAuthenticateURL);
assert.notOk(currentSession().isAuthenticated);
@@ -101,7 +105,7 @@ module('Acceptance | authentication', function(hooks) {
assert.notOk(currentSession().isAuthenticated);
});
- test('successful authentication redirects to projects', async function(assert) {
+ test('successful authentication redirects to projects', async function (assert) {
assert.expect(4);
await visit(authMethodAuthenticateURL);
assert.notOk(currentSession().isAuthenticated);
@@ -113,7 +117,7 @@ module('Acceptance | authentication', function(hooks) {
assert.ok(currentSession().isAuthenticated);
});
- test('deauthentication redirects to first authenticate method', async function(assert) {
+ test('deauthentication redirects to first authenticate method', async function (assert) {
assert.expect(3);
await visit(authMethodAuthenticateURL);
await fillIn('[name="identification"]', 'test');
@@ -124,5 +128,4 @@ module('Acceptance | authentication', function(hooks) {
assert.notOk(currentSession().isAuthenticated);
assert.equal(currentURL(), authMethodAuthenticateURL);
});
-
});
diff --git a/ui/core/tests/acceptance/bread-crumbs-test.js b/ui/core/tests/acceptance/bread-crumbs-test.js
index 7c33595e9..67288382c 100644
--- a/ui/core/tests/acceptance/bread-crumbs-test.js
+++ b/ui/core/tests/acceptance/bread-crumbs-test.js
@@ -7,7 +7,8 @@ module('Acceptance | breadcrumbs', function (hooks) {
setupApplicationTest(hooks);
setupMirage(hooks);
- let org;
+ let orgScope;
+ let getProjectScope;
let project;
let hostCatalog;
let user;
@@ -22,142 +23,219 @@ module('Acceptance | breadcrumbs', function (hooks) {
let crumbPath;
hooks.beforeEach(function () {
- org = this.server.create('org');
- project = this.server.create('project');
- user = this.server.create('user');
+ orgScope = this.server.create(
+ 'scope',
+ {
+ type: 'org',
+ },
+ 'withChildren'
+ );
- hostCatalog = this.server.create('host-catalog');
+ getProjectScope = () =>
+ this.server.schema.scopes.where({ type: 'project' }).models[0];
+
+ project = getProjectScope();
+ user = this.server.create('user');
role = this.server.create('role');
group = this.server.create('group');
- projectsURL = `/orgs/${org.id}/projects`;
+ projectsURL = `/scopes/${orgScope.id}/projects`;
newProjectURL = `${projectsURL}/new`;
projectURL = `${projectsURL}/${project.id}`;
- hostCatalogsURL = `${projectURL}/host-catalogs`;
- newHostCatalogURL = `${hostCatalogsURL}/new`;
- hostCatalogURL = `${hostCatalogsURL}/${hostCatalog.id}`;
-
- rolesURL = `/orgs/${org.id}/roles`;
+ rolesURL = `/scopes/${orgScope.id}/roles`;
newRoleURL = `${rolesURL}/new`;
roleURL = `${rolesURL}/${role.id}`;
- groupsURL = `/orgs/${org.id}/groups`;
+ groupsURL = `/scopes/${orgScope.id}/groups`;
newGroupURL = `${groupsURL}/new`;
groupURL = `${groupsURL}/${group.id}`;
- usersURL = `/orgs/${org.id}/users`;
+ usersURL = `/scopes/${orgScope.id}/users`;
newUserURL = `${usersURL}/${user.id}`;
userURL = `${usersURL}/new`;
+
+ // TODO: Update hostcatalog to scopes
+ hostCatalog = this.server.create('host-catalog');
+ hostCatalogsURL = `${projectURL}/host-catalogs`;
+ newHostCatalogURL = `${hostCatalogsURL}/new`;
+ hostCatalogURL = `${hostCatalogsURL}/${hostCatalog.id}`;
});
test('can navigate via breadcrumbs to projects from project', async function (assert) {
assert.expect(3);
await visit(projectURL);
assert.equal(currentURL(), projectURL, 'We begin on the expected page.');
- crumbPath = new URL(find('.rose-nav-breadcrumbs-link:last-child').href).pathname;
+ crumbPath = new URL(find('.rose-nav-breadcrumbs-link:last-child').href)
+ .pathname;
assert.equal(crumbPath, projectURL, 'Last crumb has expected URL.');
await click(find('.rose-nav-breadcrumbs-link:first-child'));
- assert.equal(currentURL(), projectsURL, 'After navigating via breadcrumbs, we are one level up.');
+ assert.equal(
+ currentURL(),
+ projectsURL,
+ 'After navigating via breadcrumbs, we are one level up.'
+ );
});
test('can navigate via breadcrumbs to projects from new project', async function (assert) {
assert.expect(3);
await visit(newProjectURL);
assert.equal(currentURL(), newProjectURL, 'We begin on the expected page.');
- crumbPath = new URL(find('.rose-nav-breadcrumbs-link:last-child').href).pathname;
+ crumbPath = new URL(find('.rose-nav-breadcrumbs-link:last-child').href)
+ .pathname;
assert.equal(crumbPath, newProjectURL, 'Last crumb has expected URL.');
await click(find('.rose-nav-breadcrumbs-link:first-child'));
- assert.equal(currentURL(), projectsURL, 'After navigating via breadcrumbs, we are one level up.');
+ assert.equal(
+ currentURL(),
+ projectsURL,
+ 'After navigating via breadcrumbs, we are one level up.'
+ );
});
test('can navigate via breadcrumbs to project from host catalogs', async function (assert) {
assert.expect(3);
await visit(hostCatalogsURL);
- assert.equal(currentURL(), hostCatalogsURL, 'We begin on the expected page.');
- crumbPath = new URL(find('.rose-nav-breadcrumbs-link:last-child').href).pathname;
+ assert.equal(
+ currentURL(),
+ hostCatalogsURL,
+ 'We begin on the expected page.'
+ );
+ crumbPath = new URL(find('.rose-nav-breadcrumbs-link:last-child').href)
+ .pathname;
assert.equal(crumbPath, hostCatalogsURL, 'Last crumb has expected URL.');
await click(findAll('.rose-nav-breadcrumbs-link')[1]);
- assert.equal(currentURL(), projectURL, 'After navigating via breadcrumbs, we are one level up.');
+ assert.equal(
+ currentURL(),
+ projectURL,
+ 'After navigating via breadcrumbs, we are one level up.'
+ );
});
test('can navigate via breadcrumbs to host catalogs from host catalog', async function (assert) {
assert.expect(3);
await visit(hostCatalogURL);
- assert.equal(currentURL(), hostCatalogURL, 'We begin on the expected page.');
- crumbPath = new URL(find('.rose-nav-breadcrumbs-link:last-child').href).pathname;
+ assert.equal(
+ currentURL(),
+ hostCatalogURL,
+ 'We begin on the expected page.'
+ );
+ crumbPath = new URL(find('.rose-nav-breadcrumbs-link:last-child').href)
+ .pathname;
assert.equal(crumbPath, hostCatalogURL, 'Last crumb has expected URL.');
await click(findAll('.rose-nav-breadcrumbs-link')[2]);
- assert.equal(currentURL(), hostCatalogsURL, 'After navigating via breadcrumbs, we are one level up.');
+ assert.equal(
+ currentURL(),
+ hostCatalogsURL,
+ 'After navigating via breadcrumbs, we are one level up.'
+ );
});
test('can navigate via breadcrumbs to host catalogs from new host catalog', async function (assert) {
assert.expect(3);
await visit(newHostCatalogURL);
- assert.equal(currentURL(), newHostCatalogURL, 'We begin on the expected page.');
- crumbPath = new URL(find('.rose-nav-breadcrumbs-link:last-child').href).pathname;
+ assert.equal(
+ currentURL(),
+ newHostCatalogURL,
+ 'We begin on the expected page.'
+ );
+ crumbPath = new URL(find('.rose-nav-breadcrumbs-link:last-child').href)
+ .pathname;
assert.equal(crumbPath, newHostCatalogURL, 'Last crumb has expected URL.');
await click(findAll('.rose-nav-breadcrumbs-link')[2]);
- assert.equal(currentURL(), hostCatalogsURL, 'After navigating via breadcrumbs, we are one level up.');
+ assert.equal(
+ currentURL(),
+ hostCatalogsURL,
+ 'After navigating via breadcrumbs, we are one level up.'
+ );
});
test('can navigate via breadcrumbs to roles from role', async function (assert) {
assert.expect(3);
await visit(roleURL);
assert.equal(currentURL(), roleURL, 'We begin on the expected page.');
- crumbPath = new URL(find('.rose-nav-breadcrumbs-link:last-child').href).pathname;
+ crumbPath = new URL(find('.rose-nav-breadcrumbs-link:last-child').href)
+ .pathname;
assert.equal(crumbPath, roleURL, 'Last crumb has expected URL.');
await click(find('.rose-nav-breadcrumbs-link:first-child'));
- assert.equal(currentURL(), rolesURL, 'After navigating via breadcrumbs, we are one level up.');
+ assert.equal(
+ currentURL(),
+ rolesURL,
+ 'After navigating via breadcrumbs, we are one level up.'
+ );
});
test('can navigate via breadcrumbs to roles from new role', async function (assert) {
assert.expect(3);
await visit(newRoleURL);
assert.equal(currentURL(), newRoleURL, 'We begin on the expected page.');
- crumbPath = new URL(find('.rose-nav-breadcrumbs-link:last-child').href).pathname;
+ crumbPath = new URL(find('.rose-nav-breadcrumbs-link:last-child').href)
+ .pathname;
assert.equal(crumbPath, newRoleURL, 'Last crumb has expected URL.');
await click(find('.rose-nav-breadcrumbs-link:first-child'));
- assert.equal(currentURL(), rolesURL, 'After navigating via breadcrumbs, we are one level up.');
+ assert.equal(
+ currentURL(),
+ rolesURL,
+ 'After navigating via breadcrumbs, we are one level up.'
+ );
});
test('can navigate via breadcrumbs to groups from group', async function (assert) {
assert.expect(3);
await visit(groupURL);
assert.equal(currentURL(), groupURL, 'We begin on the expected page.');
- crumbPath = new URL(find('.rose-nav-breadcrumbs-link:last-child').href).pathname;
+ crumbPath = new URL(find('.rose-nav-breadcrumbs-link:last-child').href)
+ .pathname;
assert.equal(crumbPath, groupURL, 'Last crumb has expected URL.');
await click(find('.rose-nav-breadcrumbs-link:first-child'));
- assert.equal(currentURL(), groupsURL, 'After navigating via breadcrumbs, we are one level up.');
+ assert.equal(
+ currentURL(),
+ groupsURL,
+ 'After navigating via breadcrumbs, we are one level up.'
+ );
});
test('can navigate via breadcrumbs to groups from new group', async function (assert) {
assert.expect(3);
await visit(newGroupURL);
assert.equal(currentURL(), newGroupURL, 'We begin on the expected page.');
- crumbPath = new URL(find('.rose-nav-breadcrumbs-link:last-child').href).pathname;
+ crumbPath = new URL(find('.rose-nav-breadcrumbs-link:last-child').href)
+ .pathname;
assert.equal(crumbPath, newGroupURL, 'Last crumb has expected URL.');
await click(find('.rose-nav-breadcrumbs-link:first-child'));
- assert.equal(currentURL(), groupsURL, 'After navigating via breadcrumbs, we are one level up.');
+ assert.equal(
+ currentURL(),
+ groupsURL,
+ 'After navigating via breadcrumbs, we are one level up.'
+ );
});
test('can navigate via breadcrumbs to users from user', async function (assert) {
assert.expect(3);
await visit(userURL);
assert.equal(currentURL(), userURL, 'We begin on the expected page.');
- crumbPath = new URL(find('.rose-nav-breadcrumbs-link:last-child').href).pathname;
+ crumbPath = new URL(find('.rose-nav-breadcrumbs-link:last-child').href)
+ .pathname;
assert.equal(crumbPath, userURL, 'Last crumb has expected URL.');
await click(find('.rose-nav-breadcrumbs-link:first-child'));
- assert.equal(currentURL(), usersURL, 'After navigating via breadcrumbs, we are one level up.');
+ assert.equal(
+ currentURL(),
+ usersURL,
+ 'After navigating via breadcrumbs, we are one level up.'
+ );
});
test('can navigate via breadcrumbs to users from new user', async function (assert) {
assert.expect(3);
await visit(newUserURL);
assert.equal(currentURL(), newUserURL, 'We begin on th expected page.');
- crumbPath = new URL(find('.rose-nav-breadcrumbs-link:last-child').href).pathname;
+ crumbPath = new URL(find('.rose-nav-breadcrumbs-link:last-child').href)
+ .pathname;
assert.equal(crumbPath, newUserURL, 'Last crumb has expected URL.');
await click(find('.rose-nav-breadcrumbs-link:first-child'));
- assert.equal(currentURL(), usersURL, 'After navigating via breadcrumbs, we are one level up.');
+ assert.equal(
+ currentURL(),
+ usersURL,
+ 'After navigating via breadcrumbs, we are one level up.'
+ );
});
});
diff --git a/ui/core/tests/acceptance/groups-test.js b/ui/core/tests/acceptance/groups-test.js
index 7f3f2ec69..b619d09ce 100644
--- a/ui/core/tests/acceptance/groups-test.js
+++ b/ui/core/tests/acceptance/groups-test.js
@@ -4,47 +4,81 @@ import { setupApplicationTest } from 'ember-qunit';
import setupMirage from 'ember-cli-mirage/test-support/setup-mirage';
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,
+} from 'ember-simple-auth/test-support';
-
-module('Acceptance | groups', function(hooks) {
+module('Acceptance | groups', function (hooks) {
setupApplicationTest(hooks);
setupMirage(hooks);
+ let orgScope;
+ let groupsURL;
+ let groupURL;
+ let newGroupURL;
+
hooks.beforeEach(function () {
- this.server.create('org');
+ orgScope = this.server.create(
+ 'scope',
+ {
+ type: 'org',
+ },
+ 'withChildren'
+ );
+
+ const group = this.server.create('group', {
+ scope: {
+ id: orgScope.id,
+ type: orgScope.type,
+ },
+ });
+
+ groupsURL = `/scopes/${orgScope.id}/groups`;
+ groupURL = `${groupsURL}/${group.id}`;
+ newGroupURL = `${groupsURL}/new`;
+
+ authenticateSession({});
});
test('visiting groups', async function (assert) {
assert.expect(1);
- await visit('/orgs/1/groups');
+ await visit(groupsURL);
await a11yAudit();
- assert.equal(currentURL(), '/orgs/1/groups');
+ assert.equal(currentURL(), groupsURL);
+ });
+
+ test('visiting a group', async function (assert) {
+ assert.expect(1);
+ await visit(newGroupURL);
+ await a11yAudit();
+ assert.equal(currentURL(), newGroupURL);
});
test('can create new group', async function (assert) {
- assert.expect(4);
- assert.equal(this.server.db.groups.length, 0);
- await visit('/orgs/1/groups/new');
+ assert.expect(1);
+ const groupsCount = this.server.db.groups.length;
+ await visit(newGroupURL);
await fillIn('[name="name"]', 'group name');
await click('[type="submit"]');
- assert.equal(currentURL(), '/orgs/1/groups/1');
- assert.equal(this.server.db.groups.length, 1);
- assert.equal(this.server.db.groups[0].name, 'group name');
+ assert.equal(this.server.db.groups.length, groupsCount + 1);
});
test('can cancel new group creation', async function (assert) {
- assert.expect(3);
- assert.equal(this.server.db.groups.length, 0);
- await visit('/orgs/1/groups/new');
+ assert.expect(2);
+ const groupsCount = this.server.db.groups.length;
+ await visit(newGroupURL);
await fillIn('[name="name"]', 'group name');
await click('.rose-form-actions [type="button"]');
- assert.equal(currentURL(), '/orgs/1/groups');
- assert.equal(this.server.db.groups.length, 0);
+ assert.equal(currentURL(), groupsURL);
+ assert.equal(this.server.db.groups.length, groupsCount);
});
test('saving a new group with invalid fields displays error messages', async function (assert) {
assert.expect(2);
- this.server.post('/orgs/:org_id/groups', () => {
+ this.server.post('/scopes/:scope_id/groups', () => {
return new Response(
400,
{},
@@ -63,7 +97,7 @@ module('Acceptance | groups', function(hooks) {
}
);
});
- await visit('/orgs/1/groups/new');
+ await visit(newGroupURL);
await fillIn('[name="name"]', 'group name');
await click('[type="submit"]');
assert.ok(
@@ -80,36 +114,32 @@ module('Acceptance | groups', function(hooks) {
test('can save changes to an existing group', async function (assert) {
assert.expect(2);
- this.server.createList('group', 1, {name: 'Admin group'});
- await visit('/orgs/1/groups/1');
+ await visit(groupURL);
await fillIn('[name="name"]', 'Updated admin group');
await click('.rose-form-actions [type="submit"]');
- assert.equal(currentURL(), '/orgs/1/groups/1');
+ assert.equal(currentURL(), groupURL);
assert.equal(this.server.db.groups[0].name, 'Updated admin group');
});
test('can cancel changes to an existing group', async function (assert) {
assert.expect(1);
- this.server.createList('group', 1, {name: 'Admin group'});
- await visit('/orgs/1/groups/1');
+ await visit(groupURL);
await fillIn('[name="name"]', 'Updated admin group');
await click('.rose-form-actions [type="button"]');
- assert.equal(find('[name="name"]').value, 'Admin group');
+ assert.notEqual(find('[name="name"]').value, 'Updated admin group');
});
- test('can delete a group', async function(assert) {
- assert.expect(2);
- this.server.createList('group', 1);
- assert.equal(this.server.db.groups.length, 1);
- await visit('/orgs/1/groups/1');
+ test('can delete a group', async function (assert) {
+ assert.expect(1);
+ const groupsCount = this.server.db.groups.length;
+ await visit(groupURL);
await click('.rose-button-warning');
- assert.equal(this.server.db.groups.length, 0);
+ assert.equal(this.server.db.groups.length, groupsCount - 1);
});
test('saving an existing group with invalid fields displays error messages', async function (assert) {
assert.expect(2);
- this.server.createList('group', 1);
- this.server.patch('/orgs/:org_id/groups/:id', () => {
+ this.server.patch('/scopes/:scope_id/groups/:id', () => {
return new Response(
400,
{},
@@ -128,7 +158,7 @@ module('Acceptance | groups', function(hooks) {
}
);
});
- await visit('/orgs/1/groups/1');
+ await visit(groupURL);
await fillIn('[name="name"]', 'random string');
await click('[type="submit"]');
assert.ok(
@@ -145,8 +175,7 @@ module('Acceptance | groups', function(hooks) {
test('errors are displayed when save project fails', async function (assert) {
assert.expect(1);
- this.server.createList('group', 1);
- this.server.patch('/orgs/:org_id/groups/:id', () => {
+ this.server.patch('/scopes/:scope_id/groups/:id', () => {
return new Response(
490,
{},
@@ -157,7 +186,7 @@ module('Acceptance | groups', function(hooks) {
}
);
});
- await visit('/orgs/1/groups/1');
+ await visit(groupURL);
await fillIn('[name="name"]', 'Role name');
await click('[type="submit"]');
assert.ok(
@@ -169,8 +198,7 @@ module('Acceptance | groups', function(hooks) {
test('errors are displayed when delete project fails', async function (assert) {
assert.expect(1);
- this.server.createList('group', 1);
- this.server.del('/orgs/:org_id/groups/:id', () => {
+ this.server.del('/scopes/:scope_id/groups/:id', () => {
return new Response(
490,
{},
@@ -181,7 +209,7 @@ module('Acceptance | groups', function(hooks) {
}
);
});
- await visit('/orgs/1/groups/1');
+ await visit(groupURL);
await click('.rose-button-warning');
assert.ok(
find('[role="alert"]').textContent.trim(),
diff --git a/ui/core/tests/acceptance/host-catalogs-test.js b/ui/core/tests/acceptance/host-catalogs-test.js
index 96b49cd8c..59bc08dcc 100644
--- a/ui/core/tests/acceptance/host-catalogs-test.js
+++ b/ui/core/tests/acceptance/host-catalogs-test.js
@@ -11,7 +11,7 @@ import {
//invalidateSession,
} from 'ember-simple-auth/test-support';
-module('Acceptance | host catalogs', function(hooks) {
+module('Acceptance | host catalogs', function (hooks) {
setupApplicationTest(hooks);
setupMirage(hooks);
@@ -65,7 +65,7 @@ module('Acceptance | host catalogs', function(hooks) {
assert.equal(currentURL(), urls.hostCatalogs);
});
- test('can navigate to host catalog form', async function(assert) {
+ test('can navigate to host catalog form', async function (assert) {
assert.expect(1);
authenticateSession({});
await visit(urls.hostCatalogs);
@@ -74,7 +74,7 @@ module('Acceptance | host catalogs', function(hooks) {
assert.equal(currentURL(), urls.hostCatalog);
});
- test('can delete host catalog', async function(assert) {
+ test('can delete host catalog', async function (assert) {
assert.expect(2);
const hostCatalogsCount = this.server.db.hostCatalogs.length;
authenticateSession({});
@@ -84,7 +84,7 @@ module('Acceptance | host catalogs', function(hooks) {
assert.equal(this.server.db.hostCatalogs.length, hostCatalogsCount - 1);
});
- test('can update host catalog and save changes', async function(assert) {
+ test('can update host catalog and save changes', async function (assert) {
assert.expect(1);
authenticateSession({});
await visit(urls.hostCatalog);
@@ -93,7 +93,7 @@ module('Acceptance | host catalogs', function(hooks) {
assert.equal(this.server.db.hostCatalogs[0].name, 'Test Name');
});
- test('can update host catalog and cancel changes', async function(assert) {
+ test('can update host catalog and cancel changes', async function (assert) {
assert.expect(1);
authenticateSession({});
await visit(urls.hostCatalog);
@@ -246,5 +246,4 @@ module('Acceptance | host catalogs', function(hooks) {
'Displays field-level errors.'
);
});
-
});
diff --git a/ui/core/tests/acceptance/projects-test.js b/ui/core/tests/acceptance/projects-test.js
index 57ba7c17e..bfa87857c 100644
--- a/ui/core/tests/acceptance/projects-test.js
+++ b/ui/core/tests/acceptance/projects-test.js
@@ -20,9 +20,11 @@ module('Acceptance | projects', function (hooks) {
let initialProjectScopesCount;
hooks.beforeEach(function () {
- org = this.server.create('scope', {type: 'org'}, 'withChildren');
- getProjectScopesCount = () => this.server.schema.scopes.where({type: 'project'}).length;
- getFirstProjectScope = () => this.server.schema.scopes.where({type: 'project'}).models[0];
+ org = this.server.create('scope', { type: 'org' }, 'withChildren');
+ getProjectScopesCount = () =>
+ this.server.schema.scopes.where({ type: 'project' }).length;
+ getFirstProjectScope = () =>
+ this.server.schema.scopes.where({ type: 'project' }).models[0];
initialProjectScopesCount = getProjectScopesCount();
orgID = org.id;
projectsURL = `/scopes/${orgID}/projects`;
@@ -44,7 +46,11 @@ module('Acceptance | projects', function (hooks) {
assert.notEqual(wrongProjectsURL, projectsURL);
await visit(wrongProjectsURL);
await a11yAudit();
- assert.equal(currentURL(), projectsURL, 'Wrong projects path was redirected to correct path.');
+ assert.equal(
+ currentURL(),
+ projectsURL,
+ 'Wrong projects path was redirected to correct path.'
+ );
});
test('can create new projects', async function (assert) {
@@ -119,7 +125,7 @@ module('Acceptance | projects', function (hooks) {
assert.equal(find('[name="name"]').value, existingProject.name);
});
- test('can delete project', async function(assert) {
+ test('can delete project', async function (assert) {
assert.expect(1);
await visit(existingProjectURL);
await click('.rose-button-warning');
diff --git a/ui/core/tests/acceptance/roles-test.js b/ui/core/tests/acceptance/roles-test.js
index 976ba47b7..dd8483574 100644
--- a/ui/core/tests/acceptance/roles-test.js
+++ b/ui/core/tests/acceptance/roles-test.js
@@ -4,46 +4,81 @@ import { setupApplicationTest } from 'ember-qunit';
import setupMirage from 'ember-cli-mirage/test-support/setup-mirage';
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,
+} from 'ember-simple-auth/test-support';
module('Acceptance | roles', function (hooks) {
setupApplicationTest(hooks);
setupMirage(hooks);
+ let orgScope;
+ let rolesURL;
+ let roleURL;
+ let newRoleURL;
+
hooks.beforeEach(function () {
- this.server.create('org');
+ orgScope = this.server.create(
+ 'scope',
+ {
+ type: 'org',
+ },
+ 'withChildren'
+ );
+
+ const role = this.server.create('role', {
+ scope: {
+ id: orgScope.id,
+ type: orgScope.type,
+ },
+ });
+
+ rolesURL = `/scopes/${orgScope.id}/roles`;
+ roleURL = `${rolesURL}/${role.id}`;
+ newRoleURL = `${rolesURL}/new`;
+
+ authenticateSession({});
});
test('visiting roles', async function (assert) {
assert.expect(1);
- await visit('/orgs/1/roles');
+ await visit(rolesURL);
await a11yAudit();
- assert.equal(currentURL(), '/orgs/1/roles');
+ assert.equal(currentURL(), rolesURL);
+ });
+
+ test('visiting a role', async function (assert) {
+ assert.expect(1);
+ await visit(newRoleURL);
+ await a11yAudit();
+ assert.equal(currentURL(), newRoleURL);
});
test('can create new role', async function (assert) {
- assert.expect(4);
- assert.equal(this.server.db.roles.length, 0);
- await visit('/orgs/1/roles/new');
+ assert.expect(1);
+ const rolesCount = this.server.db.roles.length;
+ await visit(newRoleURL);
await fillIn('[name="name"]', 'role name');
await click('[type="submit"]');
- assert.equal(currentURL(), '/orgs/1/roles/1');
- assert.equal(this.server.db.roles.length, 1);
- assert.equal(this.server.db.roles[0].name, 'role name');
+ assert.equal(this.server.db.roles.length, rolesCount + 1);
});
test('can cancel new role creation', async function (assert) {
- assert.expect(3);
- assert.equal(this.server.db.roles.length, 0);
- await visit('/orgs/1/roles/new');
+ assert.expect(2);
+ const rolesCount = this.server.db.roles.length;
+ await visit(newRoleURL);
await fillIn('[name="name"]', 'role name');
await click('.rose-form-actions [type="button"]');
- assert.equal(currentURL(), '/orgs/1/roles');
- assert.equal(this.server.db.roles.length, 0);
+ assert.equal(currentURL(), rolesURL);
+ assert.equal(this.server.db.roles.length, rolesCount);
});
test('saving a new role with invalid fields displays error messages', async function (assert) {
assert.expect(2);
- this.server.post('/orgs/:org_id/roles', () => {
+ this.server.post('/scopes/:scope_id/roles', () => {
return new Response(
400,
{},
@@ -62,7 +97,7 @@ module('Acceptance | roles', function (hooks) {
}
);
});
- await visit('/orgs/1/roles/new');
+ await visit(newRoleURL);
await fillIn('[name="name"]', 'role name');
await click('[type="submit"]');
assert.ok(
@@ -79,36 +114,32 @@ module('Acceptance | roles', function (hooks) {
test('can save changes to an existing role', async function (assert) {
assert.expect(2);
- this.server.createList('role', 1, {name: 'Admin role'});
- await visit('/orgs/1/roles/1');
+ await visit(roleURL);
await fillIn('[name="name"]', 'Updated admin role');
await click('.rose-form-actions [type="submit"]');
- assert.equal(currentURL(), '/orgs/1/roles/1');
+ assert.equal(currentURL(), roleURL);
assert.equal(this.server.db.roles[0].name, 'Updated admin role');
});
test('can cancel changes to an existing role', async function (assert) {
assert.expect(1);
- this.server.createList('role', 1, {name: 'Admin role'});
- await visit('/orgs/1/roles/1');
+ await visit(roleURL);
await fillIn('[name="name"]', 'Updated admin role');
await click('.rose-form-actions [type="button"]');
- assert.equal(find('[name="name"]').value, 'Admin role');
+ assert.notEqual(find('[name="name"]').value, 'Updated admin role');
});
- test('can delete a role', async function(assert) {
- assert.expect(2);
- this.server.createList('role', 1);
- assert.equal(this.server.db.roles.length, 1);
- await visit('/orgs/1/roles/1');
+ test('can delete a role', async function (assert) {
+ assert.expect(1);
+ const rolesCount = this.server.db.roles.length;
+ await visit(roleURL);
await click('.rose-button-warning');
- assert.equal(this.server.db.roles.length, 0);
+ assert.equal(this.server.db.roles.length, rolesCount - 1);
});
test('saving an existing role with invalid fields displays error messages', async function (assert) {
assert.expect(2);
- this.server.createList('role', 1);
- this.server.patch('/orgs/:org_id/roles/:id', () => {
+ this.server.patch('/scopes/:scope_id/roles/:id', () => {
return new Response(
400,
{},
@@ -127,7 +158,7 @@ module('Acceptance | roles', function (hooks) {
}
);
});
- await visit('/orgs/1/roles/1');
+ await visit(roleURL);
await fillIn('[name="name"]', 'random string');
await click('[type="submit"]');
assert.ok(
@@ -144,8 +175,7 @@ module('Acceptance | roles', function (hooks) {
test('errors are displayed when save project fails', async function (assert) {
assert.expect(1);
- this.server.createList('role', 1);
- this.server.patch('/orgs/:org_id/roles/:id', () => {
+ this.server.patch('/scopes/:scope_id/roles/:id', () => {
return new Response(
490,
{},
@@ -156,7 +186,7 @@ module('Acceptance | roles', function (hooks) {
}
);
});
- await visit('/orgs/1/roles/1');
+ await visit(roleURL);
await fillIn('[name="name"]', 'Role name');
await click('[type="submit"]');
assert.ok(
@@ -168,8 +198,7 @@ module('Acceptance | roles', function (hooks) {
test('errors are displayed when delete project fails', async function (assert) {
assert.expect(1);
- this.server.createList('role', 1);
- this.server.del('/orgs/:org_id/roles/:id', () => {
+ this.server.del('/scopes/:scope_id/roles/:id', () => {
return new Response(
490,
{},
@@ -180,7 +209,7 @@ module('Acceptance | roles', function (hooks) {
}
);
});
- await visit('/orgs/1/roles/1');
+ await visit(roleURL);
await click('.rose-button-warning');
assert.ok(
find('[role="alert"]').textContent.trim(),
diff --git a/ui/core/tests/acceptance/users-test.js b/ui/core/tests/acceptance/users-test.js
index f1160c7f3..31fa5c98e 100644
--- a/ui/core/tests/acceptance/users-test.js
+++ b/ui/core/tests/acceptance/users-test.js
@@ -4,47 +4,81 @@ import { setupApplicationTest } from 'ember-qunit';
import setupMirage from 'ember-cli-mirage/test-support/setup-mirage';
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,
+} from 'ember-simple-auth/test-support';
-module('Acceptance | users', function(hooks) {
+module('Acceptance | users', function (hooks) {
setupApplicationTest(hooks);
setupMirage(hooks);
+ let orgScope;
+ let usersURL;
+ let userURL;
+ let newUserURL;
+
hooks.beforeEach(function () {
- this.server.create('org');
+ orgScope = this.server.create(
+ 'scope',
+ {
+ type: 'org',
+ },
+ 'withChildren'
+ );
+
+ const user = this.server.create('user', {
+ scope: {
+ id: orgScope.id,
+ type: orgScope.type,
+ },
+ });
+
+ usersURL = `/scopes/${orgScope.id}/users`;
+ userURL = `${usersURL}/${user.id}`;
+ newUserURL = `${usersURL}/new`;
+
+ authenticateSession({});
});
test('visiting users', async function (assert) {
assert.expect(1);
- this.server.createList('user', 1);
- await visit('/orgs/1/users');
+ await visit(usersURL);
await a11yAudit();
- assert.equal(currentURL(), '/orgs/1/users');
+ assert.equal(currentURL(), usersURL);
+ });
+
+ test('visiting a user', async function (assert) {
+ assert.expect(1);
+ await visit(newUserURL);
+ await a11yAudit();
+ assert.equal(currentURL(), newUserURL);
});
test('can create new users', async function (assert) {
- assert.expect(4);
- assert.equal(this.server.db.users.length, 0);
- await visit('/orgs/1/users/new');
+ assert.expect(1);
+ const usersCount = this.server.db.users.length;
+ await visit(newUserURL);
await fillIn('[name="name"]', 'User name');
await click('[type="submit"]');
- assert.equal(currentURL(), '/orgs/1/users/1');
- assert.equal(this.server.db.users.length, 1);
- assert.equal(this.server.db.users[0].name, 'User name');
+ assert.equal(this.server.db.users.length, usersCount + 1);
});
test('can cancel creation of a new user', async function (assert) {
- assert.expect(3);
- assert.equal(this.server.db.users.length, 0);
- await visit('/orgs/1/users/new');
+ assert.expect(2);
+ const usersCount = this.server.db.users.length;
+ await visit(newUserURL);
await fillIn('[name="name"]', 'User name');
await click('.rose-form-actions [type="button"]');
- assert.equal(currentURL(), '/orgs/1/users');
- assert.equal(this.server.db.users.length, 0);
+ assert.equal(currentURL(), usersURL);
+ assert.equal(this.server.db.users.length, usersCount);
});
test('saving a new user with invalid fields displays error messages', async function (assert) {
assert.expect(2);
- this.server.post('/orgs/:org_id/users', () => {
+ this.server.post('scopes/:scope_id/users', () => {
return new Response(
400,
{},
@@ -63,7 +97,7 @@ module('Acceptance | users', function(hooks) {
}
);
});
- await visit('/orgs/1/users/new');
+ await visit(newUserURL);
await fillIn('[name="name"]', 'User name');
await click('[type="submit"]');
assert.ok(
@@ -80,36 +114,32 @@ module('Acceptance | users', function(hooks) {
test('can save changes to an existing user', async function (assert) {
assert.expect(2);
- this.server.createList('user', 1, {name: 'Test User'});
- await visit('/orgs/1/users/1');
+ await visit(userURL);
await fillIn('[name="name"]', 'Updated user name');
await click('.rose-form-actions [type="submit"]');
- assert.equal(currentURL(), '/orgs/1/users/1');
+ assert.equal(currentURL(), userURL);
assert.equal(this.server.db.users[0].name, 'Updated user name');
});
test('can cancel changes to an existing user', async function (assert) {
assert.expect(1);
- this.server.createList('user', 1, {name: 'Test User'});
- await visit('/orgs/1/users/1');
+ await visit(userURL);
await fillIn('[name="name"]', 'Unsaved user name');
await click('.rose-form-actions [type="button"]');
- assert.equal(find('[name="name"]').value, 'Test User');
+ assert.notEqual(find('[name="name"]').value, 'Unsaved user name');
});
- test('can delete an user', async function(assert) {
- assert.expect(2);
- this.server.createList('user', 1);
- assert.equal(this.server.db.users.length, 1);
- await visit('/orgs/1/users/1');
+ test('can delete an user', async function (assert) {
+ assert.expect(1);
+ const usersCount = this.server.db.users.length;
+ await visit(userURL);
await click('.rose-button-warning');
- assert.equal(this.server.db.users.length, 0);
+ assert.equal(this.server.db.users.length, usersCount - 1);
});
test('saving an existing user with invalid fields displays error messages', async function (assert) {
assert.expect(2);
- this.server.createList('user', 1);
- this.server.patch('/orgs/:org_id/users/:id', () => {
+ this.server.patch('/scopes/:scope_id/users/:id', () => {
return new Response(
400,
{},
@@ -128,7 +158,7 @@ module('Acceptance | users', function(hooks) {
}
);
});
- await visit('/orgs/1/users/1');
+ await visit(userURL);
await fillIn('[name="name"]', 'User name');
await click('[type="submit"]');
assert.ok(
@@ -145,8 +175,7 @@ module('Acceptance | users', function(hooks) {
test('errors are displayed when saving user fails', async function (assert) {
assert.expect(1);
- this.server.createList('user', 1);
- this.server.patch('/orgs/:org_id/users/:id', () => {
+ this.server.patch('/scopes/:scope_id/users/:id', () => {
return new Response(
490,
{},
@@ -157,7 +186,7 @@ module('Acceptance | users', function(hooks) {
}
);
});
- await visit('/orgs/1/users/1');
+ await visit(userURL);
await fillIn('[name="name"]', 'User name');
await click('[type="submit"]');
assert.ok(
@@ -169,8 +198,7 @@ module('Acceptance | users', function(hooks) {
test('errors are displayed when user deletion fails', async function (assert) {
assert.expect(1);
- this.server.createList('user', 1);
- this.server.del('/orgs/:org_id/users/:id', () => {
+ this.server.del('/scopes/:scope_id/users/:id', () => {
return new Response(
490,
{},
@@ -181,7 +209,7 @@ module('Acceptance | users', function(hooks) {
}
);
});
- await visit('/orgs/1/users/1');
+ await visit(userURL);
await click('.rose-button-warning');
assert.ok(
find('[role="alert"]').textContent.trim(),
diff --git a/ui/core/tests/integration/components/bread-crumbs-test.js b/ui/core/tests/integration/components/bread-crumbs-test.js
index a6f3579c8..2e59085cb 100644
--- a/ui/core/tests/integration/components/bread-crumbs-test.js
+++ b/ui/core/tests/integration/components/bread-crumbs-test.js
@@ -3,11 +3,11 @@ import { setupRenderingTest } from 'ember-qunit';
import { render, find, findAll } from '@ember/test-helpers';
import { hbs } from 'ember-cli-htmlbars';
-module('Integration | Component | bread-crumbs', function(hooks) {
+module('Integration | Component | bread-crumbs', function (hooks) {
setupRenderingTest(hooks);
- test('it renders', async function(assert) {
- this.set('breadCrumbs', [{label: 'Level 1'}]);
+ test('it renders', async function (assert) {
+ this.set('breadCrumbs', [{ label: 'Level 1' }]);
await render(hbs``);
// Default index route
@@ -15,28 +15,34 @@ module('Integration | Component | bread-crumbs', function(hooks) {
assert.equal(find('.rose-nav-breadcrumbs').textContent.trim(), 'Level 1');
});
- test('it renders with model', async function(assert) {
+ test('it renders with model', async function (assert) {
let store = this.owner.lookup('service:store');
- let project = store.createRecord('project', {id: '1234'});
+ let project = store.createRecord('project', { id: '1234' });
- this.set('breadCrumbs', [{
- label: 'Level 2',
- path: 'orgs.org.projects.project',
- model: project
- }]);
+ this.set('breadCrumbs', [
+ {
+ label: 'Level 2',
+ path: 'orgs.org.projects.project',
+ model: project,
+ },
+ ]);
await render(hbs``);
assert.equal(find('.rose-nav-breadcrumbs').textContent.trim(), 'Level 2');
});
- test('it renders multiple breadCrumbs', async function(assert) {
- this.set('breadCrumbs', [{
- label: 'Level 1'
- },{
- label: 'Level 2'
- }, {
- label: 'Level 3'
- }]);
+ test('it renders multiple breadCrumbs', async function (assert) {
+ this.set('breadCrumbs', [
+ {
+ label: 'Level 1',
+ },
+ {
+ label: 'Level 2',
+ },
+ {
+ label: 'Level 3',
+ },
+ ]);
await render(hbs``);
assert.equal(findAll('a').length, 3);
diff --git a/ui/core/tests/integration/components/form/host-catalog-test.js b/ui/core/tests/integration/components/form/host-catalog-test.js
index 0e3b51865..20dbd545f 100644
--- a/ui/core/tests/integration/components/form/host-catalog-test.js
+++ b/ui/core/tests/integration/components/form/host-catalog-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 | form/host-catalog', function(hooks) {
+module('Integration | Component | form/host-catalog', function (hooks) {
setupRenderingTest(hooks);
- test('it renders', async function(assert) {
+ test('it renders', async function (assert) {
// Set any properties with this.set('myProperty', 'value');
// Handle any actions with this.set('myAction', function(val) { ... });
this.submit = () => {};
diff --git a/ui/core/tests/unit/controllers/application-test.js b/ui/core/tests/unit/controllers/application-test.js
index 93d19cebe..eb120e471 100644
--- a/ui/core/tests/unit/controllers/application-test.js
+++ b/ui/core/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);
// 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/core/tests/unit/controllers/orgs/org/groups-test.js b/ui/core/tests/unit/controllers/orgs/org/groups-test.js
index 0ca58eed0..338abe601 100644
--- a/ui/core/tests/unit/controllers/orgs/org/groups-test.js
+++ b/ui/core/tests/unit/controllers/orgs/org/groups-test.js
@@ -1,11 +1,11 @@
import { module, test } from 'qunit';
import { setupTest } from 'ember-qunit';
-module('Unit | Controller | orgs/org/groups', function(hooks) {
+module('Unit | Controller | orgs/org/groups', function (hooks) {
setupTest(hooks);
// Replace this with your real tests.
- test('it exists', function(assert) {
+ test('it exists', function (assert) {
let controller = this.owner.lookup('controller:orgs/org/groups');
assert.ok(controller);
});
diff --git a/ui/core/tests/unit/controllers/orgs/org/groups/group-test.js b/ui/core/tests/unit/controllers/orgs/org/groups/group-test.js
index 49cf5b3a6..c49531dfb 100644
--- a/ui/core/tests/unit/controllers/orgs/org/groups/group-test.js
+++ b/ui/core/tests/unit/controllers/orgs/org/groups/group-test.js
@@ -1,11 +1,11 @@
import { module, test } from 'qunit';
import { setupTest } from 'ember-qunit';
-module('Unit | Controller | orgs/org/groups/group', function(hooks) {
+module('Unit | Controller | orgs/org/groups/group', function (hooks) {
setupTest(hooks);
// Replace this with your real tests.
- test('it exists', function(assert) {
+ test('it exists', function (assert) {
let controller = this.owner.lookup('controller:orgs/org/groups/group');
assert.ok(controller);
});
diff --git a/ui/core/tests/unit/controllers/orgs/org/groups/new-test.js b/ui/core/tests/unit/controllers/orgs/org/groups/new-test.js
index ef02542c9..a85f11078 100644
--- a/ui/core/tests/unit/controllers/orgs/org/groups/new-test.js
+++ b/ui/core/tests/unit/controllers/orgs/org/groups/new-test.js
@@ -1,11 +1,11 @@
import { module, test } from 'qunit';
import { setupTest } from 'ember-qunit';
-module('Unit | Controller | orgs/org/groups/new', function(hooks) {
+module('Unit | Controller | orgs/org/groups/new', function (hooks) {
setupTest(hooks);
// Replace this with your real tests.
- test('it exists', function(assert) {
+ test('it exists', function (assert) {
let controller = this.owner.lookup('controller:orgs/org/groups/new');
assert.ok(controller);
});
diff --git a/ui/core/tests/unit/controllers/orgs/org/projects-test.js b/ui/core/tests/unit/controllers/orgs/org/projects-test.js
index 6176a173c..c4d200e50 100644
--- a/ui/core/tests/unit/controllers/orgs/org/projects-test.js
+++ b/ui/core/tests/unit/controllers/orgs/org/projects-test.js
@@ -1,11 +1,11 @@
import { module, test } from 'qunit';
import { setupTest } from 'ember-qunit';
-module('Unit | Controller | orgs/org/projects', function(hooks) {
+module('Unit | Controller | orgs/org/projects', function (hooks) {
setupTest(hooks);
// Replace this with your real tests.
- test('it exists', function(assert) {
+ test('it exists', function (assert) {
let controller = this.owner.lookup('controller:orgs/org/projects');
assert.ok(controller);
});
diff --git a/ui/core/tests/unit/controllers/orgs/org/projects/new-test.js b/ui/core/tests/unit/controllers/orgs/org/projects/new-test.js
index 9e3731313..055c60a9f 100644
--- a/ui/core/tests/unit/controllers/orgs/org/projects/new-test.js
+++ b/ui/core/tests/unit/controllers/orgs/org/projects/new-test.js
@@ -1,11 +1,11 @@
import { module, test } from 'qunit';
import { setupTest } from 'ember-qunit';
-module('Unit | Controller | orgs/org/projects/new', function(hooks) {
+module('Unit | Controller | orgs/org/projects/new', function (hooks) {
setupTest(hooks);
// Replace this with your real tests.
- test('it exists', function(assert) {
+ test('it exists', function (assert) {
let controller = this.owner.lookup('controller:orgs/org/projects/new');
assert.ok(controller);
});
diff --git a/ui/core/tests/unit/controllers/orgs/org/projects/project-test.js b/ui/core/tests/unit/controllers/orgs/org/projects/project-test.js
index 36a2c2482..067429ee5 100644
--- a/ui/core/tests/unit/controllers/orgs/org/projects/project-test.js
+++ b/ui/core/tests/unit/controllers/orgs/org/projects/project-test.js
@@ -1,11 +1,11 @@
import { module, test } from 'qunit';
import { setupTest } from 'ember-qunit';
-module('Unit | Controller | orgs/org/projects/project', function(hooks) {
+module('Unit | Controller | orgs/org/projects/project', function (hooks) {
setupTest(hooks);
// Replace this with your real tests.
- test('it exists', function(assert) {
+ test('it exists', function (assert) {
let controller = this.owner.lookup('controller:orgs/org/projects/project');
assert.ok(controller);
});
diff --git a/ui/core/tests/unit/controllers/orgs/org/projects/project/host-catalogs-test.js b/ui/core/tests/unit/controllers/orgs/org/projects/project/host-catalogs-test.js
index 808f14138..6127a3173 100644
--- a/ui/core/tests/unit/controllers/orgs/org/projects/project/host-catalogs-test.js
+++ b/ui/core/tests/unit/controllers/orgs/org/projects/project/host-catalogs-test.js
@@ -1,12 +1,16 @@
import { module, test } from 'qunit';
import { setupTest } from 'ember-qunit';
-module('Unit | Controller | orgs/org/projects/project/host-catalogs', function(hooks) {
+module('Unit | Controller | orgs/org/projects/project/host-catalogs', function (
+ hooks
+) {
setupTest(hooks);
// Replace this with your real tests.
- test('it exists', function(assert) {
- let controller = this.owner.lookup('controller:orgs/org/projects/project/host-catalogs');
+ test('it exists', function (assert) {
+ let controller = this.owner.lookup(
+ 'controller:orgs/org/projects/project/host-catalogs'
+ );
assert.ok(controller);
});
});
diff --git a/ui/core/tests/unit/controllers/orgs/org/projects/project/host-catalogs/host-catalog-test.js b/ui/core/tests/unit/controllers/orgs/org/projects/project/host-catalogs/host-catalog-test.js
index 4efc4b85c..38b3a9c9d 100644
--- a/ui/core/tests/unit/controllers/orgs/org/projects/project/host-catalogs/host-catalog-test.js
+++ b/ui/core/tests/unit/controllers/orgs/org/projects/project/host-catalogs/host-catalog-test.js
@@ -1,12 +1,17 @@
import { module, test } from 'qunit';
import { setupTest } from 'ember-qunit';
-module('Unit | Controller | orgs/org/projects/project/host-catalogs/host-catalog', function(hooks) {
- setupTest(hooks);
+module(
+ 'Unit | Controller | orgs/org/projects/project/host-catalogs/host-catalog',
+ function (hooks) {
+ setupTest(hooks);
- // Replace this with your real tests.
- test('it exists', function(assert) {
- let controller = this.owner.lookup('controller:orgs/org/projects/project/host-catalogs/host-catalog');
- assert.ok(controller);
- });
-});
+ // Replace this with your real tests.
+ test('it exists', function (assert) {
+ let controller = this.owner.lookup(
+ 'controller:orgs/org/projects/project/host-catalogs/host-catalog'
+ );
+ assert.ok(controller);
+ });
+ }
+);
diff --git a/ui/core/tests/unit/controllers/orgs/org/projects/project/host-catalogs/new-test.js b/ui/core/tests/unit/controllers/orgs/org/projects/project/host-catalogs/new-test.js
index 1981e1857..ee0f326a1 100644
--- a/ui/core/tests/unit/controllers/orgs/org/projects/project/host-catalogs/new-test.js
+++ b/ui/core/tests/unit/controllers/orgs/org/projects/project/host-catalogs/new-test.js
@@ -1,12 +1,17 @@
import { module, test } from 'qunit';
import { setupTest } from 'ember-qunit';
-module('Unit | Controller | orgs/org/projects/project/host-catalogs/new', function(hooks) {
- setupTest(hooks);
+module(
+ 'Unit | Controller | orgs/org/projects/project/host-catalogs/new',
+ function (hooks) {
+ setupTest(hooks);
- // Replace this with your real tests.
- test('it exists', function(assert) {
- let controller = this.owner.lookup('controller:orgs/org/projects/project/host-catalogs/new');
- assert.ok(controller);
- });
-});
+ // Replace this with your real tests.
+ test('it exists', function (assert) {
+ let controller = this.owner.lookup(
+ 'controller:orgs/org/projects/project/host-catalogs/new'
+ );
+ assert.ok(controller);
+ });
+ }
+);
diff --git a/ui/core/tests/unit/controllers/orgs/org/roles-test.js b/ui/core/tests/unit/controllers/orgs/org/roles-test.js
index 816459cd3..12c57a108 100644
--- a/ui/core/tests/unit/controllers/orgs/org/roles-test.js
+++ b/ui/core/tests/unit/controllers/orgs/org/roles-test.js
@@ -1,10 +1,10 @@
import { module, test } from 'qunit';
import { setupTest } from 'ember-qunit';
-module('Unit | Controller | orgs/org/roles', function(hooks) {
+module('Unit | Controller | orgs/org/roles', function (hooks) {
setupTest(hooks);
- test('it exists', function(assert) {
+ test('it exists', function (assert) {
let controller = this.owner.lookup('controller:orgs/org/roles');
assert.ok(controller);
});
diff --git a/ui/core/tests/unit/controllers/orgs/org/roles/new-test.js b/ui/core/tests/unit/controllers/orgs/org/roles/new-test.js
index 8d948ae06..c9e4cfcc8 100644
--- a/ui/core/tests/unit/controllers/orgs/org/roles/new-test.js
+++ b/ui/core/tests/unit/controllers/orgs/org/roles/new-test.js
@@ -1,10 +1,10 @@
import { module, test } from 'qunit';
import { setupTest } from 'ember-qunit';
-module('Unit | Controller | orgs/org/roles/new', function(hooks) {
+module('Unit | Controller | orgs/org/roles/new', function (hooks) {
setupTest(hooks);
- test('it exists', function(assert) {
+ test('it exists', function (assert) {
let controller = this.owner.lookup('controller:orgs/org/roles/new');
assert.ok(controller);
});
diff --git a/ui/core/tests/unit/controllers/orgs/org/roles/role-test.js b/ui/core/tests/unit/controllers/orgs/org/roles/role-test.js
index cd56c941f..515ae8420 100644
--- a/ui/core/tests/unit/controllers/orgs/org/roles/role-test.js
+++ b/ui/core/tests/unit/controllers/orgs/org/roles/role-test.js
@@ -1,10 +1,10 @@
import { module, test } from 'qunit';
import { setupTest } from 'ember-qunit';
-module('Unit | Controller | orgs/org/roles/role', function(hooks) {
+module('Unit | Controller | orgs/org/roles/role', function (hooks) {
setupTest(hooks);
- test('it exists', function(assert) {
+ test('it exists', function (assert) {
let controller = this.owner.lookup('controller:orgs/org/roles/role');
assert.ok(controller);
});
diff --git a/ui/core/tests/unit/controllers/orgs/org/users-test.js b/ui/core/tests/unit/controllers/orgs/org/users-test.js
index c5be2fb52..5f0c57d8c 100644
--- a/ui/core/tests/unit/controllers/orgs/org/users-test.js
+++ b/ui/core/tests/unit/controllers/orgs/org/users-test.js
@@ -1,11 +1,11 @@
import { module, test } from 'qunit';
import { setupTest } from 'ember-qunit';
-module('Unit | Controller | orgs/org/users', function(hooks) {
+module('Unit | Controller | orgs/org/users', function (hooks) {
setupTest(hooks);
// Replace this with your real tests.
- test('it exists', function(assert) {
+ test('it exists', function (assert) {
let controller = this.owner.lookup('controller:orgs/org/users');
assert.ok(controller);
});
diff --git a/ui/core/tests/unit/controllers/orgs/org/users/new-test.js b/ui/core/tests/unit/controllers/orgs/org/users/new-test.js
index e6925b4d7..80a7e1890 100644
--- a/ui/core/tests/unit/controllers/orgs/org/users/new-test.js
+++ b/ui/core/tests/unit/controllers/orgs/org/users/new-test.js
@@ -1,11 +1,11 @@
import { module, test } from 'qunit';
import { setupTest } from 'ember-qunit';
-module('Unit | Controller | orgs/org/users/new', function(hooks) {
+module('Unit | Controller | orgs/org/users/new', function (hooks) {
setupTest(hooks);
// Replace this with your real tests.
- test('it exists', function(assert) {
+ test('it exists', function (assert) {
let controller = this.owner.lookup('controller:orgs/org/users/new');
assert.ok(controller);
});
diff --git a/ui/core/tests/unit/controllers/orgs/org/users/user-test.js b/ui/core/tests/unit/controllers/orgs/org/users/user-test.js
index f35f620fa..e16d4ab6b 100644
--- a/ui/core/tests/unit/controllers/orgs/org/users/user-test.js
+++ b/ui/core/tests/unit/controllers/orgs/org/users/user-test.js
@@ -1,11 +1,11 @@
import { module, test } from 'qunit';
import { setupTest } from 'ember-qunit';
-module('Unit | Controller | orgs/org/users/user', function(hooks) {
+module('Unit | Controller | orgs/org/users/user', function (hooks) {
setupTest(hooks);
// Replace this with your real tests.
- test('it exists', function(assert) {
+ test('it exists', function (assert) {
let controller = this.owner.lookup('controller:orgs/org/users/user');
assert.ok(controller);
});
diff --git a/ui/core/tests/unit/controllers/scopes/scope-test.js b/ui/core/tests/unit/controllers/scopes/scope-test.js
index ec2c389bb..1ac27e62b 100644
--- a/ui/core/tests/unit/controllers/scopes/scope-test.js
+++ b/ui/core/tests/unit/controllers/scopes/scope-test.js
@@ -1,11 +1,11 @@
import { module, test } from 'qunit';
import { setupTest } from 'ember-qunit';
-module('Unit | Controller | scopes/scope', function(hooks) {
+module('Unit | Controller | scopes/scope', function (hooks) {
setupTest(hooks);
// Replace this with your real tests.
- test('it exists', function(assert) {
+ test('it exists', function (assert) {
let controller = this.owner.lookup('controller:scopes/scope');
assert.ok(controller);
});
diff --git a/ui/core/tests/unit/controllers/scopes/scope/groups-test.js b/ui/core/tests/unit/controllers/scopes/scope/groups-test.js
new file mode 100644
index 000000000..4f1a10f19
--- /dev/null
+++ b/ui/core/tests/unit/controllers/scopes/scope/groups-test.js
@@ -0,0 +1,12 @@
+import { module, test } from 'qunit';
+import { setupTest } from 'ember-qunit';
+
+module('Unit | Controller | scopes/scope/groups', function (hooks) {
+ setupTest(hooks);
+
+ // Replace this with your real tests.
+ test('it exists', function (assert) {
+ let controller = this.owner.lookup('controller:scopes/scope/groups');
+ assert.ok(controller);
+ });
+});
diff --git a/ui/core/tests/unit/controllers/scopes/scope/groups/group-test.js b/ui/core/tests/unit/controllers/scopes/scope/groups/group-test.js
new file mode 100644
index 000000000..bb3e8b7cc
--- /dev/null
+++ b/ui/core/tests/unit/controllers/scopes/scope/groups/group-test.js
@@ -0,0 +1,12 @@
+import { module, test } from 'qunit';
+import { setupTest } from 'ember-qunit';
+
+module('Unit | Controller | scopes/scope/groups/group', function (hooks) {
+ setupTest(hooks);
+
+ // Replace this with your real tests.
+ test('it exists', function (assert) {
+ let controller = this.owner.lookup('controller:scopes/scope/groups/group');
+ assert.ok(controller);
+ });
+});
diff --git a/ui/core/tests/unit/controllers/scopes/scope/groups/new-test.js b/ui/core/tests/unit/controllers/scopes/scope/groups/new-test.js
new file mode 100644
index 000000000..56eaa6c76
--- /dev/null
+++ b/ui/core/tests/unit/controllers/scopes/scope/groups/new-test.js
@@ -0,0 +1,12 @@
+import { module, test } from 'qunit';
+import { setupTest } from 'ember-qunit';
+
+module('Unit | Controller | scopes/scope/groups/new', function (hooks) {
+ setupTest(hooks);
+
+ // Replace this with your real tests.
+ test('it exists', function (assert) {
+ let controller = this.owner.lookup('controller:scopes/scope/groups/new');
+ assert.ok(controller);
+ });
+});
diff --git a/ui/core/tests/unit/controllers/scopes/scope/projects-test.js b/ui/core/tests/unit/controllers/scopes/scope/projects-test.js
index 21125f233..052687cd2 100644
--- a/ui/core/tests/unit/controllers/scopes/scope/projects-test.js
+++ b/ui/core/tests/unit/controllers/scopes/scope/projects-test.js
@@ -1,11 +1,11 @@
import { module, test } from 'qunit';
import { setupTest } from 'ember-qunit';
-module('Unit | Controller | scopes/scope/projects', function(hooks) {
+module('Unit | Controller | scopes/scope/projects', function (hooks) {
setupTest(hooks);
// Replace this with your real tests.
- test('it exists', function(assert) {
+ test('it exists', function (assert) {
let controller = this.owner.lookup('controller:scopes/scope/projects');
assert.ok(controller);
});
diff --git a/ui/core/tests/unit/controllers/scopes/scope/projects/new-test.js b/ui/core/tests/unit/controllers/scopes/scope/projects/new-test.js
index eeb857274..8da2a6f6d 100644
--- a/ui/core/tests/unit/controllers/scopes/scope/projects/new-test.js
+++ b/ui/core/tests/unit/controllers/scopes/scope/projects/new-test.js
@@ -1,11 +1,11 @@
import { module, test } from 'qunit';
import { setupTest } from 'ember-qunit';
-module('Unit | Controller | scopes/scope/projects/new', function(hooks) {
+module('Unit | Controller | scopes/scope/projects/new', function (hooks) {
setupTest(hooks);
// Replace this with your real tests.
- test('it exists', function(assert) {
+ test('it exists', function (assert) {
let controller = this.owner.lookup('controller:scopes/scope/projects/new');
assert.ok(controller);
});
diff --git a/ui/core/tests/unit/controllers/scopes/scope/projects/project-test.js b/ui/core/tests/unit/controllers/scopes/scope/projects/project-test.js
index 26a255430..ee20af93d 100644
--- a/ui/core/tests/unit/controllers/scopes/scope/projects/project-test.js
+++ b/ui/core/tests/unit/controllers/scopes/scope/projects/project-test.js
@@ -1,12 +1,14 @@
import { module, test } from 'qunit';
import { setupTest } from 'ember-qunit';
-module('Unit | Controller | scopes/scope/projects/project', function(hooks) {
+module('Unit | Controller | scopes/scope/projects/project', function (hooks) {
setupTest(hooks);
// Replace this with your real tests.
- test('it exists', function(assert) {
- let controller = this.owner.lookup('controller:scopes/scope/projects/project');
+ test('it exists', function (assert) {
+ let controller = this.owner.lookup(
+ 'controller:scopes/scope/projects/project'
+ );
assert.ok(controller);
});
});
diff --git a/ui/core/tests/unit/controllers/scopes/scope/roles-test.js b/ui/core/tests/unit/controllers/scopes/scope/roles-test.js
new file mode 100644
index 000000000..1567c0d37
--- /dev/null
+++ b/ui/core/tests/unit/controllers/scopes/scope/roles-test.js
@@ -0,0 +1,12 @@
+import { module, test } from 'qunit';
+import { setupTest } from 'ember-qunit';
+
+module('Unit | Controller | scopes/scope/roles', function (hooks) {
+ setupTest(hooks);
+
+ // Replace this with your real tests.
+ test('it exists', function (assert) {
+ let controller = this.owner.lookup('controller:scopes/scope/roles');
+ assert.ok(controller);
+ });
+});
diff --git a/ui/core/tests/unit/controllers/scopes/scope/roles/new-test.js b/ui/core/tests/unit/controllers/scopes/scope/roles/new-test.js
new file mode 100644
index 000000000..ee2595d36
--- /dev/null
+++ b/ui/core/tests/unit/controllers/scopes/scope/roles/new-test.js
@@ -0,0 +1,12 @@
+import { module, test } from 'qunit';
+import { setupTest } from 'ember-qunit';
+
+module('Unit | Controller | scopes/scope/roles/new', function (hooks) {
+ setupTest(hooks);
+
+ // Replace this with your real tests.
+ test('it exists', function (assert) {
+ let controller = this.owner.lookup('controller:scopes/scope/roles/new');
+ assert.ok(controller);
+ });
+});
diff --git a/ui/core/tests/unit/controllers/scopes/scope/roles/role-test.js b/ui/core/tests/unit/controllers/scopes/scope/roles/role-test.js
new file mode 100644
index 000000000..4edaa508f
--- /dev/null
+++ b/ui/core/tests/unit/controllers/scopes/scope/roles/role-test.js
@@ -0,0 +1,12 @@
+import { module, test } from 'qunit';
+import { setupTest } from 'ember-qunit';
+
+module('Unit | Controller | scopes/scope/roles/role', function (hooks) {
+ setupTest(hooks);
+
+ // Replace this with your real tests.
+ test('it exists', function (assert) {
+ let controller = this.owner.lookup('controller:scopes/scope/roles/role');
+ assert.ok(controller);
+ });
+});
diff --git a/ui/core/tests/unit/controllers/scopes/scope/users-test.js b/ui/core/tests/unit/controllers/scopes/scope/users-test.js
new file mode 100644
index 000000000..25ced1669
--- /dev/null
+++ b/ui/core/tests/unit/controllers/scopes/scope/users-test.js
@@ -0,0 +1,12 @@
+import { module, test } from 'qunit';
+import { setupTest } from 'ember-qunit';
+
+module('Unit | Controller | scopes/scope/users', function (hooks) {
+ setupTest(hooks);
+
+ // Replace this with your real tests.
+ test('it exists', function (assert) {
+ let controller = this.owner.lookup('controller:scopes/scope/users');
+ assert.ok(controller);
+ });
+});
diff --git a/ui/core/tests/unit/controllers/scopes/scope/users/new-test.js b/ui/core/tests/unit/controllers/scopes/scope/users/new-test.js
new file mode 100644
index 000000000..440b4523c
--- /dev/null
+++ b/ui/core/tests/unit/controllers/scopes/scope/users/new-test.js
@@ -0,0 +1,12 @@
+import { module, test } from 'qunit';
+import { setupTest } from 'ember-qunit';
+
+module('Unit | Controller | scopes/scope/users/new', function (hooks) {
+ setupTest(hooks);
+
+ // Replace this with your real tests.
+ test('it exists', function (assert) {
+ let controller = this.owner.lookup('controller:scopes/scope/users/new');
+ assert.ok(controller);
+ });
+});
diff --git a/ui/core/tests/unit/controllers/scopes/scope/users/user-test.js b/ui/core/tests/unit/controllers/scopes/scope/users/user-test.js
new file mode 100644
index 000000000..17d292de0
--- /dev/null
+++ b/ui/core/tests/unit/controllers/scopes/scope/users/user-test.js
@@ -0,0 +1,12 @@
+import { module, test } from 'qunit';
+import { setupTest } from 'ember-qunit';
+
+module('Unit | Controller | scopes/scope/users/user', 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');
+ assert.ok(controller);
+ });
+});
diff --git a/ui/core/tests/unit/routes/index-test.js b/ui/core/tests/unit/routes/index-test.js
index eaaac17bc..01131fb9a 100644
--- a/ui/core/tests/unit/routes/index-test.js
+++ b/ui/core/tests/unit/routes/index-test.js
@@ -1,10 +1,10 @@
import { module, test } from 'qunit';
import { setupTest } from 'ember-qunit';
-module('Unit | Route | index', function(hooks) {
+module('Unit | Route | index', function (hooks) {
setupTest(hooks);
- test('it exists', function(assert) {
+ test('it exists', function (assert) {
let route = this.owner.lookup('route:index');
assert.ok(route);
});
diff --git a/ui/core/tests/unit/routes/orgs/org/groups-test.js b/ui/core/tests/unit/routes/orgs/org/groups-test.js
index a56f69e76..465afedcd 100644
--- a/ui/core/tests/unit/routes/orgs/org/groups-test.js
+++ b/ui/core/tests/unit/routes/orgs/org/groups-test.js
@@ -1,10 +1,10 @@
import { module, test } from 'qunit';
import { setupTest } from 'ember-qunit';
-module('Unit | Route | orgs/org/groups', function(hooks) {
+module('Unit | Route | orgs/org/groups', function (hooks) {
setupTest(hooks);
- test('it exists', function(assert) {
+ test('it exists', function (assert) {
let route = this.owner.lookup('route:orgs/org/groups');
assert.ok(route);
});
diff --git a/ui/core/tests/unit/routes/orgs/org/groups/group-test.js b/ui/core/tests/unit/routes/orgs/org/groups/group-test.js
index cec8245a8..ca6107bc1 100644
--- a/ui/core/tests/unit/routes/orgs/org/groups/group-test.js
+++ b/ui/core/tests/unit/routes/orgs/org/groups/group-test.js
@@ -1,10 +1,10 @@
import { module, test } from 'qunit';
import { setupTest } from 'ember-qunit';
-module('Unit | Route | orgs/org/groups/group', function(hooks) {
+module('Unit | Route | orgs/org/groups/group', function (hooks) {
setupTest(hooks);
- test('it exists', function(assert) {
+ test('it exists', function (assert) {
let route = this.owner.lookup('route:orgs/org/groups/group');
assert.ok(route);
});
diff --git a/ui/core/tests/unit/routes/orgs/org/groups/group/index-test.js b/ui/core/tests/unit/routes/orgs/org/groups/group/index-test.js
index 2496b24bf..e0c5c06d4 100644
--- a/ui/core/tests/unit/routes/orgs/org/groups/group/index-test.js
+++ b/ui/core/tests/unit/routes/orgs/org/groups/group/index-test.js
@@ -1,10 +1,10 @@
import { module, test } from 'qunit';
import { setupTest } from 'ember-qunit';
-module('Unit | Route | orgs/org/groups/group/index', function(hooks) {
+module('Unit | Route | orgs/org/groups/group/index', function (hooks) {
setupTest(hooks);
- test('it exists', function(assert) {
+ test('it exists', function (assert) {
let route = this.owner.lookup('route:orgs/org/groups/group/index');
assert.ok(route);
});
diff --git a/ui/core/tests/unit/routes/orgs/org/groups/index-test.js b/ui/core/tests/unit/routes/orgs/org/groups/index-test.js
index c2f9135eb..60c10cfef 100644
--- a/ui/core/tests/unit/routes/orgs/org/groups/index-test.js
+++ b/ui/core/tests/unit/routes/orgs/org/groups/index-test.js
@@ -1,10 +1,10 @@
import { module, test } from 'qunit';
import { setupTest } from 'ember-qunit';
-module('Unit | Route | orgs/org/groups/index', function(hooks) {
+module('Unit | Route | orgs/org/groups/index', function (hooks) {
setupTest(hooks);
- test('it exists', function(assert) {
+ test('it exists', function (assert) {
let route = this.owner.lookup('route:orgs/org/groups/index');
assert.ok(route);
});
diff --git a/ui/core/tests/unit/routes/orgs/org/groups/new-test.js b/ui/core/tests/unit/routes/orgs/org/groups/new-test.js
index 09f10c831..e119c3d53 100644
--- a/ui/core/tests/unit/routes/orgs/org/groups/new-test.js
+++ b/ui/core/tests/unit/routes/orgs/org/groups/new-test.js
@@ -1,10 +1,10 @@
import { module, test } from 'qunit';
import { setupTest } from 'ember-qunit';
-module('Unit | Route | orgs/org/groups/new', function(hooks) {
+module('Unit | Route | orgs/org/groups/new', function (hooks) {
setupTest(hooks);
- test('it exists', function(assert) {
+ test('it exists', function (assert) {
let route = this.owner.lookup('route:orgs/org/groups/new');
assert.ok(route);
});
diff --git a/ui/core/tests/unit/routes/orgs/org/projects/project/host-catalogs-test.js b/ui/core/tests/unit/routes/orgs/org/projects/project/host-catalogs-test.js
index f7c144429..761c0bfa8 100644
--- a/ui/core/tests/unit/routes/orgs/org/projects/project/host-catalogs-test.js
+++ b/ui/core/tests/unit/routes/orgs/org/projects/project/host-catalogs-test.js
@@ -1,11 +1,15 @@
import { module, test } from 'qunit';
import { setupTest } from 'ember-qunit';
-module('Unit | Route | orgs/org/projects/project/host-catalogs', function(hooks) {
+module('Unit | Route | orgs/org/projects/project/host-catalogs', function (
+ hooks
+) {
setupTest(hooks);
- test('it exists', function(assert) {
- let route = this.owner.lookup('route:orgs/org/projects/project/host-catalogs');
+ test('it exists', function (assert) {
+ let route = this.owner.lookup(
+ 'route:orgs/org/projects/project/host-catalogs'
+ );
assert.ok(route);
});
});
diff --git a/ui/core/tests/unit/routes/orgs/org/projects/project/host-catalogs/host-catalog-test.js b/ui/core/tests/unit/routes/orgs/org/projects/project/host-catalogs/host-catalog-test.js
index 6313bc8f0..5dd167f8a 100644
--- a/ui/core/tests/unit/routes/orgs/org/projects/project/host-catalogs/host-catalog-test.js
+++ b/ui/core/tests/unit/routes/orgs/org/projects/project/host-catalogs/host-catalog-test.js
@@ -1,11 +1,16 @@
import { module, test } from 'qunit';
import { setupTest } from 'ember-qunit';
-module('Unit | Route | orgs/org/projects/project/host-catalogs/host-catalog', function(hooks) {
- setupTest(hooks);
+module(
+ 'Unit | Route | orgs/org/projects/project/host-catalogs/host-catalog',
+ function (hooks) {
+ setupTest(hooks);
- test('it exists', function(assert) {
- let route = this.owner.lookup('route:orgs/org/projects/project/host-catalogs/host-catalog');
- assert.ok(route);
- });
-});
+ test('it exists', function (assert) {
+ let route = this.owner.lookup(
+ 'route:orgs/org/projects/project/host-catalogs/host-catalog'
+ );
+ assert.ok(route);
+ });
+ }
+);
diff --git a/ui/core/tests/unit/routes/orgs/org/projects/project/host-catalogs/host-catalog/index-test.js b/ui/core/tests/unit/routes/orgs/org/projects/project/host-catalogs/host-catalog/index-test.js
index a19bd70e9..1472a5b92 100644
--- a/ui/core/tests/unit/routes/orgs/org/projects/project/host-catalogs/host-catalog/index-test.js
+++ b/ui/core/tests/unit/routes/orgs/org/projects/project/host-catalogs/host-catalog/index-test.js
@@ -1,11 +1,16 @@
import { module, test } from 'qunit';
import { setupTest } from 'ember-qunit';
-module('Unit | Route | orgs/org/projects/project/host-catalogs/host-catalog/index', function(hooks) {
- setupTest(hooks);
+module(
+ 'Unit | Route | orgs/org/projects/project/host-catalogs/host-catalog/index',
+ function (hooks) {
+ setupTest(hooks);
- test('it exists', function(assert) {
- let route = this.owner.lookup('route:orgs/org/projects/project/host-catalogs/host-catalog/index');
- assert.ok(route);
- });
-});
+ test('it exists', function (assert) {
+ let route = this.owner.lookup(
+ 'route:orgs/org/projects/project/host-catalogs/host-catalog/index'
+ );
+ assert.ok(route);
+ });
+ }
+);
diff --git a/ui/core/tests/unit/routes/orgs/org/projects/project/host-catalogs/index-test.js b/ui/core/tests/unit/routes/orgs/org/projects/project/host-catalogs/index-test.js
index d8a8d036e..0d7a5e317 100644
--- a/ui/core/tests/unit/routes/orgs/org/projects/project/host-catalogs/index-test.js
+++ b/ui/core/tests/unit/routes/orgs/org/projects/project/host-catalogs/index-test.js
@@ -1,11 +1,16 @@
import { module, test } from 'qunit';
import { setupTest } from 'ember-qunit';
-module('Unit | Route | orgs/org/projects/project/host-catalogs/index', function(hooks) {
- setupTest(hooks);
+module(
+ 'Unit | Route | orgs/org/projects/project/host-catalogs/index',
+ function (hooks) {
+ setupTest(hooks);
- test('it exists', function(assert) {
- let route = this.owner.lookup('route:orgs/org/projects/project/host-catalogs/index');
- assert.ok(route);
- });
-});
+ test('it exists', function (assert) {
+ let route = this.owner.lookup(
+ 'route:orgs/org/projects/project/host-catalogs/index'
+ );
+ assert.ok(route);
+ });
+ }
+);
diff --git a/ui/core/tests/unit/routes/orgs/org/projects/project/host-catalogs/new-test.js b/ui/core/tests/unit/routes/orgs/org/projects/project/host-catalogs/new-test.js
index 2529656b7..8b441cfd6 100644
--- a/ui/core/tests/unit/routes/orgs/org/projects/project/host-catalogs/new-test.js
+++ b/ui/core/tests/unit/routes/orgs/org/projects/project/host-catalogs/new-test.js
@@ -1,11 +1,15 @@
import { module, test } from 'qunit';
import { setupTest } from 'ember-qunit';
-module('Unit | Route | orgs/org/projects/project/host-catalogs/new', function(hooks) {
+module('Unit | Route | orgs/org/projects/project/host-catalogs/new', function (
+ hooks
+) {
setupTest(hooks);
- test('it exists', function(assert) {
- let route = this.owner.lookup('route:orgs/org/projects/project/host-catalogs/new');
+ test('it exists', function (assert) {
+ let route = this.owner.lookup(
+ 'route:orgs/org/projects/project/host-catalogs/new'
+ );
assert.ok(route);
});
});
diff --git a/ui/core/tests/unit/routes/orgs/org/projects/project/index-test.js b/ui/core/tests/unit/routes/orgs/org/projects/project/index-test.js
index bc1d36103..08f446f6f 100644
--- a/ui/core/tests/unit/routes/orgs/org/projects/project/index-test.js
+++ b/ui/core/tests/unit/routes/orgs/org/projects/project/index-test.js
@@ -1,10 +1,10 @@
import { module, test } from 'qunit';
import { setupTest } from 'ember-qunit';
-module('Unit | Route | orgs/org/projects/project/index', function(hooks) {
+module('Unit | Route | orgs/org/projects/project/index', function (hooks) {
setupTest(hooks);
- test('it exists', function(assert) {
+ test('it exists', function (assert) {
let route = this.owner.lookup('route:orgs/org/projects/project/index');
assert.ok(route);
});
diff --git a/ui/core/tests/unit/routes/orgs/org/roles-test.js b/ui/core/tests/unit/routes/orgs/org/roles-test.js
index 38bc3acb2..7cd35dab6 100644
--- a/ui/core/tests/unit/routes/orgs/org/roles-test.js
+++ b/ui/core/tests/unit/routes/orgs/org/roles-test.js
@@ -1,10 +1,10 @@
import { module, test } from 'qunit';
import { setupTest } from 'ember-qunit';
-module('Unit | Route | orgs/org/roles', function(hooks) {
+module('Unit | Route | orgs/org/roles', function (hooks) {
setupTest(hooks);
- test('it exists', function(assert) {
+ test('it exists', function (assert) {
let route = this.owner.lookup('route:orgs/org/roles');
assert.ok(route);
});
diff --git a/ui/core/tests/unit/routes/orgs/org/roles/index-test.js b/ui/core/tests/unit/routes/orgs/org/roles/index-test.js
index 12f247adb..979d26062 100644
--- a/ui/core/tests/unit/routes/orgs/org/roles/index-test.js
+++ b/ui/core/tests/unit/routes/orgs/org/roles/index-test.js
@@ -1,10 +1,10 @@
import { module, test } from 'qunit';
import { setupTest } from 'ember-qunit';
-module('Unit | Route | orgs/org/roles/index', function(hooks) {
+module('Unit | Route | orgs/org/roles/index', function (hooks) {
setupTest(hooks);
- test('it exists', function(assert) {
+ test('it exists', function (assert) {
let route = this.owner.lookup('route:orgs/org/roles/index');
assert.ok(route);
});
diff --git a/ui/core/tests/unit/routes/orgs/org/roles/new-test.js b/ui/core/tests/unit/routes/orgs/org/roles/new-test.js
index d613eb34a..59e26a949 100644
--- a/ui/core/tests/unit/routes/orgs/org/roles/new-test.js
+++ b/ui/core/tests/unit/routes/orgs/org/roles/new-test.js
@@ -1,10 +1,10 @@
import { module, test } from 'qunit';
import { setupTest } from 'ember-qunit';
-module('Unit | Route | orgs/org/roles/new', function(hooks) {
+module('Unit | Route | orgs/org/roles/new', function (hooks) {
setupTest(hooks);
- test('it exists', function(assert) {
+ test('it exists', function (assert) {
let route = this.owner.lookup('route:orgs/org/roles/new');
assert.ok(route);
});
diff --git a/ui/core/tests/unit/routes/orgs/org/roles/role-test.js b/ui/core/tests/unit/routes/orgs/org/roles/role-test.js
index 149fd657e..207a79ea2 100644
--- a/ui/core/tests/unit/routes/orgs/org/roles/role-test.js
+++ b/ui/core/tests/unit/routes/orgs/org/roles/role-test.js
@@ -1,10 +1,10 @@
import { module, test } from 'qunit';
import { setupTest } from 'ember-qunit';
-module('Unit | Route | orgs/org/roles/role', function(hooks) {
+module('Unit | Route | orgs/org/roles/role', function (hooks) {
setupTest(hooks);
- test('it exists', function(assert) {
+ test('it exists', function (assert) {
let route = this.owner.lookup('route:orgs/org/roles/role');
assert.ok(route);
});
diff --git a/ui/core/tests/unit/routes/orgs/org/users-test.js b/ui/core/tests/unit/routes/orgs/org/users-test.js
index 93956225b..b4c420690 100644
--- a/ui/core/tests/unit/routes/orgs/org/users-test.js
+++ b/ui/core/tests/unit/routes/orgs/org/users-test.js
@@ -1,10 +1,10 @@
import { module, test } from 'qunit';
import { setupTest } from 'ember-qunit';
-module('Unit | Route | orgs/org/users', function(hooks) {
+module('Unit | Route | orgs/org/users', function (hooks) {
setupTest(hooks);
- test('it exists', function(assert) {
+ test('it exists', function (assert) {
let route = this.owner.lookup('route:orgs/org/users');
assert.ok(route);
});
diff --git a/ui/core/tests/unit/routes/orgs/org/users/index-test.js b/ui/core/tests/unit/routes/orgs/org/users/index-test.js
index cd215662e..21310f7a1 100644
--- a/ui/core/tests/unit/routes/orgs/org/users/index-test.js
+++ b/ui/core/tests/unit/routes/orgs/org/users/index-test.js
@@ -1,10 +1,10 @@
import { module, test } from 'qunit';
import { setupTest } from 'ember-qunit';
-module('Unit | Route | orgs/org/users/index', function(hooks) {
+module('Unit | Route | orgs/org/users/index', function (hooks) {
setupTest(hooks);
- test('it exists', function(assert) {
+ test('it exists', function (assert) {
let route = this.owner.lookup('route:orgs/org/users/index');
assert.ok(route);
});
diff --git a/ui/core/tests/unit/routes/orgs/org/users/new-test.js b/ui/core/tests/unit/routes/orgs/org/users/new-test.js
index 1aef05bab..395979cad 100644
--- a/ui/core/tests/unit/routes/orgs/org/users/new-test.js
+++ b/ui/core/tests/unit/routes/orgs/org/users/new-test.js
@@ -1,10 +1,10 @@
import { module, test } from 'qunit';
import { setupTest } from 'ember-qunit';
-module('Unit | Route | orgs/org/users/new', function(hooks) {
+module('Unit | Route | orgs/org/users/new', function (hooks) {
setupTest(hooks);
- test('it exists', function(assert) {
+ test('it exists', function (assert) {
let route = this.owner.lookup('route:orgs/org/users/new');
assert.ok(route);
});
diff --git a/ui/core/tests/unit/routes/orgs/org/users/user-test.js b/ui/core/tests/unit/routes/orgs/org/users/user-test.js
index 4bd6f26a2..48a657875 100644
--- a/ui/core/tests/unit/routes/orgs/org/users/user-test.js
+++ b/ui/core/tests/unit/routes/orgs/org/users/user-test.js
@@ -1,10 +1,10 @@
import { module, test } from 'qunit';
import { setupTest } from 'ember-qunit';
-module('Unit | Route | orgs/org/users/user', function(hooks) {
+module('Unit | Route | orgs/org/users/user', function (hooks) {
setupTest(hooks);
- test('it exists', function(assert) {
+ test('it exists', function (assert) {
let route = this.owner.lookup('route:orgs/org/users/user');
assert.ok(route);
});
diff --git a/ui/core/tests/unit/routes/scopes-test.js b/ui/core/tests/unit/routes/scopes-test.js
index 06a5af092..914469429 100644
--- a/ui/core/tests/unit/routes/scopes-test.js
+++ b/ui/core/tests/unit/routes/scopes-test.js
@@ -1,10 +1,10 @@
import { module, test } from 'qunit';
import { setupTest } from 'ember-qunit';
-module('Unit | Route | scopes', function(hooks) {
+module('Unit | Route | scopes', function (hooks) {
setupTest(hooks);
- test('it exists', function(assert) {
+ test('it exists', function (assert) {
let route = this.owner.lookup('route:scopes');
assert.ok(route);
});
diff --git a/ui/core/tests/unit/routes/scopes/index-test.js b/ui/core/tests/unit/routes/scopes/index-test.js
index c2fb98357..22a5c073a 100644
--- a/ui/core/tests/unit/routes/scopes/index-test.js
+++ b/ui/core/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/core/tests/unit/routes/scopes/scope-test.js b/ui/core/tests/unit/routes/scopes/scope-test.js
index 62c97d9f0..3cdcf409a 100644
--- a/ui/core/tests/unit/routes/scopes/scope-test.js
+++ b/ui/core/tests/unit/routes/scopes/scope-test.js
@@ -1,10 +1,10 @@
import { module, test } from 'qunit';
import { setupTest } from 'ember-qunit';
-module('Unit | Route | scopes/scope', function(hooks) {
+module('Unit | Route | scopes/scope', function (hooks) {
setupTest(hooks);
- test('it exists', function(assert) {
+ test('it exists', function (assert) {
let route = this.owner.lookup('route:scopes/scope');
assert.ok(route);
});
diff --git a/ui/core/tests/unit/routes/scopes/scope/authenticate-test.js b/ui/core/tests/unit/routes/scopes/scope/authenticate-test.js
index 2ee818453..5a1db715d 100644
--- a/ui/core/tests/unit/routes/scopes/scope/authenticate-test.js
+++ b/ui/core/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/core/tests/unit/routes/scopes/scope/authenticate/index-test.js b/ui/core/tests/unit/routes/scopes/scope/authenticate/index-test.js
index 88d5a1121..d9e86f2da 100644
--- a/ui/core/tests/unit/routes/scopes/scope/authenticate/index-test.js
+++ b/ui/core/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/core/tests/unit/routes/scopes/scope/authenticate/method-test.js b/ui/core/tests/unit/routes/scopes/scope/authenticate/method-test.js
index 5aed2aefe..f077f994b 100644
--- a/ui/core/tests/unit/routes/scopes/scope/authenticate/method-test.js
+++ b/ui/core/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);
});
diff --git a/ui/core/tests/unit/routes/scopes/scope/groups-test.js b/ui/core/tests/unit/routes/scopes/scope/groups-test.js
new file mode 100644
index 000000000..879a3925b
--- /dev/null
+++ b/ui/core/tests/unit/routes/scopes/scope/groups-test.js
@@ -0,0 +1,11 @@
+import { module, test } from 'qunit';
+import { setupTest } from 'ember-qunit';
+
+module('Unit | Route | scopes/scope/groups', function (hooks) {
+ setupTest(hooks);
+
+ test('it exists', function (assert) {
+ let route = this.owner.lookup('route:scopes/scope/groups');
+ assert.ok(route);
+ });
+});
diff --git a/ui/core/tests/unit/routes/scopes/scope/groups/group-test.js b/ui/core/tests/unit/routes/scopes/scope/groups/group-test.js
new file mode 100644
index 000000000..8f8cc6713
--- /dev/null
+++ b/ui/core/tests/unit/routes/scopes/scope/groups/group-test.js
@@ -0,0 +1,11 @@
+import { module, test } from 'qunit';
+import { setupTest } from 'ember-qunit';
+
+module('Unit | Route | scopes/scope/groups/group', function (hooks) {
+ setupTest(hooks);
+
+ test('it exists', function (assert) {
+ let route = this.owner.lookup('route:scopes/scope/groups/group');
+ assert.ok(route);
+ });
+});
diff --git a/ui/core/tests/unit/routes/scopes/scope/groups/group/index-test.js b/ui/core/tests/unit/routes/scopes/scope/groups/group/index-test.js
new file mode 100644
index 000000000..3981831ad
--- /dev/null
+++ b/ui/core/tests/unit/routes/scopes/scope/groups/group/index-test.js
@@ -0,0 +1,11 @@
+import { module, test } from 'qunit';
+import { setupTest } from 'ember-qunit';
+
+module('Unit | Route | scopes/scope/groups/group/index', function (hooks) {
+ setupTest(hooks);
+
+ test('it exists', function (assert) {
+ let route = this.owner.lookup('route:scopes/scope/groups/group/index');
+ assert.ok(route);
+ });
+});
diff --git a/ui/core/tests/unit/routes/scopes/scope/groups/index-test.js b/ui/core/tests/unit/routes/scopes/scope/groups/index-test.js
new file mode 100644
index 000000000..f50de2922
--- /dev/null
+++ b/ui/core/tests/unit/routes/scopes/scope/groups/index-test.js
@@ -0,0 +1,11 @@
+import { module, test } from 'qunit';
+import { setupTest } from 'ember-qunit';
+
+module('Unit | Route | scopes/scope/groups/index', function (hooks) {
+ setupTest(hooks);
+
+ test('it exists', function (assert) {
+ let route = this.owner.lookup('route:scopes/scope/groups/index');
+ assert.ok(route);
+ });
+});
diff --git a/ui/core/tests/unit/routes/scopes/scope/groups/new-test.js b/ui/core/tests/unit/routes/scopes/scope/groups/new-test.js
new file mode 100644
index 000000000..6e689bdd3
--- /dev/null
+++ b/ui/core/tests/unit/routes/scopes/scope/groups/new-test.js
@@ -0,0 +1,11 @@
+import { module, test } from 'qunit';
+import { setupTest } from 'ember-qunit';
+
+module('Unit | Route | scopes/scope/groups/new', function (hooks) {
+ setupTest(hooks);
+
+ test('it exists', function (assert) {
+ let route = this.owner.lookup('route:scopes/scope/groups/new');
+ assert.ok(route);
+ });
+});
diff --git a/ui/core/tests/unit/routes/scopes/scope/index-test.js b/ui/core/tests/unit/routes/scopes/scope/index-test.js
index ba0a5bdba..c623e801b 100644
--- a/ui/core/tests/unit/routes/scopes/scope/index-test.js
+++ b/ui/core/tests/unit/routes/scopes/scope/index-test.js
@@ -1,10 +1,10 @@
import { module, test } from 'qunit';
import { setupTest } from 'ember-qunit';
-module('Unit | Route | scopes/scope/index', function(hooks) {
+module('Unit | Route | scopes/scope/index', function (hooks) {
setupTest(hooks);
- test('it exists', function(assert) {
+ test('it exists', function (assert) {
let route = this.owner.lookup('route:scopes/scope/index');
assert.ok(route);
});
diff --git a/ui/core/tests/unit/routes/scopes/scope/projects-test.js b/ui/core/tests/unit/routes/scopes/scope/projects-test.js
index 4a8dde55f..127213dac 100644
--- a/ui/core/tests/unit/routes/scopes/scope/projects-test.js
+++ b/ui/core/tests/unit/routes/scopes/scope/projects-test.js
@@ -1,10 +1,10 @@
import { module, test } from 'qunit';
import { setupTest } from 'ember-qunit';
-module('Unit | Route | scopes/scope/projects', function(hooks) {
+module('Unit | Route | scopes/scope/projects', function (hooks) {
setupTest(hooks);
- test('it exists', function(assert) {
+ test('it exists', function (assert) {
let route = this.owner.lookup('route:scopes/scope/projects');
assert.ok(route);
});
diff --git a/ui/core/tests/unit/routes/scopes/scope/projects/index-test.js b/ui/core/tests/unit/routes/scopes/scope/projects/index-test.js
index 71c813a35..74a15f224 100644
--- a/ui/core/tests/unit/routes/scopes/scope/projects/index-test.js
+++ b/ui/core/tests/unit/routes/scopes/scope/projects/index-test.js
@@ -1,10 +1,10 @@
import { module, test } from 'qunit';
import { setupTest } from 'ember-qunit';
-module('Unit | Route | scopes/scope/projects/index', function(hooks) {
+module('Unit | Route | scopes/scope/projects/index', function (hooks) {
setupTest(hooks);
- test('it exists', function(assert) {
+ test('it exists', function (assert) {
let route = this.owner.lookup('route:scopes/scope/projects/index');
assert.ok(route);
});
diff --git a/ui/core/tests/unit/routes/scopes/scope/projects/new-test.js b/ui/core/tests/unit/routes/scopes/scope/projects/new-test.js
index 6d22e1fa7..8c28e87b5 100644
--- a/ui/core/tests/unit/routes/scopes/scope/projects/new-test.js
+++ b/ui/core/tests/unit/routes/scopes/scope/projects/new-test.js
@@ -1,10 +1,10 @@
import { module, test } from 'qunit';
import { setupTest } from 'ember-qunit';
-module('Unit | Route | scopes/scope/projects/new', function(hooks) {
+module('Unit | Route | scopes/scope/projects/new', function (hooks) {
setupTest(hooks);
- test('it exists', function(assert) {
+ test('it exists', function (assert) {
let route = this.owner.lookup('route:scopes/scope/projects/new');
assert.ok(route);
});
diff --git a/ui/core/tests/unit/routes/scopes/scope/projects/project-test.js b/ui/core/tests/unit/routes/scopes/scope/projects/project-test.js
index 54555a07c..ed0ffe51a 100644
--- a/ui/core/tests/unit/routes/scopes/scope/projects/project-test.js
+++ b/ui/core/tests/unit/routes/scopes/scope/projects/project-test.js
@@ -1,10 +1,10 @@
import { module, test } from 'qunit';
import { setupTest } from 'ember-qunit';
-module('Unit | Route | scopes/scope/projects/project', function(hooks) {
+module('Unit | Route | scopes/scope/projects/project', function (hooks) {
setupTest(hooks);
- test('it exists', function(assert) {
+ test('it exists', function (assert) {
let route = this.owner.lookup('route:scopes/scope/projects/project');
assert.ok(route);
});
diff --git a/ui/core/tests/unit/routes/scopes/scope/projects/project/index-test.js b/ui/core/tests/unit/routes/scopes/scope/projects/project/index-test.js
index c81b2f5a7..f14370229 100644
--- a/ui/core/tests/unit/routes/scopes/scope/projects/project/index-test.js
+++ b/ui/core/tests/unit/routes/scopes/scope/projects/project/index-test.js
@@ -1,10 +1,10 @@
import { module, test } from 'qunit';
import { setupTest } from 'ember-qunit';
-module('Unit | Route | scopes/scope/projects/project/index', function(hooks) {
+module('Unit | Route | scopes/scope/projects/project/index', function (hooks) {
setupTest(hooks);
- test('it exists', function(assert) {
+ test('it exists', function (assert) {
let route = this.owner.lookup('route:scopes/scope/projects/project/index');
assert.ok(route);
});
diff --git a/ui/core/tests/unit/routes/scopes/scope/roles-test.js b/ui/core/tests/unit/routes/scopes/scope/roles-test.js
new file mode 100644
index 000000000..f2aa633ee
--- /dev/null
+++ b/ui/core/tests/unit/routes/scopes/scope/roles-test.js
@@ -0,0 +1,11 @@
+import { module, test } from 'qunit';
+import { setupTest } from 'ember-qunit';
+
+module('Unit | Route | scopes/scope/roles', function (hooks) {
+ setupTest(hooks);
+
+ test('it exists', function (assert) {
+ let route = this.owner.lookup('route:scopes/scope/roles');
+ assert.ok(route);
+ });
+});
diff --git a/ui/core/tests/unit/routes/scopes/scope/roles/index-test.js b/ui/core/tests/unit/routes/scopes/scope/roles/index-test.js
new file mode 100644
index 000000000..aad8dd94c
--- /dev/null
+++ b/ui/core/tests/unit/routes/scopes/scope/roles/index-test.js
@@ -0,0 +1,11 @@
+import { module, test } from 'qunit';
+import { setupTest } from 'ember-qunit';
+
+module('Unit | Route | scopes/scope/roles/index', function (hooks) {
+ setupTest(hooks);
+
+ test('it exists', function (assert) {
+ let route = this.owner.lookup('route:scopes/scope/roles/index');
+ assert.ok(route);
+ });
+});
diff --git a/ui/core/tests/unit/routes/scopes/scope/roles/new-test.js b/ui/core/tests/unit/routes/scopes/scope/roles/new-test.js
new file mode 100644
index 000000000..1ddf02ba6
--- /dev/null
+++ b/ui/core/tests/unit/routes/scopes/scope/roles/new-test.js
@@ -0,0 +1,11 @@
+import { module, test } from 'qunit';
+import { setupTest } from 'ember-qunit';
+
+module('Unit | Route | scopes/scope/roles/new', function (hooks) {
+ setupTest(hooks);
+
+ test('it exists', function (assert) {
+ let route = this.owner.lookup('route:scopes/scope/roles/new');
+ assert.ok(route);
+ });
+});
diff --git a/ui/core/tests/unit/routes/scopes/scope/roles/role-test.js b/ui/core/tests/unit/routes/scopes/scope/roles/role-test.js
new file mode 100644
index 000000000..41e292c3c
--- /dev/null
+++ b/ui/core/tests/unit/routes/scopes/scope/roles/role-test.js
@@ -0,0 +1,11 @@
+import { module, test } from 'qunit';
+import { setupTest } from 'ember-qunit';
+
+module('Unit | Route | scopes/scope/roles/role', function (hooks) {
+ setupTest(hooks);
+
+ test('it exists', function (assert) {
+ let route = this.owner.lookup('route:scopes/scope/roles/role');
+ assert.ok(route);
+ });
+});
diff --git a/ui/core/tests/unit/routes/scopes/scope/roles/role/index-test.js b/ui/core/tests/unit/routes/scopes/scope/roles/role/index-test.js
new file mode 100644
index 000000000..1a4aecbf1
--- /dev/null
+++ b/ui/core/tests/unit/routes/scopes/scope/roles/role/index-test.js
@@ -0,0 +1,11 @@
+import { module, test } from 'qunit';
+import { setupTest } from 'ember-qunit';
+
+module('Unit | Route | scopes/scope/roles/role/index', function (hooks) {
+ setupTest(hooks);
+
+ test('it exists', function (assert) {
+ let route = this.owner.lookup('route:scopes/scope/roles/role/index');
+ assert.ok(route);
+ });
+});
diff --git a/ui/core/tests/unit/routes/scopes/scope/users-test.js b/ui/core/tests/unit/routes/scopes/scope/users-test.js
new file mode 100644
index 000000000..12f7813b1
--- /dev/null
+++ b/ui/core/tests/unit/routes/scopes/scope/users-test.js
@@ -0,0 +1,11 @@
+import { module, test } from 'qunit';
+import { setupTest } from 'ember-qunit';
+
+module('Unit | Route | scopes/scope/users', function (hooks) {
+ setupTest(hooks);
+
+ test('it exists', function (assert) {
+ let route = this.owner.lookup('route:scopes/scope/users');
+ assert.ok(route);
+ });
+});
diff --git a/ui/core/tests/unit/routes/scopes/scope/users/index-test.js b/ui/core/tests/unit/routes/scopes/scope/users/index-test.js
new file mode 100644
index 000000000..f2c453604
--- /dev/null
+++ b/ui/core/tests/unit/routes/scopes/scope/users/index-test.js
@@ -0,0 +1,11 @@
+import { module, test } from 'qunit';
+import { setupTest } from 'ember-qunit';
+
+module('Unit | Route | scopes/scope/users/index', function (hooks) {
+ setupTest(hooks);
+
+ test('it exists', function (assert) {
+ let route = this.owner.lookup('route:scopes/scope/users/index');
+ assert.ok(route);
+ });
+});
diff --git a/ui/core/tests/unit/routes/scopes/scope/users/new-test.js b/ui/core/tests/unit/routes/scopes/scope/users/new-test.js
new file mode 100644
index 000000000..147af3ba2
--- /dev/null
+++ b/ui/core/tests/unit/routes/scopes/scope/users/new-test.js
@@ -0,0 +1,11 @@
+import { module, test } from 'qunit';
+import { setupTest } from 'ember-qunit';
+
+module('Unit | Route | scopes/scope/users/new', function (hooks) {
+ setupTest(hooks);
+
+ test('it exists', function (assert) {
+ let route = this.owner.lookup('route:scopes/scope/users/new');
+ assert.ok(route);
+ });
+});
diff --git a/ui/core/tests/unit/routes/scopes/scope/users/user-test.js b/ui/core/tests/unit/routes/scopes/scope/users/user-test.js
new file mode 100644
index 000000000..69f34e847
--- /dev/null
+++ b/ui/core/tests/unit/routes/scopes/scope/users/user-test.js
@@ -0,0 +1,11 @@
+import { module, test } from 'qunit';
+import { setupTest } from 'ember-qunit';
+
+module('Unit | Route | scopes/scope/users/user', function (hooks) {
+ setupTest(hooks);
+
+ test('it exists', function (assert) {
+ let route = this.owner.lookup('route:scopes/scope/users/user');
+ assert.ok(route);
+ });
+});
diff --git a/ui/core/tests/unit/routes/scopes/scope/users/user/index-test.js b/ui/core/tests/unit/routes/scopes/scope/users/user/index-test.js
new file mode 100644
index 000000000..21302ee4b
--- /dev/null
+++ b/ui/core/tests/unit/routes/scopes/scope/users/user/index-test.js
@@ -0,0 +1,11 @@
+import { module, test } from 'qunit';
+import { setupTest } from 'ember-qunit';
+
+module('Unit | Route | scopes/scope/users/user/index', function (hooks) {
+ setupTest(hooks);
+
+ test('it exists', function (assert) {
+ let route = this.owner.lookup('route:scopes/scope/users/user/index');
+ assert.ok(route);
+ });
+});
diff --git a/ui/core/translations/en-us.yaml b/ui/core/translations/en-us.yaml
index af1322a87..c07cdee37 100644
--- a/ui/core/translations/en-us.yaml
+++ b/ui/core/translations/en-us.yaml
@@ -79,16 +79,9 @@ errors:
server-error: We ran into a problem and could not continue. You can ask your administrator or try again later.
unknown-error: Please contact your administrator or try again later.
notify:
- save-success: Save succeeded.
- user:
- create-success: User created succesfully.
- delete-success: Deleted user successfully.
- role:
- create-success: Role created succesfully.
- delete-success: Deleted role successfully.
- group:
- create-success: Group created succesfully.
- delete-success: Deleted group successfully.
+ create-success: Created succesfully.
+ save-success: Saved succesfully.
+ delete-success: Deleted successfully.
dev:
default-org: Default Org
menu-item: Menu item