Explorar el Código

fix: Adds testId for context menu items and ids to some components.

Needed to revive the lobby tests.
master
Дамян Минков hace 3 años
padre
commit
930852cd88

+ 7
- 0
react/features/base/components/context-menu/ContextMenuItem.js Ver fichero

@@ -56,6 +56,11 @@ export type Props = {
56 56
      */
57 57
     onKeyPress?: Function,
58 58
 
59
+    /**
60
+     * TestId of the element, if any.
61
+     */
62
+    testId?: string,
63
+
59 64
     /**
60 65
      * Action text.
61 66
      */
@@ -112,6 +117,7 @@ const ContextMenuItem = ({
112 117
     onClick,
113 118
     onKeyDown,
114 119
     onKeyPress,
120
+    testId,
115 121
     text,
116 122
     textClassName }: Props) => {
117 123
     const styles = useStyles();
@@ -126,6 +132,7 @@ const ContextMenuItem = ({
126 132
                     disabled && styles.contextMenuItemDisabled,
127 133
                     className
128 134
             ) }
135
+            data-testid = { testId }
129 136
             id = { id }
130 137
             key = { text }
131 138
             onClick = { disabled ? undefined : onClick }

+ 1
- 1
react/features/notifications/components/web/Notification.js Ver fichero

@@ -60,7 +60,7 @@ class Notification extends AbstractNotification<Props> {
60 60
                 description = { this._renderDescription() }
61 61
                 icon = { this._mapAppearanceToIcon() }
62 62
                 id = { uid }
63
-                testId = { titleKey }
63
+                testId = { titleKey || this._getDescriptionKey() }
64 64
                 title = { title || t(titleKey, titleArguments) } />
65 65
         );
66 66
     }

+ 1
- 1
react/features/participants-pane/components/web/LobbyParticipantItems.js Ver fichero

@@ -31,7 +31,7 @@ type Props = {
31 31
 function LobbyParticipantItems({ openDrawerForParticipant, overflowDrawer, participants }: Props) {
32 32
 
33 33
     return (
34
-        <div>
34
+        <div id = 'lobby-list'>
35 35
             {participants.map(p => (
36 36
                 <LobbyParticipantItem
37 37
                     key = { p.id }

Loading…
Cancelar
Guardar