From 323dba620d4a01e9ac14a42a275048e8890f8195 Mon Sep 17 00:00:00 2001
From: Michael Kaye <1917473+michaelkaye@users.noreply.github.com>
Date: Wed, 19 Apr 2023 13:47:05 +0100
Subject: [PATCH] Add a range of data-testid tags to be able to cleanly
identify parts of the application.
---
src/home/JoinExistingCallModal.tsx | 2 +-
src/home/UnauthenticatedView.tsx | 4 +++-
src/icons/VideoMuted.svg | 2 +-
src/room/LobbyView.tsx | 1 +
src/room/VideoPreview.tsx | 2 +-
src/video-grid/VideoTile.tsx | 5 +++--
6 files changed, 10 insertions(+), 6 deletions(-)
diff --git a/src/home/JoinExistingCallModal.tsx b/src/home/JoinExistingCallModal.tsx
index 0beae60..02d7cd2 100644
--- a/src/home/JoinExistingCallModal.tsx
+++ b/src/home/JoinExistingCallModal.tsx
@@ -43,7 +43,7 @@ export function JoinExistingCallModal({ onJoin, onClose, ...rest }: Props) {
{t("This call already exists, would you like to join?")}
-
+
diff --git a/src/home/UnauthenticatedView.tsx b/src/home/UnauthenticatedView.tsx
index c31637b..be20d70 100644
--- a/src/home/UnauthenticatedView.tsx
+++ b/src/home/UnauthenticatedView.tsx
@@ -142,6 +142,7 @@ export const UnauthenticatedView: FC = () => {
type="text"
required
autoComplete="off"
+ data-testid="home_callName"
/>
@@ -152,6 +153,7 @@ export const UnauthenticatedView: FC = () => {
placeholder={t("Display name")}
type="text"
required
+ data-testid="home_displayName"
autoComplete="off"
/>
@@ -171,7 +173,7 @@ export const UnauthenticatedView: FC = () => {
)}
-
diff --git a/src/room/VideoPreview.tsx b/src/room/VideoPreview.tsx
index 0e92cc5..6325bda 100644
--- a/src/room/VideoPreview.tsx
+++ b/src/room/VideoPreview.tsx
@@ -64,7 +64,7 @@ export function VideoPreview({
return (
-
+
{state === GroupCallState.LocalCallFeedUninitialized && (
{t("Camera/microphone permissions needed to join the call.")}
diff --git a/src/video-grid/VideoTile.tsx b/src/video-grid/VideoTile.tsx
index eea617f..804a036 100644
--- a/src/video-grid/VideoTile.tsx
+++ b/src/video-grid/VideoTile.tsx
@@ -154,6 +154,7 @@ export const VideoTile = forwardRef(
"--tileHeight": height?.to((h) => `${h}px`),
}}
ref={ref as ForwardedRef}
+ data-testid='videoTile'
{...rest}
>
{toolbarButtons.length > 0 && !maximised && (
@@ -180,10 +181,10 @@ export const VideoTile = forwardRef(
audioMuted && !videoMuted && !speaking &&
}
{videoMuted && }
- {caption}
+ {caption}
))}
-
+
);
}