diff --git a/cypress/e2e/nested.cy.js b/cypress/e2e/nested.cy.js index f7aafc7..7e3af42 100644 --- a/cypress/e2e/nested.cy.js +++ b/cypress/e2e/nested.cy.js @@ -4,7 +4,7 @@ describe('Parent Work', () => { // 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 - before(() => { + beforeEach(() => { cy.visit({ url: '/Results', qs: { @@ -24,4 +24,50 @@ describe('Parent Work', () => { .contains(' Band einer Zeitschrift/Zeitung ') }) }) + + describe('Nachrichten Organ Bergbau Hüttenbetrieb', () => { + beforeEach(() => { + cy.visit({ + url: '/Results', + qs: { + lookfor: 'Nachrichten Organ Bergbau Hüttenbetrieb', + type: 'allFields' + } + }) + }) + + // (DP): 3 hits no child works as far as I can see + it('first hit should be parent work', () => { + cy.get('[href*="168000709"]') + .should('exist') + }) + }) + + describe.only('Journal of Comparative Law 2021', () => { + // (DP): parent work not in top 20 + beforeEach(() => { + cy.visit({ + url: '/Results', + qs: { + lookfor: 'Journal of Comparative Law 2021', + type: 'allFields' + } + }) + }) + + // TODO(DP): failing + it('first hit should be parent work', () => { + cy.get('#result0') + .find('[href*="521689139"]') + .should('exist') + }) + + // TODO(DP): failing + it('first hit should not be child volume', () => { + cy.get('#result0') + .find('.media-type') + .should('not.contain', 'Band einer Zeitschrift/Zeitung') + .and('not.contain', 'Serial Volume') + }) + }) }) \ No newline at end of file diff --git a/cypress/e2e/reviews.cy.js b/cypress/e2e/reviews.cy.js index 51d32e3..b91d196 100644 --- a/cypress/e2e/reviews.cy.js +++ b/cypress/e2e/reviews.cy.js @@ -19,7 +19,7 @@ describe('Review after reviewed', () => { .should('exist') }) - // TODO(DP): unskip after yaml changes + // TODO(DP): failing it.skip('first hit should not be a review', () => { cy.get('#result0') .contains('Strategeme') @@ -46,8 +46,8 @@ describe('Review after reviewed', () => { .should('exist') }) - // TODO(DP): unskip after yaml changes - it.skip('first hit should not be a review', () => { + // TODO(DP): failing + it('first hit should not be a review', () => { cy.get('#result0') .contains('Manik') .should('not.contain', 'Rezension') @@ -55,4 +55,55 @@ describe('Review after reviewed', () => { }) }) + describe('Die Organisierte Welt Internationale Beziehungen und Organisationsforschung', () => { + beforeEach(() => { + cy.visit({ + url: '/Results', + qs: { + lookfor: 'Die Organisierte Welt Internationale Beziehungen und Organisationsforschung', + type: 'AllFields' + } + }) + }) + + // PPN 608988723 + it('first hit matches Title', () => { + cy.get('#result0') + .find('[href*="608988723"]') + .should('exist') + }) + + it('second hit should be a review', () => { + cy.get('#result1') + .contains('Rezension') + }) + }) + + describe('Young, Iris Marion (2002): Inclusion and Democracy. Oxford: Oxford University Press', () => { + beforeEach(() => { + cy.visit({ + url: '/Results', + qs: { + lookfor: 'Young, Iris Marion (2002): Inclusion and Democracy. Oxford: Oxford University Press', + type: 'AllFields', + limit: '10' + } + }) + }) + + // PPN 315776242 + // TODO(DP): failing + it('first hit matches exact title', () => { + cy.get('#result0') + .find('[href*="315776242"]') + .should('exist') + }) + + it.only('second hit should be a review', () => { + cy.get('#result1') + .should('exist') + .contains('Review') + }) + }) + }) \ No newline at end of file