From d8da18914e247d3594750cc4d0201b4b6d95f3c5 Mon Sep 17 00:00:00 2001 From: annekauf <151649251+annekauf@users.noreply.github.com> Date: Wed, 25 Sep 2024 11:01:35 +0200 Subject: [PATCH] Added 2 Tests African Added identical Search but once searchfield "AllFields" and once searchfield "JournalTitle" to nested.cy.js see #8 --- cypress/e2e/nested.cy.js | 53 ++++++++++++++++++++++++++++++++++++++-- vufind/searchspecs.yaml | 35 ++++++++++++++------------ 2 files changed, 71 insertions(+), 17 deletions(-) diff --git a/cypress/e2e/nested.cy.js b/cypress/e2e/nested.cy.js index d08dc1e..b132d94 100644 --- a/cypress/e2e/nested.cy.js +++ b/cypress/e2e/nested.cy.js @@ -8,7 +8,7 @@ describe('Nested Work', () => { cy.visit({ url: '/Results', qs: { - lookfor: 'African American Review', + lookfor: 'African American review', type: 'Title', "filter[]": '~remote_bool:"false"' } @@ -16,13 +16,62 @@ describe('Nested Work', () => { }) // see #25 - it.skip('should appear before child work', () => { + it.only('should appear before child work', () => { cy.get('#result0') .find('.media-type') .contains(' Zeitschrift (gedruckt) ') cy.get('#result1') .find('.media-type') .contains(' Band einer Zeitschrift/Zeitung ') + +describe('African American Review', () => { + // check if exact match first list item is the journal parent and subsequent entries are child works + // a more elaborate test would compare the value of '.record-number' within the same family + beforeEach(() => { + cy.visit({ + url: '/Results', + qs: { + lookfor: 'African American review', + type: 'AllFields', + "filter[]": '~remote_bool:"false"' + } + }) + }) + + // see #25 + it.only('should appear before child work', () => { + cy.get('#result0') + .find('.media-type') + .contains(' Zeitschrift (gedruckt) ') + cy.get('#result1') + .find('.media-type') + .contains(' Band einer Zeitschrift/Zeitung ') + +describe('African American Review', () => { + // Title search and online access false to limit noise + // check if exact match first list item is the journal parent and subsequent entries are child works + // a more elaborate test would compare the value of '.record-number' within the same family + beforeEach(() => { + cy.visit({ + url: '/Results', + qs: { + lookfor: 'African American review', + type: 'Title', + "filter[]": '~remote_bool:"false"' + } + }) + }) + + // see #25 + it.only('should appear before child work', () => { + cy.get('#result0') + .find('.media-type') + .contains(' Zeitschrift (gedruckt) ') + cy.get('#result1') + .find('.media-type') + .contains(' Band einer Zeitschrift/Zeitung ') + + }) }) diff --git a/vufind/searchspecs.yaml b/vufind/searchspecs.yaml index 655179e..049fbf6 100644 --- a/vufind/searchspecs.yaml +++ b/vufind/searchspecs.yaml @@ -386,20 +386,25 @@ JournalTitle: Title: DismaxFields: - title_short^500 - - title_full_unstemmed^650 - - title_full^400 - - title_fullGer^400 - - title^300 - - title_alt^200 - - title_new^100 - - title_old - - series^100 - - series2 - - title_os_txtP_mv - DismaxHandler: edismax -# ExactSettings: -# DismaxFields: -# - title_full_unstemmed^450 + # - title_full_unstemmed^650 + # - title_full^400 + # - title_fullGer^400 + # - title^300 + # - title_alt^200 + # - title_new^100 + # - title_old + # - series^100 + # - series2 + # - title_os_txtP_mv + - is_hierarchy_title + - hierarchy_top_title + - hierarchy_parent_title + # DismaxHandler: edismax + + ExactSettings: + DismaxFields: + # - title_full_unstemmed^450 + - is_hierarchy_title BKL: DismaxMunge: @@ -488,7 +493,7 @@ AllFields: # Alternative zum abgestufen Boosting des Erscheinungsjahres, eWW # see #35 # see #59 - - [bf, 'ord(publishDateSort)^500'] + - [bf, 'ord(publishDateSort)^250'] # - [bf, 'title_short^200'] - [bq, collection_details:"GBV_ILN_11"^200] - [tie, 0.1]