From 4c24ccf3d61a2f1c72e32815f24b479a0837ec45 Mon Sep 17 00:00:00 2001 From: Oscar Reyes Date: Mon, 11 Sep 2023 11:49:40 -0600 Subject: [PATCH] fixing types and tests --- .../components/TestSpecForm/__tests__/TestSpecForm.test.tsx | 2 +- .../providers/TestSpecs/__tests__/TestSpecs.provider.test.tsx | 2 +- web/src/redux/actions/__tests_/TestSpecs.actions.test.ts | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/web/src/components/TestSpecForm/__tests__/TestSpecForm.test.tsx b/web/src/components/TestSpecForm/__tests__/TestSpecForm.test.tsx index 11ab3bbfab..d3806b5814 100644 --- a/web/src/components/TestSpecForm/__tests__/TestSpecForm.test.tsx +++ b/web/src/components/TestSpecForm/__tests__/TestSpecForm.test.tsx @@ -8,7 +8,7 @@ const defaultProps = { onClearSelectorSuggestions: jest.fn(), onClickPrevSelector: jest.fn(), testId: 'testId', - runId: 'runId', + runId: 1, isValid: false, onIsValid: jest.fn(), }; diff --git a/web/src/providers/TestSpecs/__tests__/TestSpecs.provider.test.tsx b/web/src/providers/TestSpecs/__tests__/TestSpecs.provider.test.tsx index 164424ac67..f5f866ded6 100644 --- a/web/src/providers/TestSpecs/__tests__/TestSpecs.provider.test.tsx +++ b/web/src/providers/TestSpecs/__tests__/TestSpecs.provider.test.tsx @@ -4,7 +4,7 @@ import TestSpecs from '../TestSpecs.provider'; describe('TestDefinitionProvider', () => { it('should render with the proper values', () => { const {getByText} = render( - +

Hello

diff --git a/web/src/redux/actions/__tests_/TestSpecs.actions.test.ts b/web/src/redux/actions/__tests_/TestSpecs.actions.test.ts index b9abaa5d99..d010e28668 100644 --- a/web/src/redux/actions/__tests_/TestSpecs.actions.test.ts +++ b/web/src/redux/actions/__tests_/TestSpecs.actions.test.ts @@ -37,7 +37,7 @@ describe('TestDefinitionActions', () => { expect(setRequest.url).toEqual('http://localhost/api/tests/testId'); expect(setRequest.method).toEqual(HTTP_METHOD.PUT); - expect(reRunRequest.url).toEqual('http://localhost/api/tests/testId/run/runId/rerun'); + expect(reRunRequest.url).toEqual('http://localhost/api/tests/testId/run/1/rerun'); expect(reRunRequest.method).toEqual(HTTP_METHOD.POST); expect(fetchMock.mock.calls.length).toBe(2); @@ -59,7 +59,7 @@ describe('TestDefinitionActions', () => { const dryRunRequest = fetchMock.mock.calls[0][0] as Request; - expect(dryRunRequest.url).toEqual('http://localhost/api/tests/testId/run/runId/dry-run'); + expect(dryRunRequest.url).toEqual('http://localhost/api/tests/testId/run/1/dry-run'); expect(dryRunRequest.method).toEqual(HTTP_METHOD.PUT); expect(fetchMock.mock.calls.length).toBe(1);