From e319dcfd3eb57d3a11ceddf40af4825979253460 Mon Sep 17 00:00:00 2001 From: Johan Haals Date: Mon, 4 Apr 2022 14:57:42 +0200 Subject: [PATCH] evert "chore: run setup once" This reverts commit d70ea6a0646549fed81e5566ae380cc13c3a51af. Signed-off-by: Johan Haals --- .../src/components/CatalogGraphPage/CatalogGraphPage.test.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/plugins/catalog-graph/src/components/CatalogGraphPage/CatalogGraphPage.test.tsx b/plugins/catalog-graph/src/components/CatalogGraphPage/CatalogGraphPage.test.tsx index bf25b79b39..700053bcd7 100644 --- a/plugins/catalog-graph/src/components/CatalogGraphPage/CatalogGraphPage.test.tsx +++ b/plugins/catalog-graph/src/components/CatalogGraphPage/CatalogGraphPage.test.tsx @@ -30,7 +30,6 @@ import React from 'react'; import { CatalogGraphPage } from './CatalogGraphPage'; const navigate = jest.fn(); -const user = userEvent.setup(); jest.mock('react-router', () => ({ ...jest.requireActual('react-router'), @@ -161,6 +160,7 @@ describe('', () => { expect(await findAllByTestId('node')).toHaveLength(2); await userEvent.click(getByText('b:d/e')); + expect(await findByText('hasPart')).toBeInTheDocument(); }); @@ -173,6 +173,7 @@ describe('', () => { expect(await findAllByTestId('node')).toHaveLength(2); + const user = userEvent.setup(); await user.keyboard('{Shift>}'); await user.click(getByText('b:d/e')); expect(navigate).toBeCalledWith('/entity/{kind}/{namespace}/{name}'); @@ -216,6 +217,7 @@ describe('', () => { expect(await findAllByTestId('node')).toHaveLength(2); + const user = userEvent.setup(); await user.keyboard('{Shift>}'); await user.click(getByText('b:d/e'));