From 17f6eca92a49686a6642801476c6b72363e9d8a2 Mon Sep 17 00:00:00 2001 From: duncdrum Date: Thu, 7 Dec 2023 15:13:12 +0100 Subject: [PATCH] fix(simple): phrase search en start with basic assertions see #6 --- cypress/e2e/simple.cy.js | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) 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({