Skip to content

Commit

Permalink
Fixed pug01 test (filtered out Biblio dissertations as those are usua…
Browse files Browse the repository at this point in the history
…lly in rug01, not pug01)
  • Loading branch information
verheyenkoen committed Jun 17, 2024
1 parent 6763725 commit d0ecdf2
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 12 deletions.
3 changes: 3 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"cSpell.words": ["biblio"]
}
31 changes: 19 additions & 12 deletions cypress/e2e/catalog/sources/pug01.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
});
});
});

0 comments on commit d0ecdf2

Please sign in to comment.