Skip to content

Commit

Permalink
Merge pull request #49 from duncdrum/Fix_Glaser
Browse files Browse the repository at this point in the history
Fix_Glaser
  • Loading branch information
duncdrum authored Jan 31, 2024
2 parents 96d7bae + a45da8c commit ae7ceb5
Showing 1 changed file with 33 additions and 4 deletions.
37 changes: 33 additions & 4 deletions cypress/e2e/author.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)$/)

})
})
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -159,4 +159,33 @@ describe('Author Search', () => {
})
})
})
})
})
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')
})

})
})

0 comments on commit ae7ceb5

Please sign in to comment.