lint
This commit is contained in:
parent
c0f76b2880
commit
e87b954793
|
@ -25,36 +25,3 @@ test('renders hotCrumbs', () => {
|
||||||
const nextElement = screen.getByText(/Process Group: hey/);
|
const nextElement = screen.getByText(/Process Group: hey/);
|
||||||
expect(nextElement).toBeInTheDocument();
|
expect(nextElement).toBeInTheDocument();
|
||||||
});
|
});
|
||||||
|
|
||||||
// FIXME: update to use hotcrumbs
|
|
||||||
// test('renders process group when given processGroupId', async () => {
|
|
||||||
// render(
|
|
||||||
// <BrowserRouter>
|
|
||||||
// <ProcessBreadcrumb processGroupId="group-a" />
|
|
||||||
// </BrowserRouter>
|
|
||||||
// );
|
|
||||||
// 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(
|
|
||||||
// <BrowserRouter>
|
|
||||||
// <ProcessBreadcrumb processGroupId="group-b" processModelId="model-c" />
|
|
||||||
// </BrowserRouter>
|
|
||||||
// );
|
|
||||||
// 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();
|
|
||||||
// });
|
|
||||||
|
|
|
@ -2,7 +2,7 @@ import { useState } from 'react';
|
||||||
import { useNavigate } from 'react-router-dom';
|
import { useNavigate } from 'react-router-dom';
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
import { Button, ButtonSet, Form, Stack, TextInput } from '@carbon/react';
|
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 HttpService from '../services/HttpService';
|
||||||
import { ProcessGroup } from '../interfaces';
|
import { ProcessGroup } from '../interfaces';
|
||||||
import ButtonWithConfirmation from './ButtonWithConfirmation';
|
import ButtonWithConfirmation from './ButtonWithConfirmation';
|
||||||
|
|
|
@ -5,7 +5,11 @@ import { Button, Table, Stack } from '@carbon/react';
|
||||||
import ProcessBreadcrumb from '../components/ProcessBreadcrumb';
|
import ProcessBreadcrumb from '../components/ProcessBreadcrumb';
|
||||||
import PaginationForTable from '../components/PaginationForTable';
|
import PaginationForTable from '../components/PaginationForTable';
|
||||||
import HttpService from '../services/HttpService';
|
import HttpService from '../services/HttpService';
|
||||||
import {getPageInfoFromSearchParams, modifyProcessModelPath, unModifyProcessModelPath} from '../helpers';
|
import {
|
||||||
|
getPageInfoFromSearchParams,
|
||||||
|
modifyProcessModelPath,
|
||||||
|
unModifyProcessModelPath,
|
||||||
|
} from '../helpers';
|
||||||
import { ProcessGroup } from '../interfaces';
|
import { ProcessGroup } from '../interfaces';
|
||||||
|
|
||||||
export default function ProcessGroupShow() {
|
export default function ProcessGroupShow() {
|
||||||
|
@ -82,7 +86,9 @@ export default function ProcessGroupShow() {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
const rows = processGroups.map((row) => {
|
const rows = processGroups.map((row) => {
|
||||||
const modifiedProcessGroupId: String = modifyProcessModelPath((row as any).id);
|
const modifiedProcessGroupId: String = modifyProcessModelPath(
|
||||||
|
(row as any).id
|
||||||
|
);
|
||||||
return (
|
return (
|
||||||
<tr key={(row as any).id}>
|
<tr key={(row as any).id}>
|
||||||
<td>
|
<td>
|
||||||
|
@ -115,7 +121,9 @@ export default function ProcessGroupShow() {
|
||||||
|
|
||||||
if (processGroup && pagination) {
|
if (processGroup && pagination) {
|
||||||
const { page, perPage } = getPageInfoFromSearchParams(searchParams);
|
const { page, perPage } = getPageInfoFromSearchParams(searchParams);
|
||||||
const modifiedProcessGroupId = modifyProcessModelPath((processGroup as any).id);
|
const modifiedProcessGroupId = modifyProcessModelPath(
|
||||||
|
(processGroup as any).id
|
||||||
|
);
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<ProcessBreadcrumb
|
<ProcessBreadcrumb
|
||||||
|
|
Loading…
Reference in New Issue