Add further testid tags

This commit is contained in:
Michael Kaye
2023-08-30 16:01:28 +01:00
parent f471a34c50
commit b546f711d0
3 changed files with 7 additions and 2 deletions

View File

@@ -408,7 +408,7 @@ export function InCallView({
/>
);
}
buttons.push(<SettingsButton key="4" onPress={openSettings} />);
buttons.push(<SettingsButton key="4" onPress={openSettings} data-testid="incall_settings" />);
}
buttons.push(

View File

@@ -124,6 +124,7 @@ export const SettingsModal = (props: Props) => {
const audioTab = (
<TabItem
key="audio"
data-testid="settings_audio"
title={
<>
<AudioIcon width={16} height={16} />
@@ -139,6 +140,7 @@ export const SettingsModal = (props: Props) => {
const videoTab = (
<TabItem
key="video"
data-testid="settings_video"
title={
<>
<VideoIcon width={16} height={16} />
@@ -153,6 +155,7 @@ export const SettingsModal = (props: Props) => {
const profileTab = (
<TabItem
key="profile"
data-testid="settings_profile"
title={
<>
<UserIcon width={15} height={15} />
@@ -167,6 +170,7 @@ export const SettingsModal = (props: Props) => {
const feedbackTab = (
<TabItem
key="feedback"
data-testid="settings_feedback"
title={
<>
<FeedbackIcon width={16} height={16} />

View File

@@ -55,11 +55,12 @@ function Tab<T>({ item, state }: TabProps<T>): JSX.Element {
const { key, rendered } = item;
const ref = useRef<HTMLLIElement>(null);
const { tabProps } = useTab({ key }, state, ref);
const testid = "tab_" + key;
return (
<li
{...tabProps}
ref={ref}
data-testid={testid}
className={classNames(styles.tab, {
[styles.selected]: state.selectedKey === key,
[styles.disabled]: state.disabledKeys.has(key),