From 520ee3f65dcecd7a8a826cd15a314afc876d21ae Mon Sep 17 00:00:00 2001 From: Duncan Paterson Date: Thu, 29 Feb 2024 15:50:33 +0100 Subject: [PATCH] fix(author): adjust heaviside --- cypress/e2e/author.cy.js | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/cypress/e2e/author.cy.js b/cypress/e2e/author.cy.js index abd052e..93dd7e7 100644 --- a/cypress/e2e/author.cy.js +++ b/cypress/e2e/author.cy.js @@ -142,21 +142,31 @@ describe('Author Search', () => { url: '/Results', qs: { lookfor: 'oliver heaviside', - type: 'allFields' + type: 'allFields', + limit: 5 } }) }) - it('should appear in each of top 20', () => { + it('should appear in titles or decscription', () => { cy.get('.resultlist') .each(($el, index, $lis) => { cy.wrap($el) + if ($el.text().includes('Oliver Heaviside')) { + cy.get($el) .contains('Heaviside', {matchCase: false}) + } else { + cy.get($el) + .click() + cy.get('.long-view') + .find('a[id^=description_]') + .click() + cy.get('.additional') + .contains('Heaviside', {matchCase: false}) + } + }) - .then(($lis) => { - cy.wrap($lis) - .should('have.length', '20') - }) + }) }) })