From a4e2e52ea7f48e1d159a7c762917bd60ae69a2bf Mon Sep 17 00:00:00 2001 From: Guillaume Brioudes Date: Mon, 6 Jan 2025 19:30:59 +0100 Subject: [PATCH] test: quote notes --- e2e/record.cy.js | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/e2e/record.cy.js b/e2e/record.cy.js index 374b470..3c5ed62 100644 --- a/e2e/record.cy.js +++ b/e2e/record.cy.js @@ -146,7 +146,7 @@ describe('Record', () => { }); }); - it('should bibliographic record contains citeproc', () => { + it('should create bibliographic record contains quote note', () => { cy.visit('temp/citeproc.html#matuschak2019'); assertRecordPanelIsOpened(); cy.get('.record-content:visible').should( @@ -155,6 +155,24 @@ describe('Record', () => { ); }); + it('should add quote notes at footer of record', () => { + cy.visit('temp/citeproc.html#tools-for-thought'); + + const notes = [ + 'ENGELBART, Douglas C, 1962. AFOSR-3223: Augmenting Human Intellect: A Conceptual Framework', + 'MATUSCHAK, Andy et NIELSEN, Michael, 2019. How can we develop transformative tools for thought?', + ]; + + cy.get('.record-content:visible') + .find('.csl-entry') + .as('quoteNotes') + .should('have.length', notes.length); + + notes.forEach((n, i) => { + cy.get('@quoteNotes').eq(i).should('contains.text', n); + }); + }); + describe('footer', () => { beforeEach(() => { cy.get('[data-node="tools-for-thought"]').click();