1
0
mirror of https://github.com/matrix-org/matrix-react-sdk.git synced 2025-08-07 21:23:00 +03:00
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
Michael Telatynski
2024-08-01 15:29:35 +01:00
parent 6f2dd10873
commit e6bb0f34d4
10 changed files with 71 additions and 68 deletions

View File

@@ -15,7 +15,7 @@ limitations under the License.
*/ */
import React from "react"; import React from "react";
import { render, RenderResult } from "@testing-library/react"; import { render, RenderResult, waitForElementToBeRemoved } from "@testing-library/react";
import { EventType, MatrixEvent } from "matrix-js-sdk/src/matrix"; import { EventType, MatrixEvent } from "matrix-js-sdk/src/matrix";
import type { MatrixClient } from "matrix-js-sdk/src/matrix"; import type { MatrixClient } from "matrix-js-sdk/src/matrix";
@@ -39,6 +39,7 @@ describe("<MessageEditHistory />", () => {
async function renderComponent(): Promise<RenderResult> { async function renderComponent(): Promise<RenderResult> {
const result = render(<MessageEditHistoryDialog mxEvent={event} onFinished={jest.fn()} />); const result = render(<MessageEditHistoryDialog mxEvent={event} onFinished={jest.fn()} />);
await waitForElementToBeRemoved(() => result.queryByRole("progressbar"));
await flushPromises(); await flushPromises();
return result; return result;
} }

View File

@@ -73,7 +73,6 @@ exports[`LogoutDialog Prompts user to connect backup if there is a backup on the
</details> </details>
</div> </div>
<div <div
aria-describedby=":r22:"
aria-label="Close dialog" aria-label="Close dialog"
class="mx_AccessibleButton mx_Dialog_cancelButton" class="mx_AccessibleButton mx_Dialog_cancelButton"
role="button" role="button"
@@ -161,7 +160,6 @@ exports[`LogoutDialog Prompts user to set up backup if there is no backup on the
</details> </details>
</div> </div>
<div <div
aria-describedby=":r28:"
aria-label="Close dialog" aria-label="Close dialog"
class="mx_AccessibleButton mx_Dialog_cancelButton" class="mx_AccessibleButton mx_Dialog_cancelButton"
role="button" role="button"

View File

@@ -22,7 +22,10 @@ import PlatformPeg from "../../../../src/PlatformPeg";
describe("<SpellCheckLanguagesDropdown />", () => { describe("<SpellCheckLanguagesDropdown />", () => {
it("renders as expected", async () => { it("renders as expected", async () => {
const platform: any = { getAvailableSpellCheckLanguages: jest.fn().mockResolvedValue(["en", "de", "qq"]) }; const platform: any = {
getAvailableSpellCheckLanguages: jest.fn().mockResolvedValue(["en", "de", "qq"]),
supportsSetting: jest.fn(),
};
PlatformPeg.set(platform); PlatformPeg.set(platform);
const { asFragment } = render( const { asFragment } = render(

View File

@@ -15,7 +15,7 @@ limitations under the License.
*/ */
import React from "react"; import React from "react";
import { render } from "@testing-library/react"; import { render, waitFor } from "@testing-library/react";
import { MatrixEvent, Poll, Room, M_TEXT } from "matrix-js-sdk/src/matrix"; import { MatrixEvent, Poll, Room, M_TEXT } from "matrix-js-sdk/src/matrix";
import { PollListItemEnded } from "../../../../../src/components/views/polls/pollHistory/PollListItemEnded"; import { PollListItemEnded } from "../../../../../src/components/views/polls/pollHistory/PollListItemEnded";
@@ -174,7 +174,7 @@ describe("<PollListItemEnded />", () => {
]); ]);
// updated with more responses // updated with more responses
expect(getByText("Final result based on 3 votes")).toBeInTheDocument(); await waitFor(() => expect(getByText("Final result based on 3 votes")).toBeInTheDocument());
expect(getByText("Nissan Silvia S15")).toBeInTheDocument(); expect(getByText("Nissan Silvia S15")).toBeInTheDocument();
expect(queryByText("Mitsubishi Lancer Evolution IX")).not.toBeInTheDocument(); expect(queryByText("Mitsubishi Lancer Evolution IX")).not.toBeInTheDocument();
}); });

View File

@@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License. limitations under the License.
*/ */
import { render } from "@testing-library/react"; import { render, waitFor } from "@testing-library/react";
import { import {
MatrixEvent, MatrixEvent,
MsgType, MsgType,
@@ -79,21 +79,23 @@ describe("LegacyRoomHeaderButtons-test.tsx", function () {
expect(container.querySelector(".mx_RightPanel_threadsButton .mx_Indicator")).toBeNull(); expect(container.querySelector(".mx_RightPanel_threadsButton .mx_Indicator")).toBeNull();
}); });
it("thread notification does change the thread button", () => { it("thread notification does change the thread button", async () => {
const { container } = getComponent(room); const { container } = getComponent(room);
expect(getThreadButton(container)!.className.includes("mx_LegacyRoomHeader_button--unread")).toBeFalsy(); expect(getThreadButton(container)!.className.includes("mx_LegacyRoomHeader_button--unread")).toBeFalsy();
room.setThreadUnreadNotificationCount("$123", NotificationCountType.Total, 1); room.setThreadUnreadNotificationCount("$123", NotificationCountType.Total, 1);
expect(getThreadButton(container)!.className.includes("mx_LegacyRoomHeader_button--unread")).toBeTruthy(); await waitFor(() => {
expect(isIndicatorOfType(container, "notification")).toBe(true); expect(getThreadButton(container)!.className.includes("mx_LegacyRoomHeader_button--unread")).toBeTruthy();
expect(isIndicatorOfType(container, "notification")).toBe(true);
});
room.setThreadUnreadNotificationCount("$123", NotificationCountType.Highlight, 1); room.setThreadUnreadNotificationCount("$123", NotificationCountType.Highlight, 1);
expect(isIndicatorOfType(container, "highlight")).toBe(true); await waitFor(() => expect(isIndicatorOfType(container, "highlight")).toBe(true));
room.setThreadUnreadNotificationCount("$123", NotificationCountType.Total, 0); room.setThreadUnreadNotificationCount("$123", NotificationCountType.Total, 0);
room.setThreadUnreadNotificationCount("$123", NotificationCountType.Highlight, 0); room.setThreadUnreadNotificationCount("$123", NotificationCountType.Highlight, 0);
expect(container.querySelector(".mx_RightPanel_threadsButton .mx_Indicator")).toBeNull(); await waitFor(() => expect(container.querySelector(".mx_RightPanel_threadsButton .mx_Indicator")).toBeNull());
}); });
it("thread activity does change the thread button", async () => { it("thread activity does change the thread button", async () => {
@@ -122,7 +124,7 @@ describe("LegacyRoomHeaderButtons-test.tsx", function () {
}, },
}); });
room.addReceipt(receipt); room.addReceipt(receipt);
expect(isIndicatorOfType(container, "activity")).toBe(true); await waitFor(() => expect(isIndicatorOfType(container, "activity")).toBe(true));
// Sending the last event should clear the notification. // Sending the last event should clear the notification.
let event = mkEvent({ let event = mkEvent({
@@ -140,7 +142,7 @@ describe("LegacyRoomHeaderButtons-test.tsx", function () {
}, },
}); });
room.addLiveEvents([event]); room.addLiveEvents([event]);
expect(container.querySelector(".mx_RightPanel_threadsButton .mx_Indicator")).toBeNull(); await waitFor(() => expect(container.querySelector(".mx_RightPanel_threadsButton .mx_Indicator")).toBeNull());
// Mark it as unread again. // Mark it as unread again.
event = mkEvent({ event = mkEvent({
@@ -158,7 +160,7 @@ describe("LegacyRoomHeaderButtons-test.tsx", function () {
}, },
}); });
room.addLiveEvents([event]); room.addLiveEvents([event]);
expect(isIndicatorOfType(container, "activity")).toBe(true); await waitFor(() => expect(isIndicatorOfType(container, "activity")).toBe(true));
// Sending a read receipt on an earlier event shouldn't do anything. // Sending a read receipt on an earlier event shouldn't do anything.
receipt = new MatrixEvent({ receipt = new MatrixEvent({
@@ -173,7 +175,7 @@ describe("LegacyRoomHeaderButtons-test.tsx", function () {
}, },
}); });
room.addReceipt(receipt); room.addReceipt(receipt);
expect(isIndicatorOfType(container, "activity")).toBe(true); await waitFor(() => expect(isIndicatorOfType(container, "activity")).toBe(true));
// Sending a receipt on the latest event should clear the notification. // Sending a receipt on the latest event should clear the notification.
receipt = new MatrixEvent({ receipt = new MatrixEvent({
@@ -188,6 +190,6 @@ describe("LegacyRoomHeaderButtons-test.tsx", function () {
}, },
}); });
room.addReceipt(receipt); room.addReceipt(receipt);
expect(container.querySelector(".mx_RightPanel_threadsButton .mx_Indicator")).toBeNull(); await waitFor(() => expect(container.querySelector(".mx_RightPanel_threadsButton .mx_Indicator")).toBeNull());
}); });
}); });

