diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..d15f498 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,3 @@ +{ + "cSpell.words": ["biblio"] +} diff --git a/cypress/e2e/catalog/sources/pug01.spec.js b/cypress/e2e/catalog/sources/pug01.spec.js index 9bb43bc..de8ab95 100644 --- a/cypress/e2e/catalog/sources/pug01.spec.js +++ b/cypress/e2e/catalog/sources/pug01.spec.js @@ -5,19 +5,26 @@ describe("Data source pug01", () => { cy.getCount().should("be.greaterThan", 230000); }); - it("should have almost as many hits as biblio", () => { - cy.request("https://biblio.ugent.be/publication?limit=0&format=json").then( - (response) => { - const biblioTotal = response.body.total; - cy.log(`Biblio has ${biblioTotal} hits`); + it("should have almost as many hits as Biblio", () => { + cy.request({ + url: "https://biblio.ugent.be/publication", + qs: { + limit: 0, + format: "json", + // count every Biblio publication except dissertations (phd) + // these are usually also in Aleph and those pug01 records would be merged with rug01 instead + q: 'type any "book bookChapter bookEditor conference issueEditor journalArticle misc researchData"', + }, + }).then((response) => { + const biblioTotal = response.body.total; + cy.log(`Biblio has ${biblioTotal} hits`); - cy.visit("/catalog/source:pug01"); + cy.visit("/catalog/source:pug01"); - // biblio wordt 's nachts gesynced met lib, dus er kan wel wat verschil zijn - cy.getCount() - .should("be.greaterThan", 200000) - .should("be.within", biblioTotal - 15000, biblioTotal); - }, - ); + // Biblio wordt 's nachts gesynced met lib, dus er kan wel wat verschil zijn + cy.getCount() + .should("be.greaterThan", 200000) + .should("be.within", biblioTotal - 15000, biblioTotal); + }); }); });