Conversation
|
| <TableNumericalInput | ||
| {...props} | ||
| name={`${arrayFormName}[${rowIndex}].${column.dataKey}`} | ||
| data-testid={`DndNumericalInput-${rowIndex}`} |
There was a problem hiding this comment.
Changes in this component are not harmless. They add datatest-id for many components using dnd-table. I'm not sure we want to do this
There was a problem hiding this comment.
Thats right that this component is used in multipales places in params tabs but the goal here is to provide a reliable selector for testing without relying on fragile structural selectors.
| <RawReadOnlyInput name={`${LIMIT_REDUCTIONS_FORM}[${rowIndex}].${column.dataKey}`} /> | ||
| ) : ( | ||
| <FloatInput name={`${LIMIT_REDUCTIONS_FORM}[${rowIndex}].${column.dataKey}`} /> | ||
| <FloatInput |
There was a problem hiding this comment.
datatest-id is one solution to select an input. We should not forget all the other selection functionnalities of playwright
Here, why not selecting the row you want, and then the cell you want ?
There was a problem hiding this comment.
i agree that playwright provides other ways to select elements, however, when we have the opportunity to add a stable selector in a table component, its a useful addition and gives us another reliable option for selecting elements
There was a problem hiding this comment.
the approach you suggested (selecting the row ==> parsing it to find the cell) is conceptually doing the same thing we do here. the testid is already a combination of the row index and the column key



PR Summary