From 76130005a58b61334577fefed49c1a57c13d479e Mon Sep 17 00:00:00 2001 From: annekauf <151649251+annekauf@users.noreply.github.com> Date: Wed, 24 Jan 2024 16:45:39 +0100 Subject: [PATCH 1/3] Update author.cy.js see #14 failing on StabiKat tried to fix test Karin Glaser --- cypress/e2e/author.cy.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cypress/e2e/author.cy.js b/cypress/e2e/author.cy.js index edb6c20..b9be52a 100644 --- a/cypress/e2e/author.cy.js +++ b/cypress/e2e/author.cy.js @@ -15,7 +15,7 @@ describe('Author Search', () => { it('first hit should be by the author', {tags: ['@next']}, () => { cy.get('#result0') .find('.resultlist-data') - .contains('Glaser, Karin') + .contains(/^(?=.*Karin)(?=.*Glaser)$/) }) }) From 4da0b5074210648462ae88db9d4e57b4eeb7629f Mon Sep 17 00:00:00 2001 From: annekauf <151649251+annekauf@users.noreply.github.com> Date: Fri, 26 Jan 2024 14:06:46 +0100 Subject: [PATCH 2/3] Update author.cy.js Search for author's name in any order --- cypress/e2e/author.cy.js | 35 ++++++++++++++++++++++++++++++++--- 1 file changed, 32 insertions(+), 3 deletions(-) diff --git a/cypress/e2e/author.cy.js b/cypress/e2e/author.cy.js index b9be52a..25ba466 100644 --- a/cypress/e2e/author.cy.js +++ b/cypress/e2e/author.cy.js @@ -97,7 +97,7 @@ describe('Author Search', () => { .find('[href*=Author]') .each(($el, index, $lis) => { cy.wrap($el) - .contains('Scheidt, Samuel') + ..contains(/^(?=.*Samuel)(?=.*Scheidt)$/) }) .then(($lis) => { cy.wrap($lis) @@ -126,7 +126,7 @@ describe('Author Search', () => { .find('[href*=Author]') .each(($el, index, $lis) => { cy.wrap($el) - .contains('Schiller, Friedrich') + .contains(/^(?=.*Friedrich)(?=.*Schiller)$/) }) .then(($lis) => { cy.wrap($lis) @@ -159,4 +159,33 @@ describe('Author Search', () => { }) }) }) -}) \ No newline at end of file +}) +describe('Elfriede Jelinek', () => { + beforeEach(() => { + cy.visit({ + url: '/Results', + qs: { + lookfor: 'Elfriede Jelinek', + type: 'Author' + + } + }) + }) + + + // Top 20 in author search should all be by author + // see #28 + it('Top 20 should all be by author', {tags: ['@next']}, () => { + cy.get('.resultlist-data') + .find('[href*=Author]') + .each(($el, index, $lis) => { + cy.wrap($el) + .contains(/^(?=.*Elfriede)(?=.*Jelinek)$/) + }) + .then(($lis) => { + cy.wrap($lis) + .should('have.length', '20') + }) + + }) + }) \ No newline at end of file From a45da8c8c36ed107671bc8eee96026d6a7b1521b Mon Sep 17 00:00:00 2001 From: annekauf <151649251+annekauf@users.noreply.github.com> Date: Tue, 30 Jan 2024 16:52:02 +0100 Subject: [PATCH 3/3] Update cypress/e2e/author.cy.js Co-authored-by: Duncan Paterson --- cypress/e2e/author.cy.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cypress/e2e/author.cy.js b/cypress/e2e/author.cy.js index 25ba466..25ae32c 100644 --- a/cypress/e2e/author.cy.js +++ b/cypress/e2e/author.cy.js @@ -97,7 +97,7 @@ describe('Author Search', () => { .find('[href*=Author]') .each(($el, index, $lis) => { cy.wrap($el) - ..contains(/^(?=.*Samuel)(?=.*Scheidt)$/) + .contains(/^(?=.*Samuel)(?=.*Scheidt)$/) }) .then(($lis) => { cy.wrap($lis)