Skip to content

Commit

Permalink
fix: citeproc records type
Browse files Browse the repository at this point in the history
  • Loading branch information
Myllaume committed Jan 6, 2025
1 parent a4e2e52 commit b717966
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 7 deletions.
1 change: 1 addition & 0 deletions core/models/record.js
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ export default class Record {
id: citeItem.id,
title: libraryItem['title'],
content: bibliography.getNotes([citeItem])[0],
types: [config.opts.references_type_label],
};

const { error } = schema.validate(props);
Expand Down
23 changes: 16 additions & 7 deletions e2e/record.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -146,13 +146,22 @@ describe('Record', () => {
});
});

it('should create bibliographic record contains quote note', () => {
cy.visit('temp/citeproc.html#matuschak2019');
assertRecordPanelIsOpened();
cy.get('.record-content:visible').should(
'contain.text',
'MATUSCHAK, Andy et NIELSEN, Michael, 2019',
);
describe('bibliographic record', () => {
beforeEach(() => {
cy.visit('temp/citeproc.html#matuschak2019');
assertRecordPanelIsOpened();
});

it('should contains quote note', () => {
cy.get('.record-content:visible').should(
'contain.text',
'MATUSCHAK, Andy et NIELSEN, Michael, 2019',
);
});

it('should has type from config', () => {
cy.get('.record.active .record-type').should('contain.text', 'reference');
});
});

it('should add quote notes at footer of record', () => {
Expand Down

0 comments on commit b717966

Please sign in to comment.