[CORD-1630] Adding model verbose_name and description
Change-Id: If50b38f0328f59852c6ac0a925fb724fdf86782e
diff --git a/src/app/datasources/helpers/model.discoverer.service.spec.ts b/src/app/datasources/helpers/model.discoverer.service.spec.ts
index 94a98e6..7a9e54f 100644
--- a/src/app/datasources/helpers/model.discoverer.service.spec.ts
+++ b/src/app/datasources/helpers/model.discoverer.service.spec.ts
@@ -31,7 +31,9 @@
],
relations: [],
name: 'Node',
- app: 'core'
+ app: 'core',
+ description: '',
+ verbose_name: ''
},
{
fields: [
@@ -40,7 +42,9 @@
],
relations: [],
name: 'VSGTenant',
- app: 'service.vsg'
+ app: 'service.vsg',
+ description: '',
+ verbose_name: ''
}
];
@@ -130,7 +134,9 @@
const model = {
name: 'Node',
app: 'core',
- fields: []
+ fields: [],
+ description: '',
+ verbose_name: ''
};
expect(service.getApiUrlFromModel(model)).toBe('/core/nodes');
});
@@ -139,7 +145,9 @@
const model = {
name: 'Tenant',
app: 'services.test',
- fields: []
+ fields: [],
+ description: '',
+ verbose_name: ''
};
expect(service.getApiUrlFromModel(model)).toBe('/test/tenants');
});
@@ -239,6 +247,13 @@
state: 'xos.vsg.tenant',
parent: 'xos.vsg'
});
+
+ service['addNavItem']({name: 'Tenant', verbose_name: 'Verbose', app: 'services.vsg'});
+ expect(MockXosNavigationService.add).toHaveBeenCalledWith({
+ label: 'Verboses',
+ state: 'xos.vsg.tenant',
+ parent: 'xos.vsg'
+ });
});
it('should cache a model', () => {