fix: Mirage post issue for managed-groups

This commit is contained in:
Susmitha Girumala committed 2021-11-10 16:12:42 -05:00
1 parent 4e41ac531d
commit 7c762c1050
6 files changed
+31 -13

No files matched your search

+8
View File
@@ -5,6 +5,14 @@ import { A } from '@ember/array';
export default class ManagedGroupModel extends GeneratedManagedGroupModel {
// =attributes
// =error attributes
// These attributes exist solely to capture errors on nested fields.
// See the application adapter's error normalization method for
// more information.
@attr('string', { readOnly: true }) attributes_filter;
/**
* Members is read-only under normal circumstances. But members can
* be persisted via calls to `addMembers()` or `removeMembers()`.
+4 -5
View File
@@ -2,8 +2,11 @@ import factory from '../generated/factories/managed-group';
import { random } from 'faker';
import permissions from '../helpers/permissions';
const types = ['oidc'];
export default factory.extend({
id: (i) => `managed-groups-id-${i}`,
type: (i) => types[i % types.length],
authorized_actions: () =>
permissions.authorizedActionsFor('managed-group') || [
@@ -17,11 +20,7 @@ export default factory.extend({
switch (this.type) {
case 'oidc':
return {
filter: random.word(),
};
default:
return {
filter: '',
filter: random.words(),
};
}
},