Merge branch 'develop' of https://github.com/vector-im/element-web into dbkr/stateafter

# Conflicts:
#	test/unit-tests/components/structures/RoomView-test.tsx
#	test/unit-tests/components/structures/TimelinePanel-test.tsx
This commit is contained in:
Michael Telatynski 2024-11-27 10:47:35 +00:00
commit 3dbcb5efa3
No known key found for this signature in database
GPG key ID: A2B008A5F49F5D0D
438 changed files with 7829 additions and 4692 deletions

View file

@ -90,9 +90,7 @@ describe("VoiceBroadcastPreRecordingPip", () => {
beforeEach(async () => {
renderResult = render(<VoiceBroadcastPreRecordingPip voiceBroadcastPreRecording={preRecording} />);
await act(async () => {
flushPromises();
});
await flushPromises();
});
it("should match the snapshot", () => {

View file

@ -8,7 +8,7 @@ Please see LICENSE files in the repository root for full details.
//
import React from "react";
import { act, render, RenderResult, screen } from "jest-matrix-react";
import { render, RenderResult, screen } from "jest-matrix-react";
import userEvent from "@testing-library/user-event";
import { ClientEvent, MatrixClient, MatrixEvent, SyncState } from "matrix-js-sdk/src/matrix";
import { sleep } from "matrix-js-sdk/src/utils";
@ -61,9 +61,7 @@ describe("VoiceBroadcastRecordingPip", () => {
jest.spyOn(recording, "pause");
jest.spyOn(recording, "resume");
renderResult = render(<VoiceBroadcastRecordingPip recording={recording} />);
await act(async () => {
flushPromises();
});
await flushPromises();
};
const itShouldShowTheBroadcastRoom = () => {
@ -152,8 +150,9 @@ describe("VoiceBroadcastRecordingPip", () => {
describe("and clicking the stop button", () => {
beforeEach(async () => {
await userEvent.click(screen.getByLabelText("Stop Recording"));
await screen.findByText("Stop live broadcasting?");
// modal rendering has some weird sleeps
await sleep(100);
await sleep(200);
});
it("should display the confirm end dialog", () => {