View File

@@ -27,7 +27,7 @@ exports[`<LayoutSwitcher /> should render 1`] = `
<label <label
aria-label="Modern" aria-label="Modern"
class="_label_dgy0u_67" class="_label_dgy0u_67"
for="radix-0" for="radix-:r0:"
> >
<div <div
class="mxLayoutSwitcher_LayoutSelector_LayoutRadio_inline" class="mxLayoutSwitcher_LayoutSelector_LayoutRadio_inline"
@@ -38,7 +38,7 @@ exports[`<LayoutSwitcher /> should render 1`] = `
<input <input
checked="" checked=""
class="_input_1vw5h_26" class="_input_1vw5h_26"
id="radix-0" id="radix-:r0:"
name="layout" name="layout"
title="" title=""
type="radio" type="radio"
@@ -144,7 +144,7 @@ exports[`<LayoutSwitcher /> should render 1`] = `
<label <label
aria-label="Message bubbles" aria-label="Message bubbles"
class="_label_dgy0u_67" class="_label_dgy0u_67"
for="radix-1" for="radix-:r9:"
> >
<div <div
class="mxLayoutSwitcher_LayoutSelector_LayoutRadio_inline" class="mxLayoutSwitcher_LayoutSelector_LayoutRadio_inline"
@@ -154,7 +154,7 @@ exports[`<LayoutSwitcher /> should render 1`] = `
> >
<input <input
class="_input_1vw5h_26" class="_input_1vw5h_26"
id="radix-1" id="radix-:r9:"
name="layout" name="layout"
title="" title=""
type="radio" type="radio"
@@ -260,7 +260,7 @@ exports[`<LayoutSwitcher /> should render 1`] = `
<label <label
aria-label="IRC (experimental)" aria-label="IRC (experimental)"
class="_label_dgy0u_67" class="_label_dgy0u_67"
for="radix-2" for="radix-:ri:"
> >
<div <div
class="mxLayoutSwitcher_LayoutSelector_LayoutRadio_inline" class="mxLayoutSwitcher_LayoutSelector_LayoutRadio_inline"
@@ -270,7 +270,7 @@ exports[`<LayoutSwitcher /> should render 1`] = `
> >
<input <input
class="_input_1vw5h_26" class="_input_1vw5h_26"
id="radix-2" id="radix-:ri:"
name="layout" name="layout"
title="" title=""
type="radio" type="radio"
@@ -384,9 +384,9 @@ exports[`<LayoutSwitcher /> should render 1`] = `
class="_container_qnvru_18" class="_container_qnvru_18"
> >
<input <input
aria-describedby="radix-3" aria-describedby="radix-:rs:"
class="_input_qnvru_32" class="_input_qnvru_32"
id="radix-4" id="radix-:rr:"
name="compactLayout" name="compactLayout"
title="" title=""
type="checkbox" type="checkbox"
@@ -401,13 +401,13 @@ exports[`<LayoutSwitcher /> should render 1`] = `
> >
<label <label
class="_label_dgy0u_67" class="_label_dgy0u_67"
for="radix-4" for="radix-:rr:"
> >
Show compact text and messages Show compact text and messages
</label> </label>
<span <span
class="_message_dgy0u_98 _help-message_dgy0u_104" class="_message_dgy0u_98 _help-message_dgy0u_104"
id="radix-3" id="radix-:rs:"
> >
Modern layout must be selected to use this feature. Modern layout must be selected to use this feature.
</span> </span>

