我在我的项目中有一个日期选择器,旁边有一个重置按钮,用户从日期选择器中选择日期后,日期选择器将显示所选的日期。See this image if you have dont get it yet 我想要的是通过单击reset按钮将date值重置回this。这是我的code 我使用useState钩子onClick按钮将值设置回null,使用useRef钩子,但都不起作用。有什么帮助吗?
在我的测试中,我尝试使用-> click_button('Check Inventory')或click_on('Check Inventory')点击"Check Inventory“按钮。button with value or id or text 'Check Inventory' found (Capybara::ElementNotFound)
我已经能够成功地测试具有名称或值标记的单击按钮