From e87b954793bb7ba15cef867d2aacf3779fd49e71 Mon Sep 17 00:00:00 2001 From: burnettk Date: Wed, 9 Nov 2022 17:48:50 -0500 Subject: [PATCH] lint --- .../src/components/ProcessBreadcrumb.test.tsx | 33 ------------------- .../src/components/ProcessGroupForm.tsx | 2 +- .../src/routes/ProcessGroupShow.tsx | 14 ++++++-- 3 files changed, 12 insertions(+), 37 deletions(-) diff --git a/spiffworkflow-frontend/src/components/ProcessBreadcrumb.test.tsx b/spiffworkflow-frontend/src/components/ProcessBreadcrumb.test.tsx index c581f30d..49400e8e 100644 --- a/spiffworkflow-frontend/src/components/ProcessBreadcrumb.test.tsx +++ b/spiffworkflow-frontend/src/components/ProcessBreadcrumb.test.tsx @@ -25,36 +25,3 @@ test('renders hotCrumbs', () => { const nextElement = screen.getByText(/Process Group: hey/); expect(nextElement).toBeInTheDocument(); }); - -// FIXME: update to use hotcrumbs -// test('renders process group when given processGroupId', async () => { -// render( -// -// -// -// ); -// const processGroupElement = screen.getByText(/group-a/); -// expect(processGroupElement).toBeInTheDocument(); -// const processGroupBreadcrumbs = await screen.findAllByText( -// /Process Group: group-a/ -// ); -// expect(processGroupBreadcrumbs[0]).toHaveClass('breadcrumb-item active'); -// }); -// -// test('renders process model when given processModelId', async () => { -// render( -// -// -// -// ); -// const processGroupElement = screen.getByText(/group-b/); -// expect(processGroupElement).toBeInTheDocument(); -// const processModelBreadcrumbs = await screen.findAllByText( -// /Process Model: model-c/ -// ); -// expect(processModelBreadcrumbs[0]).toHaveClass('breadcrumb-item active'); -// const processGroupBreadcrumbs = await screen.findAllByText( -// /Process Group: group-b/ -// ); -// expect(processGroupBreadcrumbs[0]).toBeInTheDocument(); -// }); diff --git a/spiffworkflow-frontend/src/components/ProcessGroupForm.tsx b/spiffworkflow-frontend/src/components/ProcessGroupForm.tsx index 09f2cecc..5006fc0a 100644 --- a/spiffworkflow-frontend/src/components/ProcessGroupForm.tsx +++ b/spiffworkflow-frontend/src/components/ProcessGroupForm.tsx @@ -2,7 +2,7 @@ import { useState } from 'react'; import { useNavigate } from 'react-router-dom'; // @ts-ignore import { Button, ButtonSet, Form, Stack, TextInput } from '@carbon/react'; -import {modifyProcessModelPath, slugifyString} from '../helpers'; +import { modifyProcessModelPath, slugifyString } from '../helpers'; import HttpService from '../services/HttpService'; import { ProcessGroup } from '../interfaces'; import ButtonWithConfirmation from './ButtonWithConfirmation'; diff --git a/spiffworkflow-frontend/src/routes/ProcessGroupShow.tsx b/spiffworkflow-frontend/src/routes/ProcessGroupShow.tsx index 60127dff..3dfcd0fb 100644 --- a/spiffworkflow-frontend/src/routes/ProcessGroupShow.tsx +++ b/spiffworkflow-frontend/src/routes/ProcessGroupShow.tsx @@ -5,7 +5,11 @@ import { Button, Table, Stack } from '@carbon/react'; import ProcessBreadcrumb from '../components/ProcessBreadcrumb'; import PaginationForTable from '../components/PaginationForTable'; import HttpService from '../services/HttpService'; -import {getPageInfoFromSearchParams, modifyProcessModelPath, unModifyProcessModelPath} from '../helpers'; +import { + getPageInfoFromSearchParams, + modifyProcessModelPath, + unModifyProcessModelPath, +} from '../helpers'; import { ProcessGroup } from '../interfaces'; export default function ProcessGroupShow() { @@ -82,7 +86,9 @@ export default function ProcessGroupShow() { return null; } const rows = processGroups.map((row) => { - const modifiedProcessGroupId: String = modifyProcessModelPath((row as any).id); + const modifiedProcessGroupId: String = modifyProcessModelPath( + (row as any).id + ); return ( @@ -115,7 +121,9 @@ export default function ProcessGroupShow() { if (processGroup && pagination) { const { page, perPage } = getPageInfoFromSearchParams(searchParams); - const modifiedProcessGroupId = modifyProcessModelPath((processGroup as any).id); + const modifiedProcessGroupId = modifyProcessModelPath( + (processGroup as any).id + ); return ( <>