From 609e75c1089303348c1c8504d9da3135890c0e8e Mon Sep 17 00:00:00 2001 From: burnettk Date: Fri, 2 Jun 2023 10:52:17 -0400 Subject: [PATCH] add some ids to homepage tables for testability --- .../src/components/ProcessInstanceListTable.tsx | 10 +++++++++- .../src/routes/InProgressInstances.tsx | 8 +++++--- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/spiffworkflow-frontend/src/components/ProcessInstanceListTable.tsx b/spiffworkflow-frontend/src/components/ProcessInstanceListTable.tsx index e069f18a1..d2230bd96 100644 --- a/spiffworkflow-frontend/src/components/ProcessInstanceListTable.tsx +++ b/spiffworkflow-frontend/src/components/ProcessInstanceListTable.tsx @@ -98,6 +98,7 @@ type OwnProps = { showActionsColumn?: boolean; showLinkToReport?: boolean; headerElement?: React.ReactElement; + tableHtmlId?: string; }; interface dateParameters { @@ -119,6 +120,7 @@ export default function ProcessInstanceListTable({ showActionsColumn = false, showLinkToReport = false, headerElement, + tableHtmlId, }: OwnProps) { let processInstanceApiSearchPath = '/process-instances/for-me'; if (variant === 'all') { @@ -1648,8 +1650,14 @@ export default function ProcessInstanceListTable({ ); }); + let tableProps: any = { size: 'lg' }; + if (tableHtmlId) { + tableProps = { ...tableProps, id: tableHtmlId }; + } + return ( - + // eslint-disable-next-line react/jsx-props-no-spreading +
{headers.map((header: any) => ( diff --git a/spiffworkflow-frontend/src/routes/InProgressInstances.tsx b/spiffworkflow-frontend/src/routes/InProgressInstances.tsx index 0ad926ecf..0c9f0d0e0 100644 --- a/spiffworkflow-frontend/src/routes/InProgressInstances.tsx +++ b/spiffworkflow-frontend/src/routes/InProgressInstances.tsx @@ -25,14 +25,14 @@ export default function InProgressInstances() { Waiting for {userGroup} ); + const identifierForTable = `waiting-for-${slugifyString(userGroup)}`; return (