mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-15 05:53:03 +00:00
DS-4107 Update tests and mocks for metadata as map
This commit is contained in:
@@ -30,6 +30,7 @@ describe('SearchFormComponent', () => {
|
||||
});
|
||||
|
||||
it('should display scopes when available with default and all scopes', () => {
|
||||
|
||||
comp.scopes = objects;
|
||||
fixture.detectChanges();
|
||||
const select: HTMLElement = de.query(By.css('select')).nativeElement;
|
||||
@@ -121,33 +122,38 @@ export const objects: DSpaceObject[] = [
|
||||
id: '7669c72a-3f2a-451f-a3b9-9210e7a4c02f',
|
||||
uuid: '7669c72a-3f2a-451f-a3b9-9210e7a4c02f',
|
||||
type: ResourceType.Community,
|
||||
metadata: [
|
||||
{
|
||||
key: 'dc.description',
|
||||
language: null,
|
||||
value: ''
|
||||
},
|
||||
{
|
||||
key: 'dc.description.abstract',
|
||||
language: null,
|
||||
value: 'This is a test community to hold content for the OR2017 demostration'
|
||||
},
|
||||
{
|
||||
key: 'dc.description.tableofcontents',
|
||||
language: null,
|
||||
value: ''
|
||||
},
|
||||
{
|
||||
key: 'dc.rights',
|
||||
language: null,
|
||||
value: ''
|
||||
},
|
||||
{
|
||||
key: 'dc.title',
|
||||
language: null,
|
||||
value: 'OR2017 - Demonstration'
|
||||
}
|
||||
]
|
||||
metadata: {
|
||||
'dc.description': [
|
||||
{
|
||||
language: null,
|
||||
value: ''
|
||||
}
|
||||
],
|
||||
'dc.description.abstract': [
|
||||
{
|
||||
language: null,
|
||||
value: 'This is a test community to hold content for the OR2017 demostration'
|
||||
}
|
||||
],
|
||||
'dc.description.tableofcontents': [
|
||||
{
|
||||
language: null,
|
||||
value: ''
|
||||
}
|
||||
],
|
||||
'dc.rights': [
|
||||
{
|
||||
language: null,
|
||||
value: ''
|
||||
}
|
||||
],
|
||||
'dc.title': [
|
||||
{
|
||||
language: null,
|
||||
value: 'OR2017 - Demonstration'
|
||||
}
|
||||
]
|
||||
}
|
||||
}),
|
||||
Object.assign(new Community(),
|
||||
{
|
||||
@@ -170,33 +176,38 @@ export const objects: DSpaceObject[] = [
|
||||
id: '9076bd16-e69a-48d6-9e41-0238cb40d863',
|
||||
uuid: '9076bd16-e69a-48d6-9e41-0238cb40d863',
|
||||
type: ResourceType.Community,
|
||||
metadata: [
|
||||
{
|
||||
key: 'dc.description',
|
||||
language: null,
|
||||
value: '<p>This is the introductory text for the <em>Sample Community</em> on the DSpace Demonstration Site. It is editable by System or Community Administrators (of this Community).</p>\r\n<p><strong>DSpace Communities may contain one or more Sub-Communities or Collections (of Items).</strong></p>\r\n<p>This particular Community has its own logo (the <a href=\'http://www.duraspace.org/\'>DuraSpace</a> logo).</p>'
|
||||
},
|
||||
{
|
||||
key: 'dc.description.abstract',
|
||||
language: null,
|
||||
value: 'This is a sample top-level community'
|
||||
},
|
||||
{
|
||||
key: 'dc.description.tableofcontents',
|
||||
language: null,
|
||||
value: '<p>This is the <em>news section</em> for this <em>Sample Community</em>. System or Community Administrators (of this Community) can edit this News field.</p>'
|
||||
},
|
||||
{
|
||||
key: 'dc.rights',
|
||||
language: null,
|
||||
value: '<p><em>If this Community had special copyright text to display, it would be displayed here.</em></p>'
|
||||
},
|
||||
{
|
||||
key: 'dc.title',
|
||||
language: null,
|
||||
value: 'Sample Community'
|
||||
}
|
||||
]
|
||||
metadata: {
|
||||
'dc.description': [
|
||||
{
|
||||
language: null,
|
||||
value: '<p>This is the introductory text for the <em>Sample Community</em> on the DSpace Demonstration Site. It is editable by System or Community Administrators (of this Community).</p>\r\n<p><strong>DSpace Communities may contain one or more Sub-Communities or Collections (of Items).</strong></p>\r\n<p>This particular Community has its own logo (the <a href=\'http://www.duraspace.org/\'>DuraSpace</a> logo).</p>'
|
||||
}
|
||||
],
|
||||
'dc.description.abstract': [
|
||||
{
|
||||
language: null,
|
||||
value: 'This is a sample top-level community'
|
||||
}
|
||||
],
|
||||
'dc.description.tableofcontents': [
|
||||
{
|
||||
language: null,
|
||||
value: '<p>This is the <em>news section</em> for this <em>Sample Community</em>. System or Community Administrators (of this Community) can edit this News field.</p>'
|
||||
}
|
||||
],
|
||||
'dc.rights': [
|
||||
{
|
||||
language: null,
|
||||
value: '<p><em>If this Community had special copyright text to display, it would be displayed here.</em></p>'
|
||||
}
|
||||
],
|
||||
'dc.title': [
|
||||
{
|
||||
language: null,
|
||||
value: 'Sample Community'
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
)
|
||||
];
|
||||
|
Reference in New Issue
Block a user