Skip to content

Commit

Permalink
fix(simple): phrase search en
Browse files Browse the repository at this point in the history
start with basic assertions

see #6
  • Loading branch information
duncdrum committed Dec 7, 2023
1 parent fc86e84 commit 522b0fa
Showing 1 changed file with 38 additions and 0 deletions.
38 changes: 38 additions & 0 deletions cypress/e2e/simple.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,44 @@ describe('simple GUI spec', () => {

})

describe('Foreign language phrase search', () => {
// See #6
// Thematische Suche#L30
it('en all fields query matches en not ar', () => {
cy.visit({
url: '/Results',
qs: {
lookfor: 'Egyptian Language',
type: 'AllFields'
}
})
cy.get('.resultlist')
// PPN JST063665204
.contains('The Egyptian Language')
cy.get('.resultlist')
// PPN DOAJ008736839
.should('not.contain', 'المعانی الثانیة للأمر فی النص المصری القدیم دراسة بلاغیة مقارنة ')

})

it('en subject query matches en and ar', () => {
cy.visit({
url: '/Results',
qs: {
lookfor: 'Egyptian Language',
type: 'Subject'
}
})
cy.get('.resultlist')
// PPN JST063665204
.contains('The Egyptian Language')
cy.get('.resultlist')
// PPN DOAJ008736839
.contains('المعانی الثانیة للأمر فی النص المصری القدیم دراسة بلاغیة مقارنة ')

})
})

// TODO(DP): get json repsonse from console
it('passes via http request', () => {
cy.request({
Expand Down

0 comments on commit 522b0fa

Please sign in to comment.