Skip to content

Commit

Permalink
Added 2 Tests African
Browse files Browse the repository at this point in the history
Added identical Search but once searchfield "AllFields" and once searchfield "JournalTitle" to nested.cy.js

see #8
  • Loading branch information
annekauf committed Sep 25, 2024
1 parent 9336a95 commit d8da189
Show file tree
Hide file tree
Showing 2 changed files with 71 additions and 17 deletions.
53 changes: 51 additions & 2 deletions cypress/e2e/nested.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,21 +8,70 @@ describe('Nested Work', () => {
cy.visit({
url: '/Results',
qs: {
lookfor: 'African American Review',
lookfor: 'African American review',
type: 'Title',
"filter[]": '~remote_bool:"false"'
}
})
})

// 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 ')


})
})

Expand Down
35 changes: 20 additions & 15 deletions vufind/searchspecs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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]
Expand Down

0 comments on commit d8da189

Please sign in to comment.