Add a range of data-testid tags to be able to cleanly identify parts of the application.

This commit is contained in:
Michael Kaye 2023-04-19 13:47:05 +01:00
commit 323dba620d
6 changed files with 10 additions and 6 deletions

View file

@ -154,6 +154,7 @@ export const VideoTile = forwardRef<HTMLElement, Props>(
"--tileHeight": height?.to((h) => `${h}px`),
}}
ref={ref as ForwardedRef<HTMLDivElement>}
data-testid='videoTile'
{...rest}
>
{toolbarButtons.length > 0 && !maximised && (
@ -180,10 +181,10 @@ export const VideoTile = forwardRef<HTMLElement, Props>(
audioMuted && !videoMuted && !speaking && <MicMutedIcon />
}
{videoMuted && <VideoMutedIcon />}
<span title={caption}>{caption}</span>
<span data-testid="videoTile_caption" title={caption}>{caption}</span>
</div>
))}
<video ref={mediaRef} playsInline disablePictureInPicture />
<video data-testid="videoTile_video" ref={mediaRef} playsInline disablePictureInPicture />
</animated.div>
);
}