浏览代码

test(patient->worklist): add data-testid attribute to each row of worklist table

sw 1 月之前
父节点
当前提交
54bae36865
共有 1 个文件被更改,包括 2 次插入1 次删除
  1. 2 1
      src/pages/patient/components/WorklistTable.tsx

+ 2 - 1
src/pages/patient/components/WorklistTable.tsx

@@ -430,9 +430,10 @@ const WorklistTable: React.FC<WorklistTableProps> = ({
       components={{ header: { cell: ResizableTitle } }}
       dataSource={worklistData}
       rowKey="StudyID"
-      onRow={(record) => ({
+      onRow={(record, index) => ({
         onClick: () => handleRowClick(record),
         onDoubleClick: () => handleRowDoubleClick(record),
+        'data-testid': `row-${index}`,
       })}
       rowHoverable={false}
       rowClassName={(record) =>