From 1e95bd41f25b26079204f39c1766cb24e9a53683 Mon Sep 17 00:00:00 2001 From: annekauf <151649251+annekauf@users.noreply.github.com> Date: Tue, 7 May 2024 16:36:35 +0200 Subject: [PATCH] two more tests African American Review close #75 see #25 close #78 --- cypress/e2e/nested.cy.js | 53 ++++++++++++++++++++++++++++++++++++++-- 1 file changed, 51 insertions(+), 2 deletions(-) diff --git a/cypress/e2e/nested.cy.js b/cypress/e2e/nested.cy.js index d08dc1e..c05b68a 100644 --- a/cypress/e2e/nested.cy.js +++ b/cypress/e2e/nested.cy.js @@ -1,6 +1,6 @@ describe('Nested Work', () => { // see #8 - describe('African American Review', () => { + describe('African American Review -All', () => { // Title search and online access false to limit noise // check if exact match first list item is the journal parent and subsequent entries are child works // a more elaborate test would compare the value of '.record-number' within the same family @@ -9,7 +9,7 @@ describe('Nested Work', () => { url: '/Results', qs: { lookfor: 'African American Review', - type: 'Title', + type: 'allFields', "filter[]": '~remote_bool:"false"' } }) @@ -25,6 +25,55 @@ describe('Nested Work', () => { .contains(' Band einer Zeitschrift/Zeitung ') }) }) + + describe('African American Review -Journal', () => { + // check if exact match first list item is the journal parent and subsequent entries are child works + // see #75 + + beforeEach(() => { + cy.visit({ + url: '/Results', + qs: { + lookfor: 'African American Review', + type: 'JournalSearch', + "filter[]": '~remote_bool:"false"' + } + }) + }) + + it('should appear before child work', () => { + cy.get('#result0') + .find('.media-type') + .contains(' Zeitschrift (gedruckt) ') + cy.get('#result1') + .find('.media-type') + .contains(' Band einer Zeitschrift/Zeitung ') + }) + }) + + describe('African American Review -Title', () => { + // check if exact match first list item is the journal parent and subsequent entries are child works + + beforeEach(() => { + cy.visit({ + url: '/Results', + qs: { + lookfor: 'African American Review', + type: 'title', + "filter[]": '~remote_bool:"false"' + } + }) + }) + + it.skip('should appear before child work', () => { + cy.get('#result0') + .find('.media-type') + .contains(' Zeitschrift (gedruckt) ') + cy.get('#result1') + .find('.media-type') + .contains(' Band einer Zeitschrift/Zeitung ') + }) + }) describe('Nachrichten Organ Bergbau Hüttenbetrieb', () => { beforeEach(() => {