Skip to content

Commit

Permalink
deploy 9. april (#1438)
Browse files Browse the repository at this point in the history
* in progress - first shot

* in progress - deleted som files

* setFacets

* in progress

* in progress .. write a test

* usefacet hook

* added a test

* in progress - small steps

* in progress - bugfix + component to style

* in progress - facets from enum

* in progress - remove consoles - find the query

* in progress - working copy

* more facets

* some styling + changes from review

* remove some unused vars

* fixed a test + a real error

* set facetlimit 50 + slice facetlist

* bugfixed + ALL facets

* debugging

* fixed a bug

* added facet tags

* formatting

* remove unused var

* ... (#1397)

* Bibdk2021 2032 mobile facets (#1398)

* fix it (#1394)

* fix it (#1396)

* in progress - added modal

* in progress - skeleton on facets + useGlobal hook

* ... (#1397)

* in progress - back to working copy

* in progress - added replace for modal

* update modal facets + correct modal

* in progress - some mobile styling + facettags on mobile

* in progress - remove usestate

* working facet browser !

* in progress .. small steps :)

* facetbutton in own component

* some mobile styling

* formatting :)

* modal page for mobile facets

* removed some unused vars

* datacheck

* cleanup a little

* fix a test - we dont need facets as dependency here

* skeleton when loading

---------

Co-authored-by: kfudbc <kfudbc@users.noreply.github.com>
Co-authored-by: mtni <36037828+mtni@users.noreply.github.com>

* Bibdk2021 2464 nextjs 14 (#1389)

* const + link fix

* works with nextjs

* nextjs

* fixed stuff

* legacyBehavior

* remove comment

* audit

* fixed imports

* fixed lint error

* comment

* Bibdk2021 2530 searchhistory (#1399)

* filters in search history

* remove unused

* disable orderconfirmation for periodica (#1402)

* disable orderconfirmation for periodica

* change from review - false is the way

* dbc-node:latest (#1403)

* Bibdk2021 2530 searchhistory2 (#1404)

* in progress - split historyobject

* today, yesterday and older in searchhistory

* props in lower case

* disable orderconfirmation for periodica (#1402)

* disable orderconfirmation for periodica

* change from review - false is the way

* dbc-node:latest (#1403)

* fixed router issue with next14

* ... (#1401)

* handle developer fuckups when ordering

* Reuse filter page (#1406)

* disable orderconfirmation for periodica (#1402)

* disable orderconfirmation for periodica

* change from review - false is the way

* dbc-node:latest (#1403)

* ... (#1401)

* in progress - bugfixing

* handle developer fuckups when ordering

* in progress - modal mobil facetpage + various changes on filter.page

* and filter page also

* update usefacet + implement onselect event

---------

Co-authored-by: Yousef <yousefmohsen@outlook.dk>
Co-authored-by: mtni <36037828+mtni@users.noreply.github.com>

* deleted old test

* skeletorn while loading

* fixes multi order status on bookmark page (#1407)

* fixes multi order status on bookmark page

* clean up

* console log

* clean clean

* bookmark key

* handleOrderFinished

* list of facets

* skeleton when loading

* added translations

* fixed a test

* refactor - only allow components in subtitle (#1409)

* fixed a test

* some styling for desktop

* remove unused var

* skeleton !

* advanced search tab (#1408)

* Bibdk2021 2494 fix alarms (#1410)

* fixed some bugs

* replaceAll -> replace

* replace replaceall with replace

* json parse fix

* replace replaceall

* added japanese and persian languages (#1411)

* fixed some bugs (#1413)

* fixed some bugs

* we still use it

* open popover (#1417)

* Bibdk2021 2549 (#1418)

* prefer resolver over field given by parent

* added 'not available for home loan' message for reservation button

* rm unused

* reset periodica form after ordering (#1421)

* reset periodica form after ordering

* a little test

* a little test

* refix RESOURCE bug (#1423)

* prioritize access (#1412)

* prioritize access

* sort access

* console log

* added if

* Bibdk2021 2554 lorem ipsum (#1424)

* in progress - no bibdkexclude

* excludebranches:false

* hide sort if hitcount > 0 (#1419)

* Bibdk2021 2364 new user link (#1420)

* open popover

* new user link

* prioritize cporation name (#1425)

* added new localization message, on shelf but not loanable (#1422)

* added new localization message, on shelf but not loanable

* fix test

* fix more localization status

* decode url before json.parse (#1415)

* styling + functional changes from review

* remove volume from title (#1427)

* filter result (#1426)

* Bibdk2021 2393 related worktypes only (#1429)

* handle selected worktypes only

* handle selected worktypes only

* handle selected worktypes only

* enable test + new story

* added id field for music (#1428)

* fixed mobile refresh

* some styling - yeah

* Feature dropdown down (#1430)

* dropdown always down

* dropdown direction

* comment

* test fix (#1433)

* test fix

* remove only

* cy version

* Bibdk2021 2270 no tags please (#1432)

* do not show tags section if there are no tags

* do not show tags section if there are no tags

* do not show tags section if there are no tags

* do not show tags section if there are no tags

* mobile facets css + functional change from review (#1435)

* fixed a test - no hitcount for simple search filters

* added a little test

* no scroll for now

* reintroduce smooth scroll - yeah

* Bibdk2021 1609 participants (#1434)

* show participant in seperate field

* show participant in seperate field

* final (#1431)

* fixed search history

* sort refined

* lock tab (#1436)

* lock tab

* prettier

* shadow fix (#1437)

* shadow fix

* use var

* sort by score - ff bugfix

* one sort to rule

---------

Co-authored-by: pjohans <pjohans@gmail.com>
Co-authored-by: mtni <36037828+mtni@users.noreply.github.com>
Co-authored-by: kfudbc <kfudbc@users.noreply.github.com>
  • Loading branch information
4 people authored Apr 9, 2024
1 parent 560c2aa commit fcc89c8
Show file tree
Hide file tree
Showing 94 changed files with 5,445 additions and 381 deletions.
67 changes: 67 additions & 0 deletions e2e/cypress/e2e/advFacets.cy.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
describe("Facets", () => {
it(`Get facets from url`, () => {
cy.visit("/iframe.html?id=advancedsearch-facets--facets-in-url");

// there should be 3 accordions in this story
cy.get("[data-cy=accordion-item]").should("have.length", 5);

cy.get("[data-cy=router-query]").then((el) => {
const fisk = JSON.parse(el.text());
const facets = JSON.parse(fisk.facets);

// there should be two in query
expect(facets.length).to.equal(2);
});

// get the first accordion
cy.get("[data-cy=accordion-item]").first().click();

// there should be 10
cy.get("[data-cy=accordion-item]")
.first()
.find("li")
.should("have.length", 5);

// two of them should be selected from url params
cy.get("[data-cy=accordion-item]")
.eq(0)
.click()
.find("li")
.find("[checked]")
.should("have.length", 2);

// uncheck one
cy.get("[data-cy=accordion-item]")
.eq(0)
.find("li")
.find("[checked]")
.first()
.focus()
.click({ force: true });

// click an item and verify url is updated
cy.get("[data-cy=li-specificmaterialtype-artikel]")
.find("input")
.click({ force: true });

cy.get("[data-cy=router-query]").then((el) => {
const fisk = JSON.parse(el.text());
const facets = fisk.facets;
console.log(facets, "FACETS");

assert(facets.includes("artikel"));
});

// and again
cy.get("[data-cy=li-specificmaterialtype-bog]")
.find("input")
.click({ force: true });

cy.get("[data-cy=router-query]").then((el) => {
const fisk = JSON.parse(el.text());
const facets = fisk.facets;

assert(facets.includes("bog"));
});
});
});
5 changes: 5 additions & 0 deletions e2e/cypress/e2e/filter.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,11 @@ describe("Filter", () => {
});
});

it(`Show hitcount for mobile facets ","`, () => {
cy.visit("/iframe.html?id=modal-filter--mobile-filter");
cy.contains("Vis 1111 resultater");
});

it.skip(`Restore filters when browser's back button is used`, () => {
cy.visit(
`${nextjsBaseUrl}/find?q.all=katte&workType=article&materialTypes=avisartikel`
Expand Down
6 changes: 6 additions & 0 deletions e2e/cypress/e2e/multiorder.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -380,6 +380,12 @@ describe("Multi Order", () => {
},
});
});

// close the form
cy.get('[data-cy="multiorder-button-close"]').click();
// click order one more time to verify reset of periodica form
cy.contains("Bestil tidsskrifter").click();
cy.contains("2 materialer mangler at få udfyldt informationer");
});
it("Should warn about already ordered material, order material anyway", () => {
cy.visit(
Expand Down
6 changes: 6 additions & 0 deletions e2e/cypress/e2e/old/overview.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,12 @@ describe("Overview", () => {
cy.get(`${this.localizations}`).should("not.exist");
cy.get(`${this.skeleton}`).should("not.exist");
});
it("is visible when material is physical, even though ILL is not supported", () => {
cy.visit(
"/iframe.html?args=&id=work-overview-localizationslink--localizations-link-no-ill-but-available-at-libraries"
);
cy.contains("Findes på 1 bibliotek ");
});
it("Not available for loan at any library", function () {
cy.visit(
"/iframe.html?id=work-overview-localizationslink--localizations-link-no-available"
Expand Down
14 changes: 11 additions & 3 deletions e2e/cypress/e2e/old/relatedKeywords.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
*/

describe("Related Keywords", () => {
it.only(`Can tab through related keywords`, async () => {
it(`Can tab through related keywords`, async () => {
await cy.visit("/iframe.html?id=work-relatedsubjects--default");
cy.get("body")
.tab()
Expand Down Expand Up @@ -35,9 +35,17 @@ describe("Related Keywords", () => {

cy.get("[data-cy=related-subject-savn]", {
timeout: 10000,
}).should("have.attr", "href", "/find?q.subject=savn");
}).should(
"have.attr",
"href",
"/avanceret?fieldSearch=%7B%22inputFields%22%3A%5B%7B%22value%22%3A%22savn%22%2C%22prefixLogicalOperator%22%3Anull%2C%22searchIndex%22%3A%22term.subject%22%7D%5D%7D"
);
cy.get("[data-cy=related-subject-melankoli]", {
timeout: 10000,
}).should("have.attr", "href", "/find?q.subject=melankoli");
}).should(
"have.attr",
"href",
"/avanceret?fieldSearch=%7B%22inputFields%22%3A%5B%7B%22value%22%3A%22melankoli%22%2C%22prefixLogicalOperator%22%3Anull%2C%22searchIndex%22%3A%22term.subject%22%7D%5D%7D"
);
});
});
8 changes: 8 additions & 0 deletions e2e/cypress/e2e/reservationbutton.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,14 @@ describe("Reservation button", () => {
cy.get("[data-cy=router-query]").contains("modal");
});

it("physical material shows now for loan message, when no ILL, but is owned by agency", () => {
cy.visit(
"/iframe.html?args=&id=work-reservationbutton--reservation-button-physical-book-no-ill-but-is-owned-by-agency"
);

cy.contains("Kan ikke bestilles til hjemlån");
});

it("digital material", () => {
const urla =
"/iframe.html?id=work-reservationbutton--reservation-button-e-book";
Expand Down
6 changes: 3 additions & 3 deletions e2e/cypress/e2e/ssr.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -143,14 +143,14 @@ describe("Server Side Rendering", () => {

it(`has json-ld for movie`, () => {
getPageHead(
"/materiale/the-jungle-book_jon-favreau/work-of%3A870970-basis%3A52331080"
"/materiale/junglebogen_jon-favreau/work-of:870970-basis:52331080"
).then((res) => {
expect(res.jsonld.mainEntity.url).to.equal(
"http://localhost:3000/materiale/the-jungle-book_jon-favreau/work-of:870970-basis:52331080"
"http://localhost:3000/materiale/junglebogen_jon-favreau/work-of:870970-basis:52331080"
);

expect(res.jsonld.mainEntity["@type"]).to.equal("Movie");
expect(res.jsonld.mainEntity.name).to.equal("The jungle book");
expect(res.jsonld.mainEntity.name).to.equal("Junglebogen");
expect(res.jsonld.mainEntity.image).to.exist;
expect(res.jsonld.mainEntity.director).to.deep.equal([
{
Expand Down
Loading

0 comments on commit fcc89c8

Please sign in to comment.