编写测试用例时,无法获取Mui-datagrid Usi jest框架
我的react应用程序中有一个mui-datagrid。在datagrid中,一些带有标头的数据('csa name','start date')。我想在jest.used'getallbyrole('cell',{description: /csa name /i})中编写测试用例时,选择“ CSA名称”列中的所有项目',
但它不起作用。
I have a mui-datagrid in my react application.In the datagrid, some data with the headers ('CSA NAME', 'START DATE'). I would like to select all items in column 'CSA NAME' while writing test case in jest.used 'getAllByRole('cell', { description: /CSA NAME/i })'
but it's not working.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果要单击“选择所有项目”的复选框,则可以尝试使用类似的内容:
如果页面上只有表复选框,则应使用此类内容。
If you want to click to checkbox for select all items you could try to use something like this:
It should work in case if you have only table checkboxes on the page.