diff --git a/cypress/e2e/nested.cy.js b/cypress/e2e/nested.cy.js index d08dc1e..37fd6a7 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('should appear before child work', {tags: ['@next']}, () => { + 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(() => {