diff --git a/web/src/components/SpanDetail/__tests__/Http.test.tsx b/web/src/components/SpanDetail/__tests__/Http.test.tsx index c6e2c22475..417f2c712a 100644 --- a/web/src/components/SpanDetail/__tests__/Http.test.tsx +++ b/web/src/components/SpanDetail/__tests__/Http.test.tsx @@ -1,16 +1,21 @@ import {render} from '@testing-library/react'; -import Request from '../components/Http/Request'; +import Http from '../components/Http/Http'; +import {TestingModels} from '../../../utils/TestingModels'; -test('Request', () => { +test('Http', () => { const {getAllByTestId} = render( - ); - expect(getAllByTestId('assertion-check-property').length).toBe(3); + expect(getAllByTestId('assertion-check-property').length).toBe(1); }); diff --git a/web/src/components/TestCard/__tests__/TestCard.test.tsx b/web/src/components/TestCard/__tests__/TestCard.test.tsx index 9b97d0e8fd..cebc75f050 100644 --- a/web/src/components/TestCard/__tests__/TestCard.test.tsx +++ b/web/src/components/TestCard/__tests__/TestCard.test.tsx @@ -3,11 +3,6 @@ import {ReduxWrapperProvider} from '../../../redux/ReduxWrapperProvider'; import {TestingModels} from '../../../utils/TestingModels'; import TestCard from '../TestCard'; -const mouseEvent = new MouseEvent('click', { - bubbles: true, - cancelable: true, -}); - test('TestCard', async () => { const onDelete = jest.fn(); const onRunTest = jest.fn(); @@ -18,9 +13,7 @@ test('TestCard', async () => { ); - fireEvent(getByTestId('test-card'), mouseEvent); - fireEvent(getByTestId('test-run-button'), mouseEvent); - fireEvent(getByTestId(`test-actions-button-${TestingModels.test.testId}`), mouseEvent); + fireEvent(getByTestId(`test-actions-button-${TestingModels.test.testId}`), TestingModels.mouseEvent); await waitFor(() => getByTestId('delete')); expect(container).toMatchSnapshot(); }); diff --git a/web/src/components/TestCard/__tests__/__snapshots__/TestCard.test.tsx.snap b/web/src/components/TestCard/__tests__/__snapshots__/TestCard.test.tsx.snap index b4cff284f1..75357510c3 100644 --- a/web/src/components/TestCard/__tests__/__snapshots__/TestCard.test.tsx.snap +++ b/web/src/components/TestCard/__tests__/__snapshots__/TestCard.test.tsx.snap @@ -3,86 +3,21 @@ exports[`TestCard 1`] = `
- - - -
- - - -
-
- - GET - -
-
- - - -
-
- -
- - +
+ + + +
+
+ + GET + +
+
+ + + +
+
+
+ +
+ + + + + +
`; diff --git a/web/src/components/TestCard/__tests__/useOnDeleteCallback.test.tsx b/web/src/components/TestCard/__tests__/useOnDeleteCallback.test.ts similarity index 100% rename from web/src/components/TestCard/__tests__/useOnDeleteCallback.test.tsx rename to web/src/components/TestCard/__tests__/useOnDeleteCallback.test.ts diff --git a/web/src/components/TestResults/__tests__/TestResults.test.tsx b/web/src/components/TestResults/__tests__/TestResults.test.tsx index 7a9b546f3a..1c3ffb1c40 100644 --- a/web/src/components/TestResults/__tests__/TestResults.test.tsx +++ b/web/src/components/TestResults/__tests__/TestResults.test.tsx @@ -4,21 +4,17 @@ import {TestingModels} from '../../../utils/TestingModels'; import {ReduxWrapperProvider} from '../../../redux/ReduxWrapperProvider'; test('SpanAttributesTable', async () => { - const setMax = jest.fn(); const onSpanSelected = jest.fn(); const onPointerDown = jest.fn(); - const setHeight = jest.fn(); + const onHeaderClick = jest.fn(); const {getByText} = render( );