diff --git a/cypress/e2e/simple.cy.js b/cypress/e2e/simple.cy.js index 399c0be..b9c81dc 100644 --- a/cypress/e2e/simple.cy.js +++ b/cypress/e2e/simple.cy.js @@ -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({