From 18099a95cba009754aaec2c5ed56189f84479cd4 Mon Sep 17 00:00:00 2001 From: Haider Alshamma Date: Mon, 6 Jan 2025 16:04:42 -0500 Subject: [PATCH] chore: formatting --- src/Pagination/Pagination.spec.tsx | 8 ++++---- src/Table/Table.spec.tsx | 26 +++++++++++++------------- 2 files changed, 17 insertions(+), 17 deletions(-) diff --git a/src/Pagination/Pagination.spec.tsx b/src/Pagination/Pagination.spec.tsx index 577f01eba..08ca0c528 100644 --- a/src/Pagination/Pagination.spec.tsx +++ b/src/Pagination/Pagination.spec.tsx @@ -60,7 +60,7 @@ describe("Pagination", () => { onNext={onNextCallback} onPrevious={onPreviousCallback} onSelectPage={onSelectPageCallback} - />, + /> ); const clickPage = (pageNum: number) => { fireEvent.click(getAllByLabelText("Go to page {{count}}")[pageNum]); @@ -78,7 +78,7 @@ describe("Pagination", () => { onNext={onNextCallback} onPrevious={onPreviousCallback} onSelectPage={onSelectPageCallback} - />, + /> ); const clickPrevious = () => { const PreviousButton = getByLabelText("Go to previous results"); @@ -95,7 +95,7 @@ describe("Pagination", () => { onNext={onNextCallback} onPrevious={onPreviousCallback} onSelectPage={onSelectPageCallback} - />, + /> ); const clickPrevious = () => { const PreviousButton = getByLabelText("Go to previous results"); @@ -112,7 +112,7 @@ describe("Pagination", () => { onNext={onNextCallback} onPrevious={onPreviousCallback} onSelectPage={onSelectPageCallback} - />, + /> ); const NextButton = getByLabelText("Go to next results"); diff --git a/src/Table/Table.spec.tsx b/src/Table/Table.spec.tsx index 3720f564c..5eca29f34 100644 --- a/src/Table/Table.spec.tsx +++ b/src/Table/Table.spec.tsx @@ -16,7 +16,7 @@ describe("Table", () => { const callback = jest.fn(); const { container } = renderWithNDSProvider( - , +
); fireEvent.click(container.querySelectorAll("input")[1]); @@ -30,7 +30,7 @@ describe("Table", () => { const callback = jest.fn(); const { container } = renderWithNDSProvider( -
, +
); fireEvent.click(container.querySelectorAll("input")[0]); @@ -67,7 +67,7 @@ describe("Table", () => { const callback = jest.fn(); const { container } = renderWithNDSProvider( -
, +
); fireEvent.click(container.querySelectorAll("button")[0]); @@ -99,7 +99,7 @@ describe("Table", () => { const callback = jest.fn(); const { container } = renderWithNDSProvider( -
, +
); fireEvent.click(container.querySelectorAll("button")[1]); @@ -127,7 +127,7 @@ describe("Table", () => { keyField="c1" rowsPerPage={6} onPageChange={pageChangeCallback} - />, + /> ); const onClickPage = (pageNum) => { wrapper.find("button").at(pageNum).simulate("click"); @@ -146,7 +146,7 @@ describe("Table", () => { keyField="c1" rowsPerPage={6} onPageChange={pageChangeCallback} - />, + /> ); const paginationButtons = wrapper.find("button"); const nextButton = paginationButtons.last(); @@ -168,7 +168,7 @@ describe("Table", () => { keyField="c1" rowsPerPage={6} onPageChange={pageChangeCallback} - />, + /> ); const rows = wrapper.find("tbody tr"); expect(rows.length).toEqual(ROWS_PER_PAGE); @@ -176,7 +176,7 @@ describe("Table", () => { it("renders the inner Pagination with correct props", () => { const wrapper = mountWithNDSProvider( -
, +
); const pagination = wrapper.find(Pagination); expect(pagination.length).toEqual(1); @@ -186,7 +186,7 @@ describe("Table", () => { it("does not display pagination when rowsPerPage is falsy", () => { const wrapper = mountWithNDSProvider( -
, +
); const pagination = wrapper.find(Pagination); const rows = wrapper.find("tbody tr"); @@ -199,7 +199,7 @@ describe("Table", () => { describe("loading", () => { it("shows only loading text when loading", () => { const wrapper = mountWithNDSProvider( -
, +
); const rows = wrapper.find("tbody tr"); const loadingCell = wrapper.find("tbody tr td"); @@ -210,7 +210,7 @@ describe("Table", () => { it("shows rows when not loading", () => { const rowData = getMockRows(20); const wrapper = mountWithNDSProvider( -
, +
); const rows = wrapper.find("tbody tr"); const cell = wrapper.find("tbody tr td"); @@ -227,7 +227,7 @@ describe("Table", () => { const callback = jest.fn(); const { getAllByTestId } = renderWithNDSProvider( -
, +
); fireEvent.mouseEnter(getAllByTestId("table-row")[1]); @@ -245,7 +245,7 @@ describe("Table", () => { const callback = jest.fn(); const { getAllByTestId } = renderWithNDSProvider( -
, +
); fireEvent.mouseLeave(getAllByTestId("table-row")[1]);