if I do screen.debug() then I am not able to see the div element any idea why so? I am not able to understand what could be the possible reason of not showing it inside DOM? In below code PlaceHolder div is visible inside DOM after doing screen.debug() but the content inside it is not visible thats why getByText is not working
code:
const PlaceHolder = ({text}) => {
const {textTruncated} = gettextTruncation(text); //True or false value
return (
{
textTruncated ? (<Tooltip><div>{text}</div></Tooltip>) : ({text})
}
)
}
MyComponent:
const MyComponent = () => {
return(
<div>
<PlaceHolder
text={text}
/>
</div>
)
}
anyone any idea why this might be happening?
what is inside placeholder div?
yes when I do screen.debug() it shows just div no content inside it
I tried using waitFor(() => { }) but it did not work
Обсуждают сегодня