View File

@@ -32,7 +32,7 @@ exports[`<ThemeChoicePanel /> custom theme should display custom theme 1`] = `
> >
<input <input
class="_input_qnvru_32" class="_input_qnvru_32"
id="radix-48" id="radix-:r20:"
name="systemTheme" name="systemTheme"
title="" title=""
type="checkbox" type="checkbox"
@@ -47,7 +47,7 @@ exports[`<ThemeChoicePanel /> custom theme should display custom theme 1`] = `
> >
<label <label
class="_label_dgy0u_67" class="_label_dgy0u_67"
for="radix-48" for="radix-:r20:"
> >
Match system theme Match system theme
</label> </label>
@@ -69,7 +69,7 @@ exports[`<ThemeChoicePanel /> custom theme should display custom theme 1`] = `
<input <input
checked="" checked=""
class="_input_1vw5h_26" class="_input_1vw5h_26"
id="radix-49" id="radix-:r21:"
name="themeSelector" name="themeSelector"
title="" title=""
type="radio" type="radio"
@@ -85,7 +85,7 @@ exports[`<ThemeChoicePanel /> custom theme should display custom theme 1`] = `
> >
<label <label
class="_label_dgy0u_67 mx_ThemeChoicePanel_themeSelector_Label" class="_label_dgy0u_67 mx_ThemeChoicePanel_themeSelector_Label"
for="radix-49" for="radix-:r21:"
> >
Light Light
</label> </label>
@@ -102,7 +102,7 @@ exports[`<ThemeChoicePanel /> custom theme should display custom theme 1`] = `
> >
<input <input
class="_input_1vw5h_26" class="_input_1vw5h_26"
id="radix-50" id="radix-:r22:"
name="themeSelector" name="themeSelector"
title="" title=""
type="radio" type="radio"
@@ -118,7 +118,7 @@ exports[`<ThemeChoicePanel /> custom theme should display custom theme 1`] = `
> >
<label <label
class="_label_dgy0u_67 mx_ThemeChoicePanel_themeSelector_Label" class="_label_dgy0u_67 mx_ThemeChoicePanel_themeSelector_Label"
for="radix-50" for="radix-:r22:"
> >
Dark Dark
</label> </label>
@@ -135,7 +135,7 @@ exports[`<ThemeChoicePanel /> custom theme should display custom theme 1`] = `
> >
<input <input
class="_input_1vw5h_26" class="_input_1vw5h_26"
id="radix-51" id="radix-:r23:"
name="themeSelector" name="themeSelector"
title="" title=""
type="radio" type="radio"
@@ -151,7 +151,7 @@ exports[`<ThemeChoicePanel /> custom theme should display custom theme 1`] = `
> >
<label <label
class="_label_dgy0u_67 mx_ThemeChoicePanel_themeSelector_Label" class="_label_dgy0u_67 mx_ThemeChoicePanel_themeSelector_Label"
for="radix-51" for="radix-:r23:"
> >
High contrast High contrast
</label> </label>
@@ -168,7 +168,7 @@ exports[`<ThemeChoicePanel /> custom theme should display custom theme 1`] = `
> >
<input <input
class="_input_1vw5h_26" class="_input_1vw5h_26"
id="radix-52" id="radix-:r24:"
name="themeSelector" name="themeSelector"
title="" title=""
type="radio" type="radio"
@@ -184,7 +184,7 @@ exports[`<ThemeChoicePanel /> custom theme should display custom theme 1`] = `
> >
<label <label
class="_label_dgy0u_67 mx_ThemeChoicePanel_themeSelector_Label" class="_label_dgy0u_67 mx_ThemeChoicePanel_themeSelector_Label"
for="radix-52" for="radix-:r24:"
> >
Alice theme Alice theme
</label> </label>
@@ -202,7 +202,7 @@ exports[`<ThemeChoicePanel /> custom theme should display custom theme 1`] = `
> >
<label <label
class="_label_dgy0u_67" class="_label_dgy0u_67"
for="radix-54" for="radix-:r25:"
> >
Add custom theme Add custom theme
</label> </label>
@@ -210,9 +210,9 @@ exports[`<ThemeChoicePanel /> custom theme should display custom theme 1`] = `
class="_controls_1h4nb_17" class="_controls_1h4nb_17"
> >
<input <input
aria-describedby="radix-53" aria-describedby="radix-:r26:"
class="_control_9gon8_18" class="_control_9gon8_18"
id="radix-54" id="radix-:r25:"
name="input" name="input"
title="" title=""
value="" value=""
@@ -220,7 +220,7 @@ exports[`<ThemeChoicePanel /> custom theme should display custom theme 1`] = `
</div> </div>
<span <span
class="_message_dgy0u_98 _help-message_dgy0u_104" class="_message_dgy0u_98 _help-message_dgy0u_104"
id="radix-53" id="radix-:r26:"
> >
Enter the URL of a custom theme you want to apply. Enter the URL of a custom theme you want to apply.
</span> </span>
@@ -308,7 +308,7 @@ exports[`<ThemeChoicePanel /> custom theme should render the custom theme sectio
> >
<input <input
class="_input_qnvru_32" class="_input_qnvru_32"
id="radix-32" id="radix-:r10:"
name="systemTheme" name="systemTheme"
title="" title=""
type="checkbox" type="checkbox"
@@ -323,7 +323,7 @@ exports[`<ThemeChoicePanel /> custom theme should render the custom theme sectio
> >
<label <label
class="_label_dgy0u_67" class="_label_dgy0u_67"
for="radix-32" for="radix-:r10:"
> >
Match system theme Match system theme
</label> </label>
@@ -345,7 +345,7 @@ exports[`<ThemeChoicePanel /> custom theme should render the custom theme sectio
<input <input
checked="" checked=""
class="_input_1vw5h_26" class="_input_1vw5h_26"
id="radix-33" id="radix-:r11:"
name="themeSelector" name="themeSelector"
title="" title=""
type="radio" type="radio"
@@ -361,7 +361,7 @@ exports[`<ThemeChoicePanel /> custom theme should render the custom theme sectio
> >
<label <label
class="_label_dgy0u_67 mx_ThemeChoicePanel_themeSelector_Label" class="_label_dgy0u_67 mx_ThemeChoicePanel_themeSelector_Label"
for="radix-33" for="radix-:r11:"
> >
Light Light
</label> </label>
@@ -378,7 +378,7 @@ exports[`<ThemeChoicePanel /> custom theme should render the custom theme sectio
> >
<input <input
class="_input_1vw5h_26" class="_input_1vw5h_26"
id="radix-34" id="radix-:r12:"
name="themeSelector" name="themeSelector"
title="" title=""
type="radio" type="radio"
@@ -394,7 +394,7 @@ exports[`<ThemeChoicePanel /> custom theme should render the custom theme sectio
> >
<label <label
class="_label_dgy0u_67 mx_ThemeChoicePanel_themeSelector_Label" class="_label_dgy0u_67 mx_ThemeChoicePanel_themeSelector_Label"
for="radix-34" for="radix-:r12:"
> >
Dark Dark
</label> </label>
@@ -411,7 +411,7 @@ exports[`<ThemeChoicePanel /> custom theme should render the custom theme sectio
> >
<input <input
class="_input_1vw5h_26" class="_input_1vw5h_26"
id="radix-35" id="radix-:r13:"
name="themeSelector" name="themeSelector"
title="" title=""
type="radio" type="radio"
@@ -427,7 +427,7 @@ exports[`<ThemeChoicePanel /> custom theme should render the custom theme sectio
> >
<label <label
class="_label_dgy0u_67 mx_ThemeChoicePanel_themeSelector_Label" class="_label_dgy0u_67 mx_ThemeChoicePanel_themeSelector_Label"
for="radix-35" for="radix-:r13:"
> >
High contrast High contrast
</label> </label>
@@ -444,7 +444,7 @@ exports[`<ThemeChoicePanel /> custom theme should render the custom theme sectio
> >
<input <input
class="_input_1vw5h_26" class="_input_1vw5h_26"
id="radix-36" id="radix-:r14:"
name="themeSelector" name="themeSelector"
title="" title=""
type="radio" type="radio"
@@ -460,7 +460,7 @@ exports[`<ThemeChoicePanel /> custom theme should render the custom theme sectio
> >
<label <label
class="_label_dgy0u_67 mx_ThemeChoicePanel_themeSelector_Label" class="_label_dgy0u_67 mx_ThemeChoicePanel_themeSelector_Label"
for="radix-36" for="radix-:r14:"
> >
Alice theme Alice theme
</label> </label>
@@ -478,7 +478,7 @@ exports[`<ThemeChoicePanel /> custom theme should render the custom theme sectio
> >
<label <label
class="_label_dgy0u_67" class="_label_dgy0u_67"
for="radix-38" for="radix-:r15:"
> >
Add custom theme Add custom theme
</label> </label>
@@ -486,9 +486,9 @@ exports[`<ThemeChoicePanel /> custom theme should render the custom theme sectio
class="_controls_1h4nb_17" class="_controls_1h4nb_17"
> >
<input <input
aria-describedby="radix-37" aria-describedby="radix-:r16:"
class="_control_9gon8_18" class="_control_9gon8_18"
id="radix-38" id="radix-:r15:"
name="input" name="input"
title="" title=""
value="" value=""
@@ -496,7 +496,7 @@ exports[`<ThemeChoicePanel /> custom theme should render the custom theme sectio
</div> </div>
<span <span
class="_message_dgy0u_98 _help-message_dgy0u_104" class="_message_dgy0u_98 _help-message_dgy0u_104"
id="radix-37" id="radix-:r16:"
> >
Enter the URL of a custom theme you want to apply. Enter the URL of a custom theme you want to apply.
</span> </span>
@@ -584,7 +584,7 @@ exports[`<ThemeChoicePanel /> renders the theme choice UI 1`] = `
> >
<input <input
class="_input_qnvru_32" class="_input_qnvru_32"
id="radix-0" id="radix-:r0:"
name="systemTheme" name="systemTheme"
title="" title=""
type="checkbox" type="checkbox"
@@ -599,7 +599,7 @@ exports[`<ThemeChoicePanel /> renders the theme choice UI 1`] = `
> >
<label <label
class="_label_dgy0u_67" class="_label_dgy0u_67"
for="radix-0" for="radix-:r0:"
> >
Match system theme Match system theme
</label> </label>
@@ -621,7 +621,7 @@ exports[`<ThemeChoicePanel /> renders the theme choice UI 1`] = `
<input <input
checked="" checked=""
class="_input_1vw5h_26" class="_input_1vw5h_26"
id="radix-1" id="radix-:r1:"
name="themeSelector" name="themeSelector"
title="" title=""
type="radio" type="radio"
@@ -637,7 +637,7 @@ exports[`<ThemeChoicePanel /> renders the theme choice UI 1`] = `
> >
<label <label
class="_label_dgy0u_67 mx_ThemeChoicePanel_themeSelector_Label" class="_label_dgy0u_67 mx_ThemeChoicePanel_themeSelector_Label"
for="radix-1" for="radix-:r1:"
> >
Light Light
</label> </label>
@@ -654,7 +654,7 @@ exports[`<ThemeChoicePanel /> renders the theme choice UI 1`] = `
> >
<input <input
class="_input_1vw5h_26" class="_input_1vw5h_26"
id="radix-2" id="radix-:r2:"
name="themeSelector" name="themeSelector"
title="" title=""
type="radio" type="radio"
@@ -670,7 +670,7 @@ exports[`<ThemeChoicePanel /> renders the theme choice UI 1`] = `
> >
<label <label
class="_label_dgy0u_67 mx_ThemeChoicePanel_themeSelector_Label" class="_label_dgy0u_67 mx_ThemeChoicePanel_themeSelector_Label"
for="radix-2" for="radix-:r2:"
> >
Dark Dark
</label> </label>
@@ -687,7 +687,7 @@ exports[`<ThemeChoicePanel /> renders the theme choice UI 1`] = `
> >
<input <input
class="_input_1vw5h_26" class="_input_1vw5h_26"
id="radix-3" id="radix-:r3:"
name="themeSelector" name="themeSelector"
title="" title=""
type="radio" type="radio"
@@ -703,7 +703,7 @@ exports[`<ThemeChoicePanel /> renders the theme choice UI 1`] = `
> >
<label <label
class="_label_dgy0u_67 mx_ThemeChoicePanel_themeSelector_Label" class="_label_dgy0u_67 mx_ThemeChoicePanel_themeSelector_Label"
for="radix-3" for="radix-:r3:"
> >
High contrast High contrast
</label> </label>

View File

@@ -129,7 +129,6 @@ exports[`<SecurityUserSettingsTab /> renders security section 1`] = `
</th> </th>
<td> <td>
not found locally not found locally
</td> </td>
</tr> </tr>
<tr> <tr>

View File

@@ -229,8 +229,8 @@ exports[`<SpacePanel /> should show all activated MetaSpaces in the correct orde
class="mx_ThreadsActivityCentre_container" class="mx_ThreadsActivityCentre_container"
> >
<button <button
aria-controls=":r39:" aria-controls=":r12:"
aria-describedby=":r39:" aria-describedby=":r12:"
aria-expanded="true" aria-expanded="true"
aria-haspopup="dialog" aria-haspopup="dialog"
aria-label="Threads" aria-label="Threads"
@@ -256,7 +256,7 @@ exports[`<SpacePanel /> should show all activated MetaSpaces in the correct orde
tabindex="0" tabindex="0"
/> />
<span <span
aria-owns="undefined" aria-owns=":r18:"
style="border: 0px; height: 1px; margin: -1px; overflow: hidden; padding: 0px; position: fixed; white-space: nowrap; width: 1px; top: 0px; left: 0px;" style="border: 0px; height: 1px; margin: -1px; overflow: hidden; padding: 0px; position: fixed; white-space: nowrap; width: 1px; top: 0px; left: 0px;"
/> />
<span <span

View File

@@ -127,7 +127,7 @@ export function untilEmission(
}); });
} }
export const flushPromises = async () => await new Promise<void>((resolve) => window.setTimeout(resolve)); export const flushPromises = async () => await new Promise<void>((resolve) => window.setTimeout(resolve, 10));
// with jest's modern fake timers process.nextTick is also mocked, // with jest's modern fake timers process.nextTick is also mocked,
// flushing promises in the normal way then waits for some advancement // flushing promises in the normal way then waits for some advancement