diff --git a/react/features/base/avatar/components/Avatar.js b/react/features/base/avatar/components/Avatar.js index 26cea4d49..bc4cca4a4 100644 --- a/react/features/base/avatar/components/Avatar.js +++ b/react/features/base/avatar/components/Avatar.js @@ -58,6 +58,11 @@ export type Props = { */ status?: ?string, + /** + * TestId of the element, if any. + */ + testId?: string, + /** * URL of the avatar, if any. */ @@ -122,6 +127,7 @@ class Avatar extends PureComponent { id, size, status, + testId, url } = this.props; const { avatarFailed } = this.state; @@ -134,6 +140,7 @@ class Avatar extends PureComponent { onAvatarLoadError: undefined, size, status, + testId, url: undefined }; diff --git a/react/features/base/avatar/components/web/StatelessAvatar.js b/react/features/base/avatar/components/web/StatelessAvatar.js index a2c8a0d31..394a7b42e 100644 --- a/react/features/base/avatar/components/web/StatelessAvatar.js +++ b/react/features/base/avatar/components/web/StatelessAvatar.js @@ -25,7 +25,12 @@ type Props = AbstractProps & { /** * One of the expected status strings (e.g. 'available') to render a badge on the avatar, if necessary. */ - status?: ?string + status?: ?string, + + /** + * TestId of the element, if any. + */ + testId?: string }; /** @@ -45,6 +50,7 @@ export default class StatelessAvatar extends AbstractStatelessAvatar { return (
{
{ return (
{
diff --git a/react/features/base/premeeting/components/web/ActionButton.js b/react/features/base/premeeting/components/web/ActionButton.js index 9ba2a8aee..b5256f80b 100644 --- a/react/features/base/premeeting/components/web/ActionButton.js +++ b/react/features/base/premeeting/components/web/ActionButton.js @@ -26,6 +26,11 @@ type Props = { */ hasOptions?: boolean, + /** + * TestId of the button. Can be used to locate element when testing UI. + */ + testId?: string, + /** * The type of th button: primary, secondary, text. */ @@ -52,6 +57,7 @@ function ActionButton({ className = '', disabled, hasOptions, + testId, type = 'primary', onClick, onOptionsClick @@ -59,6 +65,7 @@ function ActionButton({ return (
{children} {hasOptions &&
{ return ( {
- + { p.name } { p.email && ( - + { p.email } ) }
@@ -117,6 +118,7 @@ class LobbyScreen extends AbstractLobbyScreen { className = { _passwordJoinFailed ? 'error' : '' } onChange = { this._onChangePassword } placeHolder = { _passwordJoinFailed ? t('lobby.invalidPassword') : t('lobby.passwordField') } + testId = 'lobby.password' type = 'password' value = { this.state.password } />
@@ -136,11 +138,13 @@ class LobbyScreen extends AbstractLobbyScreen { { t('lobby.passwordJoinButton') } { t('lobby.backToKnockModeButton') } @@ -161,11 +165,13 @@ class LobbyScreen extends AbstractLobbyScreen { { _knocking || { t('lobby.knockButton') } } { t('lobby.enterPasswordButton') } diff --git a/react/features/notifications/components/web/Notification.js b/react/features/notifications/components/web/Notification.js index 70b8cb24c..7cb4c6153 100644 --- a/react/features/notifications/components/web/Notification.js +++ b/react/features/notifications/components/web/Notification.js @@ -62,6 +62,7 @@ class Notification extends AbstractNotification { id = { uid } isDismissAllowed = { isDismissAllowed } onDismissed = { onDismissed } + testId = { titleKey } title = { title || t(titleKey, titleArguments) } /> ); } @@ -84,7 +85,7 @@ class Notification extends AbstractNotification { // the id is used for testing the UI return ( -
+
{ description }
); diff --git a/react/features/prejoin/components/Prejoin.js b/react/features/prejoin/components/Prejoin.js index e65455f12..58fa83d79 100644 --- a/react/features/prejoin/components/Prejoin.js +++ b/react/features/prejoin/components/Prejoin.js @@ -313,6 +313,7 @@ class Prejoin extends Component { hasOptions = { true } onClick = { joinConference } onOptionsClick = { _onOptionsClick } + testId = 'prejoin.joinMeeting' type = 'primary'> { t('prejoin.joinMeeting') }