From 1392661a55e51f5f7be83b9f394a4128586459e1 Mon Sep 17 00:00:00 2001 From: Guillaume Brioudes Date: Mon, 6 Jan 2025 19:36:42 +0100 Subject: [PATCH] fix: citeproc records type --- core/models/record.js | 1 + e2e/record.cy.js | 23 ++++++++++++++++------- 2 files changed, 17 insertions(+), 7 deletions(-) diff --git a/core/models/record.js b/core/models/record.js index e8794de..35d2ae2 100644 --- a/core/models/record.js +++ b/core/models/record.js @@ -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); diff --git a/e2e/record.cy.js b/e2e/record.cy.js index 3c5ed62..853e8be 100644 --- a/e2e/record.cy.js +++ b/e2e/record.cy.js @@ -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.only('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', () => {