mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-08 18:44:14 +00:00
74647: Add Generator meta tag on all pages
This commit is contained in:
@@ -232,24 +232,18 @@ describe('MetadataService', () => {
|
|||||||
expect(tagStore.get('citation_technical_report_institution')[0].content).toEqual('Mock Publisher');
|
expect(tagStore.get('citation_technical_report_institution')[0].content).toEqual('Mock Publisher');
|
||||||
}));
|
}));
|
||||||
|
|
||||||
it('items page should set meta tag for Generator containing the current DSpace version', fakeAsync(() => {
|
it('other navigation should add title, description and Generator', fakeAsync(() => {
|
||||||
spyOn(itemDataService, 'findById').and.returnValue(mockRemoteData(ItemMock));
|
|
||||||
router.navigate(['/items/0ec7ff22-f211-40ab-a69e-c819b0b1f357']);
|
|
||||||
tick();
|
|
||||||
expect(tagStore.get('Generator')[0].content).toEqual('mock-dspace-version');
|
|
||||||
}));
|
|
||||||
|
|
||||||
it('other navigation should title and description', fakeAsync(() => {
|
|
||||||
spyOn(itemDataService, 'findById').and.returnValue(mockRemoteData(ItemMock));
|
spyOn(itemDataService, 'findById').and.returnValue(mockRemoteData(ItemMock));
|
||||||
router.navigate(['/items/0ec7ff22-f211-40ab-a69e-c819b0b1f357']);
|
router.navigate(['/items/0ec7ff22-f211-40ab-a69e-c819b0b1f357']);
|
||||||
tick();
|
tick();
|
||||||
expect(tagStore.size).toBeGreaterThan(0);
|
expect(tagStore.size).toBeGreaterThan(0);
|
||||||
router.navigate(['/other']);
|
router.navigate(['/other']);
|
||||||
tick();
|
tick();
|
||||||
expect(tagStore.size).toEqual(2);
|
expect(tagStore.size).toEqual(3);
|
||||||
expect(title.getTitle()).toEqual('Dummy Title');
|
expect(title.getTitle()).toEqual('Dummy Title');
|
||||||
expect(tagStore.get('title')[0].content).toEqual('Dummy Title');
|
expect(tagStore.get('title')[0].content).toEqual('Dummy Title');
|
||||||
expect(tagStore.get('description')[0].content).toEqual('This is a dummy item component for testing!');
|
expect(tagStore.get('description')[0].content).toEqual('This is a dummy item component for testing!');
|
||||||
|
expect(tagStore.get('Generator')[0].content).toEqual('mock-dspace-version');
|
||||||
}));
|
}));
|
||||||
|
|
||||||
describe('when the item has no bitstreams', () => {
|
describe('when the item has no bitstreams', () => {
|
||||||
|
@@ -93,6 +93,8 @@ export class MetadataService {
|
|||||||
this.addMetaTag('description', translatedDescription);
|
this.addMetaTag('description', translatedDescription);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
this.setGenerator();
|
||||||
}
|
}
|
||||||
|
|
||||||
private initialize(dspaceObject: DSpaceObject): void {
|
private initialize(dspaceObject: DSpaceObject): void {
|
||||||
@@ -138,8 +140,6 @@ export class MetadataService {
|
|||||||
this.setCitationTechReportInstitutionTag();
|
this.setCitationTechReportInstitutionTag();
|
||||||
}
|
}
|
||||||
|
|
||||||
this.setGenerator();
|
|
||||||
|
|
||||||
// this.setCitationJournalTitleTag();
|
// this.setCitationJournalTitleTag();
|
||||||
// this.setCitationVolumeTag();
|
// this.setCitationVolumeTag();
|
||||||
// this.setCitationIssueTag();
|
// this.setCitationIssueTag();
|
||||||
|
Reference in New Issue
Block a user