chore: add datatestid to audio-player

pull/3281/head
Audric Ackermann 4 months ago
parent fea05a2853
commit 3764233cf8
No known key found for this signature in database

@ -1,5 +1,5 @@
// Audio Player
import { useEffect, useRef, useState } from 'react';
import { SessionDataTestId, useEffect, useRef, useState } from 'react';
import H5AudioPlayer, { RHAP_UI } from 'react-h5-audio-player';
import { useDispatch, useSelector } from 'react-redux';
import styled from 'styled-components';
@ -171,7 +171,7 @@ export const AudioPlayerWithEncryptedFile = (props: {
direction === 'incoming'
? 'var(--message-bubbles-received-text-color)'
: 'var(--message-bubbles-sent-text-color)';
const dataTestId = `audio-${messageId}`;
const dataTestId: SessionDataTestId = 'audio-player';
const triggerPlayNextMessageIfNeeded = (endedMessageId: string) => {
const justEndedMessageIndex = messageProps.findIndex(

1
ts/react.d.ts vendored

@ -187,6 +187,7 @@ declare module 'react' {
| 'link-device'
| 'join-community-conversation'
| 'join-community-button'
| 'audio-player'
| 'select-contact'
| 'contact' // this is way too generic
| 'contact-status'

Loading…
Cancel
Save