Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix_Glaser #49

Merged
merged 3 commits into from
Jan 31, 2024
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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)$/)
annekauf marked this conversation as resolved.
Show resolved Hide resolved
})
.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')
})

})
})
Loading