chore: 🤖 Update groups breadcrumbs after refresh from develop
Update form errors in ui/core to use model errors object
This commit is contained in:
7 files changed
+17
-8
No files matched your search
@@ -1,12 +1,21 @@
|
||||
import { module, test } from 'qunit';
|
||||
import { setupTest } from 'ember-qunit';
|
||||
import config from 'ember-get-config';
|
||||
|
||||
module('Unit | Adapter | group', function(hooks) {
|
||||
setupTest(hooks);
|
||||
|
||||
// Replace this with your real tests.
|
||||
test('it exists', function(assert) {
|
||||
let adapter = this.owner.lookup('adapter:group');
|
||||
assert.ok(adapter);
|
||||
});
|
||||
|
||||
test('it generates URL prefixes without project scope', function (assert) {
|
||||
assert.expect(1);
|
||||
const service = this.owner.lookup('service:scope');
|
||||
service.org = { id: 1 };
|
||||
service.project = { id: 2 };
|
||||
const adapter = this.owner.lookup('adapter:group');
|
||||
assert.equal(adapter.urlPrefix(), `${config.api.namespace}/orgs/1`);
|
||||
});
|
||||
});
|
||||
@@ -2,7 +2,7 @@
|
||||
@onSubmit={{@submit}}
|
||||
@cancel={{@cancel}}
|
||||
@disabled={{@model.isSaving}}
|
||||
@error={{true}}
|
||||
@error={{@model.errors.base}}
|
||||
as |form|
|
||||
>
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
@onSubmit={{@submit}}
|
||||
@cancel={{@cancel}}
|
||||
@disabled={{@model.isSaving}}
|
||||
@error={{true}}
|
||||
@error={{@model.errors.base}}
|
||||
as |form|
|
||||
>
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
@onSubmit={{@submit}}
|
||||
@cancel={{@cancel}}
|
||||
@disabled={{@model.isSaving}}
|
||||
@error={{true}}
|
||||
@error={{@model.errors.base}}
|
||||
as |form|
|
||||
>
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
@onSubmit={{@submit}}
|
||||
@cancel={{@cancel}}
|
||||
@disabled={{@model.isSaving}}
|
||||
@error={{true}}
|
||||
@error={{@model.errors.base}}
|
||||
as |form|
|
||||
>
|
||||
|
||||
|
||||
@@ -7,6 +7,6 @@ export default class OrgsOrgGroupsGroupController extends Controller {
|
||||
/**
|
||||
* @type {string}
|
||||
*/
|
||||
@alias('model.name') breadCrumb;
|
||||
@alias('model.displayName') breadCrumb;
|
||||
|
||||
}
|
||||
@@ -4,8 +4,8 @@ export default class OrgsOrgGroupsRoute extends Route {
|
||||
// =methods
|
||||
|
||||
/**
|
||||
* Returns all roles from store.
|
||||
* @return {Promise[RoleModel]}
|
||||
* Returns all groups from store.
|
||||
* @return {Promise[GroupModel]}
|
||||
*/
|
||||
model() {
|
||||
return this.store.findAll('group');
|
||||
|
||||
Reference in new issue
Block a user