From 096e329781233582d10f8ff280996204d5edec45 Mon Sep 17 00:00:00 2001 From: annekauf <151649251+annekauf@users.noreply.github.com> Date: Fri, 12 Jan 2024 16:50:42 +0100 Subject: [PATCH] Update author.cy.js Plus Beispiel Friedrich Schiller see #14 see #28 --- cypress/e2e/author.cy.js | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/cypress/e2e/author.cy.js b/cypress/e2e/author.cy.js index a7abc8f..c3dc008 100644 --- a/cypress/e2e/author.cy.js +++ b/cypress/e2e/author.cy.js @@ -85,6 +85,35 @@ describe('Author Search', () => { }) }) + describe('Friedrich Schiller' , () => { + beforeEach(() => { + cy.visit({ + url: '/Results', + qs: { + lookfor: 'Friedrich Schiller', + type: 'Author', + limit: '30' + } + }) + }) + + + // Top 30 in author search should all be by author + // see #28 + it.only('TOP 30 should all be by author', () => { + cy.get('.resultlist-data') + .find('[href*=Author]') + .each(($el, index, $lis) => { + cy.wrap($el) + .contains('Schiller, Friedrich') + }) + .then(($lis) => { + cy.wrap($lis) + .should('have.length', '30') + }) + + }) + }) describe('oliver heaviside' , () => { beforeEach(() => {