chore: Add unit tests to cover the hovering bug

Signed-off-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
Sebastian Malton committed 2023-05-15 11:56:30 -04:00
1 parent 9d51ef2aa6
commit 15b942aa39
3 files changed
+629 -1

No files matched your search

@@ -72,7 +72,8 @@ const NonInjectedHotbarSelector = observer(({
<Icon
material="arrow_left"
className={cssNames(styles.Icon)}
onClick={onPrevClick}/>
onClick={onPrevClick}
/>
<div className={styles.HotbarIndex}>
<Badge
id="hotbarIndex"
@@ -82,11 +83,13 @@ const NonInjectedHotbarSelector = observer(({
className={styles.Badge}
onMouseEnter={onMouseEvent}
onMouseLeave={onMouseEvent}
data-testid={`hotbar-menu-badge-for-${hotbar?.name.get()}`}
/>
<Tooltip
visible={tooltipVisible}
targetId="hotbarIndex"
preferredPositions={[TooltipPosition.TOP, TooltipPosition.TOP_LEFT]}
data-testid={`hotbar-menu-badge-tooltip-for-${hotbar?.name.get()}`}
>
{hotbar?.name.get()}
</Tooltip>