Похожие чаты

I am using react testing library for testing components but

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>
)
}

4 ответов

6 просмотров
Adi- Автор вопроса

anyone any idea why this might be happening?

Adi- Автор вопроса
david
what is inside placeholder div?

yes when I do screen.debug() it shows just div no content inside it

Adi- Автор вопроса
david
what is inside placeholder div?

I tried using waitFor(() => { }) but it did not work

Похожие вопросы

Обсуждают сегодня

Happy Friday and happy CartesiWeekly! This week on the list: 🪲 Bug Buster Update 🎥 Erick de Moura’s interview with Ornella from Web3TV 👽 Thriving Cartesi alien 🇧🇷 SBRC hackat...
Nida | Cartesi - Never DM first or ask for funds!
1
Hi everyone! I have a two-folded message to share today. First: updates and news, as we are being asked for those. We still want to go like we did the last 6 years: we w...
Marten | Unibright.io
31
Скажите, можно ли как-то "переместить" динамический массив из одной переменной в другую? Скажем, переместить из TList<> в TArray<>. Именно переместить, а не скопировать. Если ...
Eugene Krasnikov (ᴊɪɴ x)
37
Oh.... Admins at the main TG is already muted me. How many months Sir you muted me? Or forever if you are here @Janevietani @JohnnySonic
Charles Dar
28
комрады, че-та лыжы не едут var tmpFont: TFont; begin tmpFont:= TFont.Create; try case rgFontColor.ItemIndex of 0: tmpFont.Color:= clWindowText; 1: tmpFo...
Ed Doc
34
Вот еще криповенькая штука. uMain.pas(517,3) Warning: Case statement does not handle all possible cases И ЧО? 😂
Александр (Rouse_) Багель
15
.model small .stack 100h .data a db 'Hello, World!', '$' ; исходная строка b db 20 dup(?) ; строка b с запасом на максимальную длину .code main: ...
Алексей -man
3
вопрос, кого посмотреть в ютубе или где почитать про указатели чтобы раз и навсегда запомнить зачем они нужны и как правильно ими пользоваться? поделитесь хорошими ресурсами, ...
-
14
М-да. Почему бы просто со stringlist не работать?
Michael Longneck
23
Интересно, нет ли какого-то способа получить из dll не адрес самой метки, а адрес со смещением?
The Bird of Hermes
54
Карта сайта