From 4ce9c4f48d3dc33634b70d260f6d5b9f9428991a Mon Sep 17 00:00:00 2001 From: Ayobami Akingbade Date: Wed, 8 Nov 2023 14:16:38 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=A7=AA=20test(cleanup):=20remove=20unnece?= =?UTF-8?q?ssary=20setup=20code?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/__tests__/_app.spec.tsx | 1 - src/__tests__/account/logout.spec.tsx | 1 - src/__tests__/account/password.spec.tsx | 1 - src/__tests__/account/preferences.spec.tsx | 1 - src/__tests__/account/profile.spec.tsx | 1 - src/__tests__/admin/[entity]/[id]/index.spec.tsx | 1 - src/__tests__/admin/[entity]/[id]/update.spec.tsx | 1 - src/__tests__/admin/[entity]/config/crud__fields.spec.tsx | 1 - src/__tests__/admin/[entity]/config/crud__tab.spec.tsx | 1 - src/__tests__/admin/[entity]/config/crud__toggling.spec.tsx | 1 - src/__tests__/admin/[entity]/config/diction.spec.tsx | 1 - src/__tests__/admin/[entity]/config/form.spec.tsx | 1 - src/__tests__/admin/[entity]/config/presentation.spec.tsx | 1 - src/__tests__/admin/[entity]/config/relations__labels.spec.tsx | 1 - .../[entity]/config/relations__reference_template.spec.tsx | 1 - .../admin/[entity]/config/relations__selection.spec.tsx | 1 - src/__tests__/admin/[entity]/config/views.spec.tsx | 1 - src/__tests__/admin/[entity]/create.spec.tsx | 1 - src/__tests__/admin/[entity]/index.spec.tsx | 1 - src/__tests__/admin/index.spec.tsx | 1 - src/__tests__/admin/settings/date.spec.tsx | 1 - src/__tests__/admin/settings/entities.spec.tsx | 1 - src/__tests__/admin/settings/menu.spec.tsx | 1 - src/__tests__/admin/settings/site.spec.tsx | 1 - src/__tests__/admin/settings/system.spec.tsx | 1 - src/__tests__/admin/settings/theme.spec.tsx | 1 - src/__tests__/admin/settings/versions.spec.tsx | 1 - .../dashboard/[dashboardId]/widget/[widgetId]/index.spec.tsx | 1 - src/__tests__/dashboard/[dashboardId]/widget/create.spec.tsx | 1 - src/__tests__/dashboard/manage__actions.spec.tsx | 1 - src/__tests__/dashboard/manage__order.spec.tsx | 1 - src/__tests__/integrations/variables__constants.spec.tsx | 1 - .../integrations/variables__credentials--non-admin.spec.tsx | 1 - src/__tests__/integrations/variables__credentials.spec.tsx | 1 - src/__tests__/roles/[roleId]/index.spec.tsx | 1 - src/__tests__/roles/create.spec.tsx | 1 - src/__tests__/roles/index.spec.tsx | 1 - src/__tests__/users/[username]/index.spec.tsx | 1 - src/__tests__/users/[username]/index__non-admin.spec.tsx | 1 - src/__tests__/users/create.spec.tsx | 1 - src/__tests__/users/index.spec.tsx | 1 - .../_layouts/scripts/GoogleTagManager/GoogleTagManager.spec.tsx | 1 - .../design-system/components/RenderList/RenderList.spec.tsx | 2 -- .../design-system/components/SortList/SortList.spec.tsx | 2 -- src/frontend/design-system/components/Table/Table.spec.tsx | 2 -- src/frontend/design-system/components/Tabs/Tabs.spec.tsx | 1 - src/frontend/lib/data/QueryClient.tsx | 2 +- src/frontend/lib/routing/constants.ts | 2 +- 48 files changed, 2 insertions(+), 51 deletions(-) diff --git a/src/__tests__/_app.spec.tsx b/src/__tests__/_app.spec.tsx index 6b8117950..dda5406c9 100644 --- a/src/__tests__/_app.spec.tsx +++ b/src/__tests__/_app.spec.tsx @@ -1,4 +1,3 @@ -import "@testing-library/jest-dom"; import React from "react"; import { render, screen } from "@testing-library/react"; diff --git a/src/__tests__/account/logout.spec.tsx b/src/__tests__/account/logout.spec.tsx index c88ab6efa..7ee2b2f1e 100644 --- a/src/__tests__/account/logout.spec.tsx +++ b/src/__tests__/account/logout.spec.tsx @@ -1,4 +1,3 @@ -import "@testing-library/jest-dom"; import React from "react"; import { render, screen, waitFor } from "@testing-library/react"; import { ApplicationRoot } from "frontend/components/ApplicationRoot"; diff --git a/src/__tests__/account/password.spec.tsx b/src/__tests__/account/password.spec.tsx index 2758534ca..364663d0b 100644 --- a/src/__tests__/account/password.spec.tsx +++ b/src/__tests__/account/password.spec.tsx @@ -1,4 +1,3 @@ -import "@testing-library/jest-dom"; import React from "react"; import { render, screen } from "@testing-library/react"; import { ApplicationRoot } from "frontend/components/ApplicationRoot"; diff --git a/src/__tests__/account/preferences.spec.tsx b/src/__tests__/account/preferences.spec.tsx index 292100076..a63612ff5 100644 --- a/src/__tests__/account/preferences.spec.tsx +++ b/src/__tests__/account/preferences.spec.tsx @@ -1,4 +1,3 @@ -import "@testing-library/jest-dom"; import React from "react"; import { render, screen, waitFor } from "@testing-library/react"; import { ApplicationRoot } from "frontend/components/ApplicationRoot"; diff --git a/src/__tests__/account/profile.spec.tsx b/src/__tests__/account/profile.spec.tsx index 38b556cdc..658f137e8 100644 --- a/src/__tests__/account/profile.spec.tsx +++ b/src/__tests__/account/profile.spec.tsx @@ -1,4 +1,3 @@ -import "@testing-library/jest-dom"; import React from "react"; import { render, screen, waitFor } from "@testing-library/react"; import { ApplicationRoot } from "frontend/components/ApplicationRoot"; diff --git a/src/__tests__/admin/[entity]/[id]/index.spec.tsx b/src/__tests__/admin/[entity]/[id]/index.spec.tsx index 590a2333e..54ae83ad1 100644 --- a/src/__tests__/admin/[entity]/[id]/index.spec.tsx +++ b/src/__tests__/admin/[entity]/[id]/index.spec.tsx @@ -1,4 +1,3 @@ -import "@testing-library/jest-dom"; import React from "react"; import { render, screen } from "@testing-library/react"; import { ApplicationRoot } from "frontend/components/ApplicationRoot"; diff --git a/src/__tests__/admin/[entity]/[id]/update.spec.tsx b/src/__tests__/admin/[entity]/[id]/update.spec.tsx index c15b0549e..685e9f160 100644 --- a/src/__tests__/admin/[entity]/[id]/update.spec.tsx +++ b/src/__tests__/admin/[entity]/[id]/update.spec.tsx @@ -1,4 +1,3 @@ -import "@testing-library/jest-dom"; import React from "react"; import { render, screen, waitFor } from "@testing-library/react"; import { ApplicationRoot } from "frontend/components/ApplicationRoot"; diff --git a/src/__tests__/admin/[entity]/config/crud__fields.spec.tsx b/src/__tests__/admin/[entity]/config/crud__fields.spec.tsx index bd87f3304..13c300bc9 100644 --- a/src/__tests__/admin/[entity]/config/crud__fields.spec.tsx +++ b/src/__tests__/admin/[entity]/config/crud__fields.spec.tsx @@ -1,4 +1,3 @@ -import "@testing-library/jest-dom"; import React from "react"; import { render, screen, waitFor, within } from "@testing-library/react"; import { ApplicationRoot } from "frontend/components/ApplicationRoot"; diff --git a/src/__tests__/admin/[entity]/config/crud__tab.spec.tsx b/src/__tests__/admin/[entity]/config/crud__tab.spec.tsx index 95925274e..a68454de0 100644 --- a/src/__tests__/admin/[entity]/config/crud__tab.spec.tsx +++ b/src/__tests__/admin/[entity]/config/crud__tab.spec.tsx @@ -1,4 +1,3 @@ -import "@testing-library/jest-dom"; import React from "react"; import { render, screen } from "@testing-library/react"; import { ApplicationRoot } from "frontend/components/ApplicationRoot"; diff --git a/src/__tests__/admin/[entity]/config/crud__toggling.spec.tsx b/src/__tests__/admin/[entity]/config/crud__toggling.spec.tsx index 9fc049c61..83419648c 100644 --- a/src/__tests__/admin/[entity]/config/crud__toggling.spec.tsx +++ b/src/__tests__/admin/[entity]/config/crud__toggling.spec.tsx @@ -1,4 +1,3 @@ -import "@testing-library/jest-dom"; import React from "react"; import { render, screen, within } from "@testing-library/react"; import { ApplicationRoot } from "frontend/components/ApplicationRoot"; diff --git a/src/__tests__/admin/[entity]/config/diction.spec.tsx b/src/__tests__/admin/[entity]/config/diction.spec.tsx index c6ec678f6..bc200c0b7 100644 --- a/src/__tests__/admin/[entity]/config/diction.spec.tsx +++ b/src/__tests__/admin/[entity]/config/diction.spec.tsx @@ -1,4 +1,3 @@ -import "@testing-library/jest-dom"; import React from "react"; import { render, screen, waitFor } from "@testing-library/react"; import { ApplicationRoot } from "frontend/components/ApplicationRoot"; diff --git a/src/__tests__/admin/[entity]/config/form.spec.tsx b/src/__tests__/admin/[entity]/config/form.spec.tsx index 6f7a3fd11..4a3f157bc 100644 --- a/src/__tests__/admin/[entity]/config/form.spec.tsx +++ b/src/__tests__/admin/[entity]/config/form.spec.tsx @@ -1,5 +1,4 @@ /* eslint-disable no-useless-escape */ -import "@testing-library/jest-dom"; import React from "react"; import { render, screen, within } from "@testing-library/react"; import { ApplicationRoot } from "frontend/components/ApplicationRoot"; diff --git a/src/__tests__/admin/[entity]/config/presentation.spec.tsx b/src/__tests__/admin/[entity]/config/presentation.spec.tsx index bd74e812d..59856f40b 100644 --- a/src/__tests__/admin/[entity]/config/presentation.spec.tsx +++ b/src/__tests__/admin/[entity]/config/presentation.spec.tsx @@ -1,5 +1,4 @@ /* eslint-disable no-useless-escape */ -import "@testing-library/jest-dom"; import React from "react"; import { render, screen, waitFor } from "@testing-library/react"; import { ApplicationRoot } from "frontend/components/ApplicationRoot"; diff --git a/src/__tests__/admin/[entity]/config/relations__labels.spec.tsx b/src/__tests__/admin/[entity]/config/relations__labels.spec.tsx index cf2c426e5..c9a55fbcc 100644 --- a/src/__tests__/admin/[entity]/config/relations__labels.spec.tsx +++ b/src/__tests__/admin/[entity]/config/relations__labels.spec.tsx @@ -1,4 +1,3 @@ -import "@testing-library/jest-dom"; import React from "react"; import { render, screen, waitFor, within } from "@testing-library/react"; import { ApplicationRoot } from "frontend/components/ApplicationRoot"; diff --git a/src/__tests__/admin/[entity]/config/relations__reference_template.spec.tsx b/src/__tests__/admin/[entity]/config/relations__reference_template.spec.tsx index b78b198b8..659e1b48d 100644 --- a/src/__tests__/admin/[entity]/config/relations__reference_template.spec.tsx +++ b/src/__tests__/admin/[entity]/config/relations__reference_template.spec.tsx @@ -1,4 +1,3 @@ -import "@testing-library/jest-dom"; import React from "react"; import { render, screen, waitFor, within } from "@testing-library/react"; import { ApplicationRoot } from "frontend/components/ApplicationRoot"; diff --git a/src/__tests__/admin/[entity]/config/relations__selection.spec.tsx b/src/__tests__/admin/[entity]/config/relations__selection.spec.tsx index 75f3ec748..df9cc6501 100644 --- a/src/__tests__/admin/[entity]/config/relations__selection.spec.tsx +++ b/src/__tests__/admin/[entity]/config/relations__selection.spec.tsx @@ -1,4 +1,3 @@ -import "@testing-library/jest-dom"; import React from "react"; import { render, screen, waitFor, within } from "@testing-library/react"; import { ApplicationRoot } from "frontend/components/ApplicationRoot"; diff --git a/src/__tests__/admin/[entity]/config/views.spec.tsx b/src/__tests__/admin/[entity]/config/views.spec.tsx index 2295dda42..f916861c8 100644 --- a/src/__tests__/admin/[entity]/config/views.spec.tsx +++ b/src/__tests__/admin/[entity]/config/views.spec.tsx @@ -1,4 +1,3 @@ -import "@testing-library/jest-dom"; import React from "react"; import { render, screen, within } from "@testing-library/react"; import { ApplicationRoot } from "frontend/components/ApplicationRoot"; diff --git a/src/__tests__/admin/[entity]/create.spec.tsx b/src/__tests__/admin/[entity]/create.spec.tsx index b6a1bf241..8491e3cc9 100644 --- a/src/__tests__/admin/[entity]/create.spec.tsx +++ b/src/__tests__/admin/[entity]/create.spec.tsx @@ -1,4 +1,3 @@ -import "@testing-library/jest-dom"; import React from "react"; import { render, screen, waitFor } from "@testing-library/react"; import { ApplicationRoot } from "frontend/components/ApplicationRoot"; diff --git a/src/__tests__/admin/[entity]/index.spec.tsx b/src/__tests__/admin/[entity]/index.spec.tsx index 417e1c71a..373316cfc 100644 --- a/src/__tests__/admin/[entity]/index.spec.tsx +++ b/src/__tests__/admin/[entity]/index.spec.tsx @@ -1,4 +1,3 @@ -import "@testing-library/jest-dom"; import React from "react"; import { render, screen } from "@testing-library/react"; import { ApplicationRoot } from "frontend/components/ApplicationRoot"; diff --git a/src/__tests__/admin/index.spec.tsx b/src/__tests__/admin/index.spec.tsx index 8f2340f48..1e8fcaf71 100644 --- a/src/__tests__/admin/index.spec.tsx +++ b/src/__tests__/admin/index.spec.tsx @@ -1,4 +1,3 @@ -import "@testing-library/jest-dom"; import React from "react"; import { render, screen, within } from "@testing-library/react"; import { ApplicationRoot } from "frontend/components/ApplicationRoot"; diff --git a/src/__tests__/admin/settings/date.spec.tsx b/src/__tests__/admin/settings/date.spec.tsx index 15a3b1283..5f72bdc99 100644 --- a/src/__tests__/admin/settings/date.spec.tsx +++ b/src/__tests__/admin/settings/date.spec.tsx @@ -1,4 +1,3 @@ -import "@testing-library/jest-dom"; import React from "react"; import { render, screen, waitFor } from "@testing-library/react"; import { ApplicationRoot } from "frontend/components/ApplicationRoot"; diff --git a/src/__tests__/admin/settings/entities.spec.tsx b/src/__tests__/admin/settings/entities.spec.tsx index a39da2779..16194afeb 100644 --- a/src/__tests__/admin/settings/entities.spec.tsx +++ b/src/__tests__/admin/settings/entities.spec.tsx @@ -1,4 +1,3 @@ -import "@testing-library/jest-dom"; import React from "react"; import { render, screen, waitFor } from "@testing-library/react"; import { ApplicationRoot } from "frontend/components/ApplicationRoot"; diff --git a/src/__tests__/admin/settings/menu.spec.tsx b/src/__tests__/admin/settings/menu.spec.tsx index f650da8e1..43b1638c5 100644 --- a/src/__tests__/admin/settings/menu.spec.tsx +++ b/src/__tests__/admin/settings/menu.spec.tsx @@ -1,4 +1,3 @@ -import "@testing-library/jest-dom"; import React from "react"; import { render, screen, waitFor } from "@testing-library/react"; import { ApplicationRoot } from "frontend/components/ApplicationRoot"; diff --git a/src/__tests__/admin/settings/site.spec.tsx b/src/__tests__/admin/settings/site.spec.tsx index 311ef78fa..68eb1a882 100644 --- a/src/__tests__/admin/settings/site.spec.tsx +++ b/src/__tests__/admin/settings/site.spec.tsx @@ -1,4 +1,3 @@ -import "@testing-library/jest-dom"; import React from "react"; import { render, screen, waitFor } from "@testing-library/react"; import { ApplicationRoot } from "frontend/components/ApplicationRoot"; diff --git a/src/__tests__/admin/settings/system.spec.tsx b/src/__tests__/admin/settings/system.spec.tsx index 234c3443b..d33930e4f 100644 --- a/src/__tests__/admin/settings/system.spec.tsx +++ b/src/__tests__/admin/settings/system.spec.tsx @@ -1,4 +1,3 @@ -import "@testing-library/jest-dom"; import React from "react"; import { render, screen, waitFor } from "@testing-library/react"; import { ApplicationRoot } from "frontend/components/ApplicationRoot"; diff --git a/src/__tests__/admin/settings/theme.spec.tsx b/src/__tests__/admin/settings/theme.spec.tsx index 5d7d4190a..f9df9c600 100644 --- a/src/__tests__/admin/settings/theme.spec.tsx +++ b/src/__tests__/admin/settings/theme.spec.tsx @@ -1,4 +1,3 @@ -import "@testing-library/jest-dom"; import React from "react"; import { fireEvent, render, screen, waitFor } from "@testing-library/react"; import { ApplicationRoot } from "frontend/components/ApplicationRoot"; diff --git a/src/__tests__/admin/settings/versions.spec.tsx b/src/__tests__/admin/settings/versions.spec.tsx index af12dbbce..528c94837 100644 --- a/src/__tests__/admin/settings/versions.spec.tsx +++ b/src/__tests__/admin/settings/versions.spec.tsx @@ -1,4 +1,3 @@ -import "@testing-library/jest-dom"; import React from "react"; import { render, screen, waitFor } from "@testing-library/react"; import { ApplicationRoot } from "frontend/components/ApplicationRoot"; diff --git a/src/__tests__/dashboard/[dashboardId]/widget/[widgetId]/index.spec.tsx b/src/__tests__/dashboard/[dashboardId]/widget/[widgetId]/index.spec.tsx index 6862bbc63..fde0fe8af 100644 --- a/src/__tests__/dashboard/[dashboardId]/widget/[widgetId]/index.spec.tsx +++ b/src/__tests__/dashboard/[dashboardId]/widget/[widgetId]/index.spec.tsx @@ -1,4 +1,3 @@ -import "@testing-library/jest-dom"; import React from "react"; import { render, screen } from "@testing-library/react"; import { ApplicationRoot } from "frontend/components/ApplicationRoot"; diff --git a/src/__tests__/dashboard/[dashboardId]/widget/create.spec.tsx b/src/__tests__/dashboard/[dashboardId]/widget/create.spec.tsx index f2dd47d56..1405537e5 100644 --- a/src/__tests__/dashboard/[dashboardId]/widget/create.spec.tsx +++ b/src/__tests__/dashboard/[dashboardId]/widget/create.spec.tsx @@ -1,4 +1,3 @@ -import "@testing-library/jest-dom"; import React from "react"; import { render, screen } from "@testing-library/react"; import { ApplicationRoot } from "frontend/components/ApplicationRoot"; diff --git a/src/__tests__/dashboard/manage__actions.spec.tsx b/src/__tests__/dashboard/manage__actions.spec.tsx index 474d60847..14366b012 100644 --- a/src/__tests__/dashboard/manage__actions.spec.tsx +++ b/src/__tests__/dashboard/manage__actions.spec.tsx @@ -1,4 +1,3 @@ -import "@testing-library/jest-dom"; import React from "react"; import { render, screen, within } from "@testing-library/react"; import { ApplicationRoot } from "frontend/components/ApplicationRoot"; diff --git a/src/__tests__/dashboard/manage__order.spec.tsx b/src/__tests__/dashboard/manage__order.spec.tsx index 00a8d3246..25b429a80 100644 --- a/src/__tests__/dashboard/manage__order.spec.tsx +++ b/src/__tests__/dashboard/manage__order.spec.tsx @@ -1,5 +1,4 @@ /* eslint-disable testing-library/no-node-access */ -import "@testing-library/jest-dom"; import React, { ReactNode } from "react"; import { render, screen } from "@testing-library/react"; import { ApplicationRoot } from "frontend/components/ApplicationRoot"; diff --git a/src/__tests__/integrations/variables__constants.spec.tsx b/src/__tests__/integrations/variables__constants.spec.tsx index 268463919..1e648a5c5 100644 --- a/src/__tests__/integrations/variables__constants.spec.tsx +++ b/src/__tests__/integrations/variables__constants.spec.tsx @@ -1,4 +1,3 @@ -import "@testing-library/jest-dom"; import React from "react"; import { render, screen, within } from "@testing-library/react"; import { ApplicationRoot } from "frontend/components/ApplicationRoot"; diff --git a/src/__tests__/integrations/variables__credentials--non-admin.spec.tsx b/src/__tests__/integrations/variables__credentials--non-admin.spec.tsx index c8de76b13..5350db4df 100644 --- a/src/__tests__/integrations/variables__credentials--non-admin.spec.tsx +++ b/src/__tests__/integrations/variables__credentials--non-admin.spec.tsx @@ -1,5 +1,4 @@ /* eslint-disable prettier/prettier */ -import "@testing-library/jest-dom"; import React, { ReactNode } from "react"; import { render, screen, within } from "@testing-library/react"; import { ApplicationRoot } from "frontend/components/ApplicationRoot"; diff --git a/src/__tests__/integrations/variables__credentials.spec.tsx b/src/__tests__/integrations/variables__credentials.spec.tsx index 9c8fa7513..56da7a443 100644 --- a/src/__tests__/integrations/variables__credentials.spec.tsx +++ b/src/__tests__/integrations/variables__credentials.spec.tsx @@ -1,5 +1,4 @@ /* eslint-disable prettier/prettier */ -import "@testing-library/jest-dom"; import React, { ReactNode } from "react"; import { render, screen, within } from "@testing-library/react"; import { ApplicationRoot } from "frontend/components/ApplicationRoot"; diff --git a/src/__tests__/roles/[roleId]/index.spec.tsx b/src/__tests__/roles/[roleId]/index.spec.tsx index 1e91ffe6f..c5ea3bfe4 100644 --- a/src/__tests__/roles/[roleId]/index.spec.tsx +++ b/src/__tests__/roles/[roleId]/index.spec.tsx @@ -1,4 +1,3 @@ -import "@testing-library/jest-dom"; import React from "react"; import { render, screen, waitFor, within } from "@testing-library/react"; import { ApplicationRoot } from "frontend/components/ApplicationRoot"; diff --git a/src/__tests__/roles/create.spec.tsx b/src/__tests__/roles/create.spec.tsx index 1489470e7..d84717033 100644 --- a/src/__tests__/roles/create.spec.tsx +++ b/src/__tests__/roles/create.spec.tsx @@ -1,4 +1,3 @@ -import "@testing-library/jest-dom"; import React from "react"; import { render, screen } from "@testing-library/react"; import { ApplicationRoot } from "frontend/components/ApplicationRoot"; diff --git a/src/__tests__/roles/index.spec.tsx b/src/__tests__/roles/index.spec.tsx index a5e6b76fe..a0548f58a 100644 --- a/src/__tests__/roles/index.spec.tsx +++ b/src/__tests__/roles/index.spec.tsx @@ -1,4 +1,3 @@ -import "@testing-library/jest-dom"; import React from "react"; import { render, screen, within, waitFor } from "@testing-library/react"; import { ApplicationRoot } from "frontend/components/ApplicationRoot"; diff --git a/src/__tests__/users/[username]/index.spec.tsx b/src/__tests__/users/[username]/index.spec.tsx index 5b9f818b7..adbbd41ca 100644 --- a/src/__tests__/users/[username]/index.spec.tsx +++ b/src/__tests__/users/[username]/index.spec.tsx @@ -1,6 +1,5 @@ /* eslint-disable testing-library/no-node-access */ /* eslint-disable testing-library/no-container */ -import "@testing-library/jest-dom"; import React from "react"; import { render, screen, waitFor } from "@testing-library/react"; import { ApplicationRoot } from "frontend/components/ApplicationRoot"; diff --git a/src/__tests__/users/[username]/index__non-admin.spec.tsx b/src/__tests__/users/[username]/index__non-admin.spec.tsx index 1f90e6808..6074c8004 100644 --- a/src/__tests__/users/[username]/index__non-admin.spec.tsx +++ b/src/__tests__/users/[username]/index__non-admin.spec.tsx @@ -1,4 +1,3 @@ -import "@testing-library/jest-dom"; import React from "react"; import { render, screen, waitFor } from "@testing-library/react"; import { ApplicationRoot } from "frontend/components/ApplicationRoot"; diff --git a/src/__tests__/users/create.spec.tsx b/src/__tests__/users/create.spec.tsx index 10fc28937..0a8b8edac 100644 --- a/src/__tests__/users/create.spec.tsx +++ b/src/__tests__/users/create.spec.tsx @@ -1,4 +1,3 @@ -import "@testing-library/jest-dom"; import React from "react"; import { render, screen } from "@testing-library/react"; import { ApplicationRoot } from "frontend/components/ApplicationRoot"; diff --git a/src/__tests__/users/index.spec.tsx b/src/__tests__/users/index.spec.tsx index 9d174fb20..a9679dba3 100644 --- a/src/__tests__/users/index.spec.tsx +++ b/src/__tests__/users/index.spec.tsx @@ -1,4 +1,3 @@ -import "@testing-library/jest-dom"; import React from "react"; import { render, screen, within, waitFor } from "@testing-library/react"; import { ApplicationRoot } from "frontend/components/ApplicationRoot"; diff --git a/src/frontend/_layouts/scripts/GoogleTagManager/GoogleTagManager.spec.tsx b/src/frontend/_layouts/scripts/GoogleTagManager/GoogleTagManager.spec.tsx index 2fb994ec3..448f83fd6 100644 --- a/src/frontend/_layouts/scripts/GoogleTagManager/GoogleTagManager.spec.tsx +++ b/src/frontend/_layouts/scripts/GoogleTagManager/GoogleTagManager.spec.tsx @@ -1,6 +1,5 @@ /* eslint-disable testing-library/no-container */ /* eslint-disable testing-library/no-node-access */ -import "@testing-library/jest-dom"; import React from "react"; import { render } from "@testing-library/react"; diff --git a/src/frontend/design-system/components/RenderList/RenderList.spec.tsx b/src/frontend/design-system/components/RenderList/RenderList.spec.tsx index e29ed185e..eaed8f565 100644 --- a/src/frontend/design-system/components/RenderList/RenderList.spec.tsx +++ b/src/frontend/design-system/components/RenderList/RenderList.spec.tsx @@ -2,8 +2,6 @@ import React from "react"; import { fireEvent, render, screen } from "@testing-library/react"; import { RenderList } from "."; -import "@testing-library/jest-dom/extend-expect"; - describe("RenderList", () => { it("should render list items", () => { render( diff --git a/src/frontend/design-system/components/SortList/SortList.spec.tsx b/src/frontend/design-system/components/SortList/SortList.spec.tsx index f43aa560b..1947575d5 100644 --- a/src/frontend/design-system/components/SortList/SortList.spec.tsx +++ b/src/frontend/design-system/components/SortList/SortList.spec.tsx @@ -3,8 +3,6 @@ import React, { ReactNode } from "react"; import { fireEvent, render, screen, waitFor } from "@testing-library/react"; import { SortList } from "."; -import "@testing-library/jest-dom/extend-expect"; - jest.mock("react-easy-sort", () => ({ __esModule: true, default: ({ diff --git a/src/frontend/design-system/components/Table/Table.spec.tsx b/src/frontend/design-system/components/Table/Table.spec.tsx index fb7e1d4e9..b42948872 100644 --- a/src/frontend/design-system/components/Table/Table.spec.tsx +++ b/src/frontend/design-system/components/Table/Table.spec.tsx @@ -4,8 +4,6 @@ import { Table } from "."; import { IProps } from "./types"; import { TABLE_COLUMNS, TABLE_DATA } from "./data"; -import "@testing-library/jest-dom/extend-expect"; - const DEFAULT_TABLE_PROPS: IProps = { overridePaginatedDataState: { pageSize: 10, diff --git a/src/frontend/design-system/components/Tabs/Tabs.spec.tsx b/src/frontend/design-system/components/Tabs/Tabs.spec.tsx index 1a189b12c..98722d27d 100644 --- a/src/frontend/design-system/components/Tabs/Tabs.spec.tsx +++ b/src/frontend/design-system/components/Tabs/Tabs.spec.tsx @@ -2,7 +2,6 @@ import React from "react"; import { render, fireEvent, screen } from "@testing-library/react"; import { SLUG_LOADING_VALUE } from "frontend/lib/routing/constants"; import { Tabs } from "."; -import "@testing-library/jest-dom/extend-expect"; describe("Tabs", () => { it("should render first tab by default", () => { diff --git a/src/frontend/lib/data/QueryClient.tsx b/src/frontend/lib/data/QueryClient.tsx index ee720f843..823bc0bd7 100644 --- a/src/frontend/lib/data/QueryClient.tsx +++ b/src/frontend/lib/data/QueryClient.tsx @@ -1,7 +1,7 @@ import React, { ReactNode } from "react"; import { QueryClientProvider, QueryClient } from "react-query"; -export const queryClient = new QueryClient({ +const queryClient = new QueryClient({ defaultOptions: { queries: { staleTime: Infinity, diff --git a/src/frontend/lib/routing/constants.ts b/src/frontend/lib/routing/constants.ts index 749305687..569af5791 100644 --- a/src/frontend/lib/routing/constants.ts +++ b/src/frontend/lib/routing/constants.ts @@ -1 +1 @@ -export const SLUG_LOADING_VALUE = "loading"; +export const SLUG_LOADING_VALUE = "__loading__";