So, I have a div that is scrollable when the div that wrapps it (with overlfow: auto) is smaller, so when the overflow exists. When the div is scrollable, an arrow button appears on each side in order to scroll.

I am using Jest and Enzyme and Jest to test amongst other things, wether the buttons appear or not when this condition is met, and I cannot get to test if one element is bigger than the other, as I would normaly do with getBoundingClientRect() on JavaScript (I am completely new to tests).

I am not providing code because it is simply to know if there is a way to get an element's coordinates for this.

Thanks in advance

0 Answers