Display info dialogs if unable to start voice broadcasts (#9453)

This commit is contained in:
Michael Weimann 2022-10-19 15:01:14 +02:00 committed by GitHub
parent 3c3df11d32
commit bb0c175b7e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
17 changed files with 546 additions and 160 deletions

View file

@ -147,7 +147,7 @@ describe("MessageComposer", () => {
beforeEach(() => {
SettingsStore.setValue(setting, null, SettingLevel.DEVICE, value);
wrapper = wrapAndRender({ room, showVoiceBroadcastButton: true });
wrapper = wrapAndRender({ room });
});
it(`should pass the prop ${prop} = ${value}`, () => {
@ -174,17 +174,6 @@ describe("MessageComposer", () => {
});
});
[false, undefined].forEach((value) => {
it(`should pass showVoiceBroadcastButton = false if the MessageComposer prop is ${value}`, () => {
SettingsStore.setValue(Features.VoiceBroadcast, null, SettingLevel.DEVICE, true);
const wrapper = wrapAndRender({
room,
showVoiceBroadcastButton: value,
});
expect(wrapper.find(MessageComposerButtons).props().showVoiceBroadcastButton).toBe(false);
});
});
it("should not render the send button", () => {
const wrapper = wrapAndRender({ room });
expect(wrapper.find("SendButton")).toHaveLength(0);

View file

@ -250,7 +250,6 @@ function createRoomState(room: Room, narrow: boolean): IRoomState {
statusBarVisible: false,
canReact: false,
canSendMessages: false,
canSendVoiceBroadcasts: false,
layout: Layout.Group,
lowBandwidth: false,
alwaysShowTimestamps: false,

View file

@ -72,7 +72,6 @@ describe('<SendMessageComposer/>', () => {
statusBarVisible: false,
canReact: false,
canSendMessages: false,
canSendVoiceBroadcasts: false,
layout: Layout.Group,
lowBandwidth: false,
alwaysShowTimestamps: false,

View file

@ -91,7 +91,6 @@ describe('WysiwygComposer', () => {
statusBarVisible: false,
canReact: false,
canSendMessages: false,
canSendVoiceBroadcasts: false,
layout: Layout.Group,
lowBandwidth: false,
alwaysShowTimestamps: false,

View file

@ -123,7 +123,6 @@ describe('message', () => {
statusBarVisible: false,
canReact: false,
canSendMessages: false,
canSendVoiceBroadcasts: false,
layout: Layout.Group,
lowBandwidth: false,
alwaysShowTimestamps: false,