-
{_t("Voice & Video")}
- {requestButton}
-
- {_t("Voice settings")}
- {speakerDropdown}
- {microphoneDropdown}
- => {
- await MediaDeviceHandler.setAudioAutoGainControl(v);
- this.setState({ audioAutoGainControl: MediaDeviceHandler.getAudioAutoGainControl() });
- }}
- label={_t("Automatically adjust the microphone volume")}
- data-testid="voice-auto-gain"
- />
-
-
- {_t("Video settings")}
- {webcamDropdown}
-
-
-
-
{_t("Advanced")}
-
-
{_t("Voice processing")}
-
+
+
+ {requestButton}
+
+ {speakerDropdown}
+ {microphoneDropdown}
+ => {
+ await MediaDeviceHandler.setAudioAutoGainControl(v);
+ this.setState({ audioAutoGainControl: MediaDeviceHandler.getAudioAutoGainControl() });
+ }}
+ label={_t("Automatically adjust the microphone volume")}
+ data-testid="voice-auto-gain"
+ />
+
+
+ {webcamDropdown}
+
+
+
+
+
+
=> {
@@ -193,9 +193,8 @@ export default class VoiceUserSettingsTab extends React.Component<{}, IState> {
label={_t("Echo cancellation")}
data-testid="voice-echo-cancellation"
/>
-
-
- {_t("Connection")}
+
+
{
level={SettingLevel.DEVICE}
onChange={this.changeFallbackICEServerAllowed}
/>
-
-
-
+
+
+
);
}
}
diff --git a/test/components/views/settings/tabs/user/SidebarUserSettingsTab-test.tsx b/test/components/views/settings/tabs/user/SidebarUserSettingsTab-test.tsx
new file mode 100644
index 00000000000..fc0c2a12643
--- /dev/null
+++ b/test/components/views/settings/tabs/user/SidebarUserSettingsTab-test.tsx
@@ -0,0 +1,88 @@
+/*
+Copyright 2023 The Matrix.org Foundation C.I.C.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+import React from "react";
+import { fireEvent, render, screen } from "@testing-library/react";
+
+import SidebarUserSettingsTab from "../../../../../../src/components/views/settings/tabs/user/SidebarUserSettingsTab";
+import PosthogTrackers from "../../../../../../src/PosthogTrackers";
+import SettingsStore from "../../../../../../src/settings/SettingsStore";
+import { MetaSpace } from "../../../../../../src/stores/spaces";
+import { SettingLevel } from "../../../../../../src/settings/SettingLevel";
+import { flushPromises } from "../../../../../test-utils";
+
+// used by checkbox to relate labels to inputs
+// make it stable for snapshot testing
+jest.mock("matrix-js-sdk/src/randomstring", () => ({
+ randomString: jest.fn().mockReturnValue("abcd"),
+}));
+
+describe("