add some ids to completed instances tables for testability

This commit is contained in:
burnettk 2023-06-02 10:59:26 -04:00
parent 609e75c108
commit 8e2b94b866
1 changed files with 7 additions and 0 deletions

View File

@ -1,5 +1,6 @@
import { useEffect, useState } from 'react'; import { useEffect, useState } from 'react';
import ProcessInstanceListTable from '../components/ProcessInstanceListTable'; import ProcessInstanceListTable from '../components/ProcessInstanceListTable';
import { slugifyString } from '../helpers';
import HttpService from '../services/HttpService'; import HttpService from '../services/HttpService';
export default function CompletedInstances() { export default function CompletedInstances() {
@ -24,9 +25,13 @@ export default function CompletedInstances() {
Instances with tasks completed by <strong>{userGroup}</strong> Instances with tasks completed by <strong>{userGroup}</strong>
</h2> </h2>
); );
const identifierForTable = `completed-by-group-${slugifyString(
userGroup
)}`;
return ( return (
<ProcessInstanceListTable <ProcessInstanceListTable
headerElement={headerElement} headerElement={headerElement}
tableHtmlId={identifierForTable}
showLinkToReport showLinkToReport
filtersEnabled={false} filtersEnabled={false}
paginationQueryParamPrefix="group_completed_instances" paginationQueryParamPrefix="group_completed_instances"
@ -66,6 +71,7 @@ export default function CompletedInstances() {
<> <>
<ProcessInstanceListTable <ProcessInstanceListTable
headerElement={startedByMeHeaderElement} headerElement={startedByMeHeaderElement}
tableHtmlId="my-completed-instances"
showLinkToReport showLinkToReport
filtersEnabled={false} filtersEnabled={false}
paginationQueryParamPrefix="my_completed_instances" paginationQueryParamPrefix="my_completed_instances"
@ -79,6 +85,7 @@ export default function CompletedInstances() {
/> />
<ProcessInstanceListTable <ProcessInstanceListTable
headerElement={withTasksHeaderElement} headerElement={withTasksHeaderElement}
tableHtmlId="with-tasks-completed-by-me"
showLinkToReport showLinkToReport
filtersEnabled={false} filtersEnabled={false}
paginationQueryParamPrefix="my_completed_tasks" paginationQueryParamPrefix="my_completed_tasks"