skinny-azureS
Refine3y ago
8 replies
skinny-azure

How can I render `data-testid: 'something'` into Refine components?

So I basically want to render some testids into our generated components for some simple component tests. I can do the following:

<Antd.Table {...tableProps} rowKey="id" data-testid="list">
...
</Antd.Table>


So list-component is done, as well as the edit + create components because I can adjust Antd just fine! ✅ 🙌

But when I try to do the same inside my show-component (which comes from RefineAntd):

<RefineAntd.Show isLoading={isLoading} data-testid="show">
...
</RefineAntd.Show>


The testid is not being rendered at all.
Was this page helpful?