I am using Material UI tabs in my application and using react testing library. I need to write test cases which should be in a way that I need to move from one tab to another tab. I am providing the code below. Can anybody help me with this? Thanks in advance.
Code:
const [value, setValue] = React.useState(0)
function handleChange(event, newValue)
{
setValue(newValue)
}
<AntTabs value={value} onChange={handleChange} aria-label="Unit information" >
<AntTab label=" HELLOW1" {...Unittabprops(0)} />
<AntTab label="HELLOW2" {...Unittabprops(1)} />
<AntTab label="HELLOW3" {...Unittabprops(2)}/>
<AntTab label="HELLOW4" {...Unittabprops(3)} />
<AntTab label="HELLOW5" {...Unittabprops(4)} />
</AntTabs>
question from:
https://stackoverflow.com/questions/65923471/how-to-write-test-cases-for-tabs-in-material-ui-using-react-testing-library 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…