From 5f3e417663d8b69df0528b2e4ae4b1c0880b18af Mon Sep 17 00:00:00 2001 From: Diego Cohen Date: Tue, 20 Aug 2024 15:46:24 -0400 Subject: [PATCH 001/141] Initialize sentence case conversion --- __test__/pages/bib/bibPage.test.tsx | 11 ++++---- discoveryApiResearchNowMapping.md | 2 +- .../BibPage/ElectronicResources.test.tsx | 8 +++--- .../BibPage/ElectronicResources.tsx | 4 +-- .../ItemFilters/ItemFilters.test.tsx | 4 +-- src/components/ItemFilters/ItemFilters.tsx | 4 +-- .../ItemTable/ItemTableControls.tsx | 2 +- .../ElectronicResourcesLink.test.tsx | 2 +- .../SearchResults/ElectronicResourcesLink.tsx | 2 +- .../SearchResults/SearchResult.test.tsx | 6 ++-- src/components/SearchResults/SearchResult.tsx | 2 +- src/models/Bib.ts | 6 ++-- src/models/BibDetails.ts | 28 +++++++++---------- src/models/ItemTableData.ts | 4 +-- src/models/modelTests/BibDetails.test.ts | 6 ++-- .../modelTests/SearchResultsBib.test.ts | 6 ++-- styles/components/ItemTable.module.scss | 2 +- 17 files changed, 50 insertions(+), 49 deletions(-) diff --git a/__test__/pages/bib/bibPage.test.tsx b/__test__/pages/bib/bibPage.test.tsx index c8f8b2d48..340f1f3cf 100644 --- a/__test__/pages/bib/bibPage.test.tsx +++ b/__test__/pages/bib/bibPage.test.tsx @@ -44,8 +44,9 @@ describe("Bib Page with items", () => { expect(screen.getByTestId("bib-details-item-table")).toBeInTheDocument() }) + // TODO: Determine if this should be rendering twice it("renders the bottom bib details", () => { - expect(screen.getByTestId("publication-date")).toHaveTextContent( + expect(screen.getAllByTestId("publication-date")[0]).toHaveTextContent( "Vol. 1, issue 1-" ) expect(screen.getByTestId("description")).toHaveTextContent( @@ -246,7 +247,7 @@ describe("Bib Page Item Table", () => { }) it("renders a view all button when there are more than 20 items and updates the url to /all when clicked", async () => { - const viewAllLink = screen.getByText("View All 26 Items").closest("a") + const viewAllLink = screen.getByText("View all 26 items").closest("a") expect(viewAllLink).toHaveAttribute( "href", "/research/research-catalog/bib/pb5579193/all" @@ -269,7 +270,7 @@ describe("Bib Page Item Table", () => { }), }) ) - await userEvent.click(screen.getByText("View All 26 Items").closest("a")) + await userEvent.click(screen.getByText("View all 26 items").closest("a")) expect(screen.getByText("View fewer items")).toBeInTheDocument() expect(screen.getByTestId("bib-details-item-table")).toBeInTheDocument() }) @@ -281,7 +282,7 @@ describe("Bib Page Item Table", () => { setTimeout(resolve, 50) }) ) - await userEvent.click(screen.getByText("View All 26 Items").closest("a")) + await userEvent.click(screen.getByText("View all 26 items").closest("a")) expect( screen.getByText("Loading all 26 items. This may take a few moments...") ).toBeInTheDocument() @@ -294,7 +295,7 @@ describe("Bib Page Item Table", () => { ok: false, }) ) - await userEvent.click(screen.getByText("View All 26 Items").closest("a")) + await userEvent.click(screen.getByText("View all 26 items").closest("a")) expect( screen.getByText( "There was an error fetching items. Please try again with a different query." diff --git a/discoveryApiResearchNowMapping.md b/discoveryApiResearchNowMapping.md index 0ba4f1cbe..6bb2b868f 100644 --- a/discoveryApiResearchNowMapping.md +++ b/discoveryApiResearchNowMapping.md @@ -131,7 +131,7 @@ e.g. `filters`) is used for the parameters the respective APIs except. |