chore: 🤖 Refactor user CRUD+L to /scopes/:scope_id
This commit is contained in:
103 files changed
+687
-303
No files matched your search
@@ -8,5 +8,4 @@ export default class OrgsOrgGroupsGroupController extends Controller {
|
||||
* @type {string}
|
||||
*/
|
||||
@alias('model.displayName') breadCrumb;
|
||||
|
||||
}
|
||||
@@ -14,5 +14,4 @@ export default class OrgsOrgGroupsNewController extends Controller {
|
||||
get breadCrumb() {
|
||||
return this.intl.t('titles.new');
|
||||
}
|
||||
|
||||
}
|
||||
@@ -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');
|
||||
}
|
||||
|
||||
}
|
||||
@@ -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');
|
||||
}
|
||||
|
||||
}
|
||||
@@ -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;
|
||||
|
||||
}
|
||||
@@ -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');
|
||||
}
|
||||
|
||||
}
|
||||
@@ -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;
|
||||
|
||||
}
|
||||
@@ -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');
|
||||
}
|
||||
|
||||
}
|
||||
@@ -14,5 +14,4 @@ export default class OrgsOrgRolesController extends Controller {
|
||||
get breadCrumb() {
|
||||
return this.intl.t('resources.roles');
|
||||
}
|
||||
|
||||
}
|
||||
@@ -14,5 +14,4 @@ export default class OrgsOrgRolesNewController extends Controller {
|
||||
get breadCrumb() {
|
||||
return this.intl.t('titles.new');
|
||||
}
|
||||
|
||||
}
|
||||
@@ -8,5 +8,4 @@ export default class OrgsOrgRolesRoleController extends Controller {
|
||||
* @type {string}
|
||||
*/
|
||||
@alias('model.displayName') breadCrumb;
|
||||
|
||||
}
|
||||
@@ -14,5 +14,4 @@ export default class OrgsOrgUsersController extends Controller {
|
||||
get breadCrumb() {
|
||||
return this.intl.t('resources.users');
|
||||
}
|
||||
|
||||
}
|
||||
@@ -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');
|
||||
}
|
||||
|
||||
}
|
||||
@@ -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');
|
||||
}
|
||||
|
||||
}
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
}
|
||||
+21
-14
@@ -7,11 +7,14 @@ export default class Router extends EmberRouter {
|
||||
}
|
||||
|
||||
Router.map(function () {
|
||||
|
||||
this.route('scopes', function() {
|
||||
this.route('scope', { path: ':scope_id' }, function() {
|
||||
this.route('projects', function() {
|
||||
this.route('project', { path: ':project_id' }, function() {});
|
||||
this.route('scopes', function () {
|
||||
this.route('scope', { path: ':scope_id' }, function () {
|
||||
this.route('projects', function () {
|
||||
this.route('project', { path: ':project_id' }, function () {});
|
||||
this.route('new');
|
||||
});
|
||||
this.route('users', function () {
|
||||
this.route('user', { path: ':user_id' }, function () {});
|
||||
this.route('new');
|
||||
});
|
||||
});
|
||||
@@ -20,27 +23,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');
|
||||
});
|
||||
});
|
||||
|
||||
@@ -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');
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,4 +1,3 @@
|
||||
import Route from '@ember/routing/route';
|
||||
|
||||
export default class OrgsOrgGroupsGroupIndexRoute extends Route {
|
||||
}
|
||||
export default class OrgsOrgGroupsGroupIndexRoute extends Route {}
|
||||
@@ -1,3 +1,3 @@
|
||||
import Route from '@ember/routing/route';
|
||||
|
||||
export default class OrgsOrgProjectsIndexRoute extends Route { }
|
||||
export default class OrgsOrgProjectsIndexRoute extends Route {}
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
import Route from '@ember/routing/route';
|
||||
|
||||
export default class OrgsOrgProjectsProjectHostCatalogsRoute extends Route {
|
||||
|
||||
// =methods
|
||||
|
||||
/**
|
||||
|
||||
@@ -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 });
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,4 +1,3 @@
|
||||
import Route from '@ember/routing/route';
|
||||
|
||||
export default class OrgsOrgProjectsProjectHostCatalogsHostCatalogIndexRoute extends Route {
|
||||
}
|
||||
export default class OrgsOrgProjectsProjectHostCatalogsHostCatalogIndexRoute extends Route {}
|
||||
@@ -1,4 +1,3 @@
|
||||
import Route from '@ember/routing/route';
|
||||
|
||||
export default class OrgsOrgProjectsProjectHostCatalogsIndexRoute extends Route {
|
||||
}
|
||||
export default class OrgsOrgProjectsProjectHostCatalogsIndexRoute extends Route {}
|
||||
@@ -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) {
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
import Route from '@ember/routing/route';
|
||||
|
||||
export default class OrgsOrgProjectsProjectIndexRoute extends Route {
|
||||
}
|
||||
export default class OrgsOrgProjectsProjectIndexRoute extends Route {}
|
||||
@@ -10,5 +10,4 @@ export default class OrgsOrgRolesRoute extends Route {
|
||||
model() {
|
||||
return this.store.findAll('role');
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,4 +1,3 @@
|
||||
import Route from '@ember/routing/route';
|
||||
|
||||
export default class OrgsOrgUsersIndexRoute extends Route {
|
||||
}
|
||||
export default class OrgsOrgUsersIndexRoute extends Route {}
|
||||
@@ -1,4 +1,3 @@
|
||||
import Route from '@ember/routing/route';
|
||||
|
||||
export default class ScopesRoute extends Route {
|
||||
}
|
||||
export default class ScopesRoute extends Route {}
|
||||
@@ -1,7 +1,6 @@
|
||||
import Route from '@ember/routing/route';
|
||||
|
||||
export default class ScopesScopeRoute extends Route {
|
||||
|
||||
// =methods
|
||||
|
||||
/**
|
||||
@@ -24,5 +23,4 @@ export default class ScopesScopeRoute extends Route {
|
||||
return maybeExistingScope || this.store.createRecord('scope', { id });
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -3,7 +3,6 @@ import { inject as service } from '@ember/service';
|
||||
import { action } from '@ember/object';
|
||||
|
||||
export default class ScopesScopeProjectsRoute extends Route {
|
||||
|
||||
// =services
|
||||
|
||||
@service notify;
|
||||
@@ -82,5 +81,4 @@ export default class ScopesScopeProjectsRoute extends Route {
|
||||
this.notify.error(error.message, { closeAfter: null });
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,4 +1,3 @@
|
||||
import Route from '@ember/routing/route';
|
||||
|
||||
export default class ScopesScopeProjectsIndexRoute extends Route {
|
||||
}
|
||||
export default class ScopesScopeProjectsIndexRoute extends Route {}
|
||||
@@ -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,
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,7 +1,6 @@
|
||||
import Route from '@ember/routing/route';
|
||||
|
||||
export default class ScopesScopeProjectsProjectRoute extends Route {
|
||||
|
||||
// =methods
|
||||
|
||||
/**
|
||||
@@ -13,5 +12,4 @@ export default class ScopesScopeProjectsProjectRoute extends Route {
|
||||
model({ project_id }) {
|
||||
return this.store.findRecord('scope', project_id);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,4 +1,3 @@
|
||||
import Route from '@ember/routing/route';
|
||||
|
||||
export default class ScopesScopeProjectsProjectIndexRoute extends Route {
|
||||
}
|
||||
export default class ScopesScopeProjectsProjectIndexRoute extends Route {}
|
||||
@@ -0,0 +1,73 @@
|
||||
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() {
|
||||
return this.store.findAll('user', this.scopeAdapterOptions());
|
||||
}
|
||||
|
||||
// =actions
|
||||
/**
|
||||
* Rollback changes on user.
|
||||
* @param {UserModel} user
|
||||
*/
|
||||
@action
|
||||
cancel(user) {
|
||||
const { isNew } = user;
|
||||
user.rollbackAttributes();
|
||||
if (isNew) this.transitionTo('scopes.scope.users');
|
||||
}
|
||||
|
||||
/**
|
||||
* Save a user in current scope.
|
||||
* @param {UserModel} user
|
||||
* @param {Event} e
|
||||
*/
|
||||
@action
|
||||
async save(user) {
|
||||
try {
|
||||
await user.save(this.scopeAdapterOptions());
|
||||
this.refresh();
|
||||
this.notify.success(this.intl.t('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.scopeAdapterOptions());
|
||||
this.refresh();
|
||||
this.transitionTo('scopes.scope.users');
|
||||
this.notify.success(this.intl.t('notify.delete-success'));
|
||||
} catch (error) {
|
||||
// TODO: replace with translated strings
|
||||
this.notify.error(error.message, { closeAfter: null });
|
||||
}
|
||||
}
|
||||
|
||||
scopeAdapterOptions() {
|
||||
const { id: scope_id } = this.modelFor('scopes.scope');
|
||||
const adapterOptions = { scopeID: scope_id };
|
||||
return { adapterOptions };
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
import Route from '@ember/routing/route';
|
||||
|
||||
export default class ScopesScopeUsersIndexRoute extends Route {}
|
||||
@@ -0,0 +1,13 @@
|
||||
import Route from '@ember/routing/route';
|
||||
|
||||
export default class ScopesScopeUsersNewRoute extends Route {
|
||||
// =methods
|
||||
|
||||
/**
|
||||
* Creates a new unsaved user.
|
||||
* @return {UserModel}
|
||||
*/
|
||||
model() {
|
||||
return this.store.createRecord('user');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
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: scope_id } = this.modelFor('scopes.scope');
|
||||
const adapterOptions = { scopeID: scope_id };
|
||||
return this.store.findRecord('user', user_id, { adapterOptions });
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
import Route from '@ember/routing/route';
|
||||
|
||||
export default class ScopesScopeUsersUserIndexRoute extends Route {}
|
||||
@@ -8,8 +8,14 @@
|
||||
</nav.link>
|
||||
</Rose::Nav::Sidebar>
|
||||
|
||||
<Rose::Nav::Sidebar @title={{t "titles.iam"}} as |nav|>
|
||||
<nav.link @route="scopes.scope.users">
|
||||
{{t "resources.users"}}
|
||||
</nav.link>
|
||||
</Rose::Nav::Sidebar>
|
||||
|
||||
{{outlet "sidebar"}}
|
||||
|
||||
|
||||
{{!--
|
||||
<Rose::Nav::Sidebar @title={{t "titles.iam"}} as |nav|>
|
||||
<nav.link @route="orgs.org.users">
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
{{title (t "resources.users")}}
|
||||
|
||||
{{outlet}}
|
||||
@@ -0,0 +1,63 @@
|
||||
<Rose::Layout::Page as |page|>
|
||||
|
||||
<page.breadcrumbs>
|
||||
<BreadCrumbs />
|
||||
</page.breadcrumbs>
|
||||
|
||||
<page.header>
|
||||
<h2>{{t "resources.users"}}</h2>
|
||||
</page.header>
|
||||
|
||||
<page.actions>
|
||||
{{#if @model}}
|
||||
<Rose::LinkButton @route="scopes.scope.users.new" @style="primary">{{t 'titles.new'}}</Rose::LinkButton>
|
||||
{{/if}}
|
||||
</page.actions>
|
||||
|
||||
<page.body>
|
||||
|
||||
{{#if @model}}
|
||||
|
||||
<Rose::Table as |table|>
|
||||
<table.header as |header|>
|
||||
<header.row as |row|>
|
||||
<row.cell>{{t 'form.label.name'}}</row.cell>
|
||||
<row.cell>{{t 'form.label.description'}}</row.cell>
|
||||
</header.row>
|
||||
</table.header>
|
||||
<table.body as |body|>
|
||||
{{#each @model as |user|}}
|
||||
<body.row as |row|>
|
||||
<row.cell>
|
||||
<LinkTo
|
||||
@route="scopes.scope.users.user"
|
||||
@model={{user}}
|
||||
>
|
||||
{{user.name}}
|
||||
</LinkTo>
|
||||
</row.cell>
|
||||
<row.cell>{{user.description}}</row.cell>
|
||||
</body.row>
|
||||
{{/each}}
|
||||
</table.body>
|
||||
</Rose::Table>
|
||||
|
||||
{{else}}
|
||||
|
||||
<Rose::Layout::Centered>
|
||||
<Rose::Message @title={{t 'titles.users-welcome'}} as |message|>
|
||||
<message.description>
|
||||
{{t 'descriptions.users-welcome'}}
|
||||
</message.description>
|
||||
<message.link @route="scopes.scope.users.new">
|
||||
<Rose::Icon @name="plus-circle-outline" />
|
||||
{{t 'titles.new'}}
|
||||
</message.link>
|
||||
</Rose::Message>
|
||||
</Rose::Layout::Centered>
|
||||
|
||||
{{/if}}
|
||||
|
||||
</page.body>
|
||||
|
||||
</Rose::Layout::Page>
|
||||
@@ -0,0 +1,21 @@
|
||||
{{title (t 'titles.new')}}
|
||||
|
||||
<Rose::Layout::Page as |page|>
|
||||
|
||||
<page.breadcrumbs>
|
||||
<BreadCrumbs />
|
||||
</page.breadcrumbs>
|
||||
|
||||
<page.header>
|
||||
<h2>{{t "titles.new"}}</h2>
|
||||
</page.header>
|
||||
|
||||
<page.body>
|
||||
<Form::User
|
||||
@model={{@model}}
|
||||
@submit={{route-action "save" @model}}
|
||||
@cancel={{route-action "cancel" @model}}
|
||||
/>
|
||||
</page.body>
|
||||
|
||||
</Rose::Layout::Page>
|
||||
@@ -0,0 +1,3 @@
|
||||
{{title @model.displayName}}
|
||||
|
||||
{{outlet}}
|
||||
@@ -0,0 +1,35 @@
|
||||
<Rose::Layout::Page as |page|>
|
||||
|
||||
<page.breadcrumbs>
|
||||
<BreadCrumbs />
|
||||
</page.breadcrumbs>
|
||||
|
||||
<page.header>
|
||||
<h2>{{t "resources.user"}}</h2>
|
||||
</page.header>
|
||||
|
||||
<page.navigation>
|
||||
<Rose::Nav::Tabs as |nav|>
|
||||
<nav.link @route='scopes.scope.users.user'>
|
||||
{{t 'titles.details'}}
|
||||
</nav.link>
|
||||
</Rose::Nav::Tabs>
|
||||
</page.navigation>
|
||||
|
||||
<page.body>
|
||||
<Form::Project
|
||||
@model={{@model}}
|
||||
@submit={{route-action "save" @model}}
|
||||
@cancel={{route-action "cancel" @model}}
|
||||
/>
|
||||
<Rose::Separator />
|
||||
<Rose::Button
|
||||
@style="warning"
|
||||
@disabled={{@model.canSave}}
|
||||
{{on "click" (route-action "delete" @model)}}
|
||||
>
|
||||
{{t 'actions.delete'}}
|
||||
</Rose::Button>
|
||||
</page.body>
|
||||
|
||||
</Rose::Layout::Page>
|
||||
@@ -55,109 +55,176 @@ module('Acceptance | breadcrumbs', function (hooks) {
|
||||
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.'
|
||||
);
|
||||
});
|
||||
});
|
||||
@@ -5,8 +5,7 @@ import setupMirage from 'ember-cli-mirage/test-support/setup-mirage';
|
||||
import a11yAudit from 'ember-a11y-testing/test-support/audit';
|
||||
import { Response } from 'miragejs';
|
||||
|
||||
|
||||
module('Acceptance | groups', function(hooks) {
|
||||
module('Acceptance | groups', function (hooks) {
|
||||
setupApplicationTest(hooks);
|
||||
setupMirage(hooks);
|
||||
|
||||
@@ -80,7 +79,7 @@ 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'});
|
||||
this.server.createList('group', 1, { name: 'Admin group' });
|
||||
await visit('/orgs/1/groups/1');
|
||||
await fillIn('[name="name"]', 'Updated admin group');
|
||||
await click('.rose-form-actions [type="submit"]');
|
||||
@@ -90,14 +89,14 @@ module('Acceptance | groups', function(hooks) {
|
||||
|
||||
test('can cancel changes to an existing group', async function (assert) {
|
||||
assert.expect(1);
|
||||
this.server.createList('group', 1, {name: 'Admin group'});
|
||||
this.server.createList('group', 1, { name: 'Admin group' });
|
||||
await visit('/orgs/1/groups/1');
|
||||
await fillIn('[name="name"]', 'Updated admin group');
|
||||
await click('.rose-form-actions [type="button"]');
|
||||
assert.equal(find('[name="name"]').value, 'Admin group');
|
||||
});
|
||||
|
||||
test('can delete a group', async function(assert) {
|
||||
test('can delete a group', async function (assert) {
|
||||
assert.expect(2);
|
||||
this.server.createList('group', 1);
|
||||
assert.equal(this.server.db.groups.length, 1);
|
||||
|
||||
@@ -5,7 +5,7 @@ import setupMirage from 'ember-cli-mirage/test-support/setup-mirage';
|
||||
import a11yAudit from 'ember-a11y-testing/test-support/audit';
|
||||
import { Response } from 'miragejs';
|
||||
|
||||
module('Acceptance | host catalogs', function(hooks) {
|
||||
module('Acceptance | host catalogs', function (hooks) {
|
||||
setupApplicationTest(hooks);
|
||||
setupMirage(hooks);
|
||||
|
||||
@@ -22,7 +22,7 @@ module('Acceptance | host catalogs', function(hooks) {
|
||||
assert.equal(currentURL(), '/orgs/1/projects/1/host-catalogs');
|
||||
});
|
||||
|
||||
test('can navigate to host catalog form', async function(assert) {
|
||||
test('can navigate to host catalog form', async function (assert) {
|
||||
assert.expect(1);
|
||||
this.server.createList('project', 1);
|
||||
this.server.createList('host-catalog', 1);
|
||||
@@ -32,7 +32,7 @@ module('Acceptance | host catalogs', function(hooks) {
|
||||
assert.equal(currentURL(), '/orgs/1/projects/1/host-catalogs/1');
|
||||
});
|
||||
|
||||
test('can delete host catalog', async function(assert) {
|
||||
test('can delete host catalog', async function (assert) {
|
||||
assert.expect(2);
|
||||
this.server.createList('project', 1);
|
||||
this.server.createList('host-catalog', 1);
|
||||
@@ -42,7 +42,7 @@ module('Acceptance | host catalogs', function(hooks) {
|
||||
assert.equal(this.server.db.hostCatalogs.length, 0);
|
||||
});
|
||||
|
||||
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);
|
||||
this.server.createList('project', 1);
|
||||
this.server.createList('host-catalog', 1);
|
||||
@@ -52,7 +52,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);
|
||||
this.server.createList('project', 1);
|
||||
this.server.createList('host-catalog', 1);
|
||||
@@ -62,7 +62,7 @@ module('Acceptance | host catalogs', function(hooks) {
|
||||
assert.notEqual(this.server.db.hostCatalogs[0].name, 'Test Name');
|
||||
});
|
||||
|
||||
test('can create host catalog and save changes', async function(assert) {
|
||||
test('can create host catalog and save changes', async function (assert) {
|
||||
assert.expect(2);
|
||||
this.server.createList('project', 1);
|
||||
await visit('/orgs/1/projects/1/host-catalogs/new');
|
||||
@@ -72,7 +72,7 @@ module('Acceptance | host catalogs', function(hooks) {
|
||||
assert.equal(currentURL(), '/orgs/1/projects/1/host-catalogs/1');
|
||||
});
|
||||
|
||||
test('can create host catalog and cancel changes', async function(assert) {
|
||||
test('can create host catalog and cancel changes', async function (assert) {
|
||||
assert.expect(2);
|
||||
this.server.createList('project', 1);
|
||||
await visit('/orgs/1/projects/1/host-catalogs/new');
|
||||
@@ -86,17 +86,20 @@ module('Acceptance | host catalogs', function(hooks) {
|
||||
assert.expect(1);
|
||||
this.server.createList('project', 1);
|
||||
this.server.createList('host-catalog', 1);
|
||||
this.server.patch('/orgs/:org_id/projects/:project_id/host-catalogs/:id', () => {
|
||||
return new Response(
|
||||
490,
|
||||
{},
|
||||
{
|
||||
status: 490,
|
||||
code: 'error',
|
||||
message: 'Oops.',
|
||||
}
|
||||
);
|
||||
});
|
||||
this.server.patch(
|
||||
'/orgs/:org_id/projects/:project_id/host-catalogs/:id',
|
||||
() => {
|
||||
return new Response(
|
||||
490,
|
||||
{},
|
||||
{
|
||||
status: 490,
|
||||
code: 'error',
|
||||
message: 'Oops.',
|
||||
}
|
||||
);
|
||||
}
|
||||
);
|
||||
await visit('/orgs/1/projects/1/host-catalogs/1');
|
||||
await fillIn('[name="name"]', 'random string');
|
||||
await click('form [type="submit"]');
|
||||
@@ -112,17 +115,20 @@ module('Acceptance | host catalogs', function(hooks) {
|
||||
assert.expect(1);
|
||||
this.server.createList('project', 1);
|
||||
this.server.createList('host-catalog', 1);
|
||||
this.server.del('/orgs/:org_id/projects/:project_id/host-catalogs/:id', () => {
|
||||
return new Response(
|
||||
490,
|
||||
{},
|
||||
{
|
||||
status: 490,
|
||||
code: 'error',
|
||||
message: 'Oops.',
|
||||
}
|
||||
);
|
||||
});
|
||||
this.server.del(
|
||||
'/orgs/:org_id/projects/:project_id/host-catalogs/:id',
|
||||
() => {
|
||||
return new Response(
|
||||
490,
|
||||
{},
|
||||
{
|
||||
status: 490,
|
||||
code: 'error',
|
||||
message: 'Oops.',
|
||||
}
|
||||
);
|
||||
}
|
||||
);
|
||||
await visit('/orgs/1/projects/1/host-catalogs/1');
|
||||
await click('.rose-button-warning');
|
||||
await a11yAudit();
|
||||
@@ -175,25 +181,28 @@ module('Acceptance | host catalogs', function(hooks) {
|
||||
assert.expect(2);
|
||||
this.server.createList('project', 1);
|
||||
this.server.createList('host-catalog', 1);
|
||||
this.server.patch('/orgs/:org_id/projects/:project_id/host-catalogs/:id', () => {
|
||||
return new Response(
|
||||
400,
|
||||
{},
|
||||
{
|
||||
status: 400,
|
||||
code: 'invalid_argument',
|
||||
message: 'The request was invalid.',
|
||||
details: {
|
||||
fields: [
|
||||
{
|
||||
name: 'name',
|
||||
message: 'Name is required.',
|
||||
},
|
||||
],
|
||||
},
|
||||
}
|
||||
);
|
||||
});
|
||||
this.server.patch(
|
||||
'/orgs/:org_id/projects/:project_id/host-catalogs/:id',
|
||||
() => {
|
||||
return new Response(
|
||||
400,
|
||||
{},
|
||||
{
|
||||
status: 400,
|
||||
code: 'invalid_argument',
|
||||
message: 'The request was invalid.',
|
||||
details: {
|
||||
fields: [
|
||||
{
|
||||
name: 'name',
|
||||
message: 'Name is required.',
|
||||
},
|
||||
],
|
||||
},
|
||||
}
|
||||
);
|
||||
}
|
||||
);
|
||||
await visit('/orgs/1/projects/1/host-catalogs/1');
|
||||
await fillIn('[name="name"]', 'random string');
|
||||
await click('form [type="submit"]');
|
||||
@@ -209,5 +218,4 @@ module('Acceptance | host catalogs', function(hooks) {
|
||||
'Displays field-level errors.'
|
||||
);
|
||||
});
|
||||
|
||||
});
|
||||
@@ -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');
|
||||
|
||||
@@ -79,7 +79,7 @@ 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'});
|
||||
this.server.createList('role', 1, { name: 'Admin role' });
|
||||
await visit('/orgs/1/roles/1');
|
||||
await fillIn('[name="name"]', 'Updated admin role');
|
||||
await click('.rose-form-actions [type="submit"]');
|
||||
@@ -89,14 +89,14 @@ module('Acceptance | roles', function (hooks) {
|
||||
|
||||
test('can cancel changes to an existing role', async function (assert) {
|
||||
assert.expect(1);
|
||||
this.server.createList('role', 1, {name: 'Admin role'});
|
||||
this.server.createList('role', 1, { name: 'Admin role' });
|
||||
await visit('/orgs/1/roles/1');
|
||||
await fillIn('[name="name"]', 'Updated admin role');
|
||||
await click('.rose-form-actions [type="button"]');
|
||||
assert.equal(find('[name="name"]').value, 'Admin role');
|
||||
});
|
||||
|
||||
test('can delete a role', async function(assert) {
|
||||
test('can delete a role', async function (assert) {
|
||||
assert.expect(2);
|
||||
this.server.createList('role', 1);
|
||||
assert.equal(this.server.db.roles.length, 1);
|
||||
|
||||
@@ -5,7 +5,7 @@ import setupMirage from 'ember-cli-mirage/test-support/setup-mirage';
|
||||
import a11yAudit from 'ember-a11y-testing/test-support/audit';
|
||||
import { Response } from 'miragejs';
|
||||
|
||||
module('Acceptance | users', function(hooks) {
|
||||
module('Acceptance | users', function (hooks) {
|
||||
setupApplicationTest(hooks);
|
||||
setupMirage(hooks);
|
||||
|
||||
@@ -80,7 +80,7 @@ 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'});
|
||||
this.server.createList('user', 1, { name: 'Test User' });
|
||||
await visit('/orgs/1/users/1');
|
||||
await fillIn('[name="name"]', 'Updated user name');
|
||||
await click('.rose-form-actions [type="submit"]');
|
||||
@@ -90,14 +90,14 @@ module('Acceptance | users', function(hooks) {
|
||||
|
||||
test('can cancel changes to an existing user', async function (assert) {
|
||||
assert.expect(1);
|
||||
this.server.createList('user', 1, {name: 'Test User'});
|
||||
this.server.createList('user', 1, { name: 'Test User' });
|
||||
await visit('/orgs/1/users/1');
|
||||
await fillIn('[name="name"]', 'Unsaved user name');
|
||||
await click('.rose-form-actions [type="button"]');
|
||||
assert.equal(find('[name="name"]').value, 'Test User');
|
||||
});
|
||||
|
||||
test('can delete an user', async function(assert) {
|
||||
test('can delete an user', async function (assert) {
|
||||
assert.expect(2);
|
||||
this.server.createList('user', 1);
|
||||
assert.equal(this.server.db.users.length, 1);
|
||||
|
||||
@@ -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`<BreadCrumbs @breadCrumbs={{this.breadCrumbs}} />`);
|
||||
// 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`<BreadCrumbs @breadCrumbs={{this.breadCrumbs}} />`);
|
||||
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`<BreadCrumbs @breadCrumbs={{this.breadCrumbs}} />`);
|
||||
assert.equal(findAll('a').length, 3);
|
||||
|
||||
@@ -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 = () => {};
|
||||
|
||||
@@ -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);
|
||||
});
|
||||
|
||||
@@ -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);
|
||||
});
|
||||
|
||||
@@ -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);
|
||||
});
|
||||
|
||||
@@ -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);
|
||||
});
|
||||
|
||||
@@ -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);
|
||||
});
|
||||
|
||||
@@ -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);
|
||||
});
|
||||
|
||||
@@ -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);
|
||||
});
|
||||
});
|
||||
+13
-8
@@ -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);
|
||||
});
|
||||
}
|
||||
);
|
||||
@@ -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);
|
||||
});
|
||||
}
|
||||
);
|
||||
@@ -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);
|
||||
});
|
||||
|
||||
@@ -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);
|
||||
});
|
||||
|
||||
@@ -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);
|
||||
});
|
||||
|
||||
@@ -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);
|
||||
});
|
||||
|
||||
@@ -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);
|
||||
});
|
||||
|
||||
@@ -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);
|
||||
});
|
||||
|
||||
@@ -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);
|
||||
});
|
||||
|
||||
@@ -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);
|
||||
});
|
||||
|
||||
@@ -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);
|
||||
});
|
||||
});
|
||||
@@ -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);
|
||||
});
|
||||
|
||||
@@ -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);
|
||||
});
|
||||
|
||||
@@ -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);
|
||||
});
|
||||
|
||||
@@ -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);
|
||||
});
|
||||
|
||||
@@ -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);
|
||||
});
|
||||
|
||||
@@ -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);
|
||||
});
|
||||
});
|
||||
+12
-7
@@ -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);
|
||||
});
|
||||
}
|
||||
);
|
||||
+12
-7
@@ -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);
|
||||
});
|
||||
}
|
||||
);
|
||||
@@ -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);
|
||||
});
|
||||
}
|
||||
);
|
||||
@@ -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);
|
||||
});
|
||||
});
|
||||
@@ -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);
|
||||
});
|
||||
|
||||
@@ -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);
|
||||
});
|
||||
|
||||
@@ -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);
|
||||
});
|
||||
|
||||
@@ -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);
|
||||
});
|
||||
|
||||
@@ -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);
|
||||
});
|
||||
|
||||
@@ -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);
|
||||
});
|
||||
|
||||
@@ -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);
|
||||
});
|
||||
|
||||
@@ -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);
|
||||
});
|
||||
|
||||
@@ -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);
|
||||
});
|
||||
|
||||
@@ -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);
|
||||
});
|
||||
|
||||
@@ -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);
|
||||
});
|
||||
|
||||
@@ -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);
|
||||
});
|
||||
|
||||
@@ -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);
|
||||
});
|
||||
|
||||
@@ -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);
|
||||
});
|
||||
|
||||
@@ -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);
|
||||
});
|
||||
|
||||
@@ -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);
|
||||
});
|
||||
|
||||
@@ -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);
|
||||
});
|
||||
});
|
||||
@@ -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);
|
||||
});
|
||||
});
|
||||
Loaded 100 of 103 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user