Update to React 18 (#24763)
* Upgrade target to es2021 Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Upgrade target to es2021 Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Upgrade to es2022 Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Upgrade to es2022 Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Fix babel config Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Fix babel config Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Fix React contexts Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Fix types Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Fix React state Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Iterate Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Update to React 18 Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Update to React 18 Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Iterate Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Iterate Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Iterate Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Iterate Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Iterate Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Iterate Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Install @testing-library/dom Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Iterate Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Iterate Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Iterate Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Iterate Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Iterate Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Update lockfile Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Iterate Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Iterate Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Iterate Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Iterate Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Iterate Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Iterate Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Iterate Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Iterate Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Iterate Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Iterate Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Iterate Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Iterate Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Yarn lock update * Iterate Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Iterate Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Iterate Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Iterate Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> --------- Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
parent
772019711d
commit
d8800ef987
81 changed files with 1056 additions and 1403 deletions
|
@ -49,7 +49,7 @@ describe("AddRemoveThreepids", () => {
|
|||
clearAllModals();
|
||||
});
|
||||
|
||||
const clientProviderWrapper: React.FC = ({ children }) => (
|
||||
const clientProviderWrapper: React.FC = ({ children }: React.PropsWithChildren) => (
|
||||
<MatrixClientContext.Provider value={client}>{children}</MatrixClientContext.Provider>
|
||||
);
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@ Please see LICENSE files in the repository root for full details.
|
|||
*/
|
||||
|
||||
import React from "react";
|
||||
import { render } from "jest-matrix-react";
|
||||
import { render, waitFor } from "jest-matrix-react";
|
||||
import { MatrixClient } from "matrix-js-sdk/src/matrix";
|
||||
import { mocked } from "jest-mock";
|
||||
|
||||
|
@ -39,8 +39,7 @@ describe("CryptographyPanel", () => {
|
|||
expect(codes[1].innerHTML).toEqual("<strong>...</strong>");
|
||||
|
||||
// Then the actual key
|
||||
await TestUtils.flushPromises();
|
||||
expect(codes[1].innerHTML).toEqual(sessionKeyFormatted);
|
||||
await waitFor(() => expect(codes[1].innerHTML).toEqual(sessionKeyFormatted));
|
||||
});
|
||||
|
||||
it("handles errors fetching session key", async () => {
|
||||
|
@ -62,7 +61,6 @@ describe("CryptographyPanel", () => {
|
|||
expect(codes[1].innerHTML).toEqual("<strong>...</strong>");
|
||||
|
||||
// Then "not supported key
|
||||
await TestUtils.flushPromises();
|
||||
expect(codes[1].innerHTML).toEqual("<strong><not supported></strong>");
|
||||
await waitFor(() => expect(codes[1].innerHTML).toEqual("<strong><not supported></strong>"));
|
||||
});
|
||||
});
|
||||
|
|
|
@ -27,7 +27,7 @@ exports[`<LayoutSwitcher /> should render 1`] = `
|
|||
<label
|
||||
aria-label="Modern"
|
||||
class="_label_dgy0u_67"
|
||||
for="radix-0"
|
||||
for="radix-:r0:"
|
||||
>
|
||||
<div
|
||||
class="mxLayoutSwitcher_LayoutSelector_LayoutRadio_inline"
|
||||
|
@ -38,7 +38,7 @@ exports[`<LayoutSwitcher /> should render 1`] = `
|
|||
<input
|
||||
checked=""
|
||||
class="_input_1vw5h_26"
|
||||
id="radix-0"
|
||||
id="radix-:r0:"
|
||||
name="layout"
|
||||
title=""
|
||||
type="radio"
|
||||
|
@ -154,7 +154,7 @@ exports[`<LayoutSwitcher /> should render 1`] = `
|
|||
<label
|
||||
aria-label="Message bubbles"
|
||||
class="_label_dgy0u_67"
|
||||
for="radix-1"
|
||||
for="radix-:r9:"
|
||||
>
|
||||
<div
|
||||
class="mxLayoutSwitcher_LayoutSelector_LayoutRadio_inline"
|
||||
|
@ -164,7 +164,7 @@ exports[`<LayoutSwitcher /> should render 1`] = `
|
|||
>
|
||||
<input
|
||||
class="_input_1vw5h_26"
|
||||
id="radix-1"
|
||||
id="radix-:r9:"
|
||||
name="layout"
|
||||
title=""
|
||||
type="radio"
|
||||
|
@ -280,7 +280,7 @@ exports[`<LayoutSwitcher /> should render 1`] = `
|
|||
<label
|
||||
aria-label="IRC (experimental)"
|
||||
class="_label_dgy0u_67"
|
||||
for="radix-2"
|
||||
for="radix-:ri:"
|
||||
>
|
||||
<div
|
||||
class="mxLayoutSwitcher_LayoutSelector_LayoutRadio_inline"
|
||||
|
@ -290,7 +290,7 @@ exports[`<LayoutSwitcher /> should render 1`] = `
|
|||
>
|
||||
<input
|
||||
class="_input_1vw5h_26"
|
||||
id="radix-2"
|
||||
id="radix-:ri:"
|
||||
name="layout"
|
||||
title=""
|
||||
type="radio"
|
||||
|
@ -414,9 +414,9 @@ exports[`<LayoutSwitcher /> should render 1`] = `
|
|||
class="_container_qnvru_18"
|
||||
>
|
||||
<input
|
||||
aria-describedby="radix-3"
|
||||
aria-describedby="radix-:rs:"
|
||||
class="_input_qnvru_32"
|
||||
id="radix-4"
|
||||
id="radix-:rr:"
|
||||
name="compactLayout"
|
||||
title=""
|
||||
type="checkbox"
|
||||
|
@ -431,13 +431,13 @@ exports[`<LayoutSwitcher /> should render 1`] = `
|
|||
>
|
||||
<label
|
||||
class="_label_dgy0u_67"
|
||||
for="radix-4"
|
||||
for="radix-:rr:"
|
||||
>
|
||||
Show compact text and messages
|
||||
</label>
|
||||
<span
|
||||
class="_message_dgy0u_98 _help-message_dgy0u_104"
|
||||
id="radix-3"
|
||||
id="radix-:rs:"
|
||||
>
|
||||
Modern layout must be selected to use this feature.
|
||||
</span>
|
||||
|
|
|
@ -39,7 +39,6 @@ exports[`<SecureBackupPanel /> handles error fetching backup 1`] = `
|
|||
</th>
|
||||
<td>
|
||||
not found locally
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
@ -117,7 +116,6 @@ exports[`<SecureBackupPanel /> suggests connecting session to key backup when ba
|
|||
</th>
|
||||
<td>
|
||||
not found locally
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
@ -168,7 +166,6 @@ exports[`<SecureBackupPanel /> suggests connecting session to key backup when ba
|
|||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<div />
|
||||
</details>
|
||||
<div
|
||||
|
|
|
@ -32,7 +32,7 @@ exports[`<ThemeChoicePanel /> custom theme should display custom theme 1`] = `
|
|||
>
|
||||
<input
|
||||
class="_input_qnvru_32"
|
||||
id="radix-48"
|
||||
id="radix-:r28:"
|
||||
name="systemTheme"
|
||||
title=""
|
||||
type="checkbox"
|
||||
|
@ -47,7 +47,7 @@ exports[`<ThemeChoicePanel /> custom theme should display custom theme 1`] = `
|
|||
>
|
||||
<label
|
||||
class="_label_dgy0u_67"
|
||||
for="radix-48"
|
||||
for="radix-:r28:"
|
||||
>
|
||||
Match system theme
|
||||
</label>
|
||||
|
@ -69,7 +69,7 @@ exports[`<ThemeChoicePanel /> custom theme should display custom theme 1`] = `
|
|||
<input
|
||||
checked=""
|
||||
class="_input_1vw5h_26"
|
||||
id="radix-49"
|
||||
id="radix-:r29:"
|
||||
name="themeSelector"
|
||||
title=""
|
||||
type="radio"
|
||||
|
@ -85,7 +85,7 @@ exports[`<ThemeChoicePanel /> custom theme should display custom theme 1`] = `
|
|||
>
|
||||
<label
|
||||
class="_label_dgy0u_67 mx_ThemeChoicePanel_themeSelector_Label"
|
||||
for="radix-49"
|
||||
for="radix-:r29:"
|
||||
>
|
||||
Light
|
||||
</label>
|
||||
|
@ -102,7 +102,7 @@ exports[`<ThemeChoicePanel /> custom theme should display custom theme 1`] = `
|
|||
>
|
||||
<input
|
||||
class="_input_1vw5h_26"
|
||||
id="radix-50"
|
||||
id="radix-:r2a:"
|
||||
name="themeSelector"
|
||||
title=""
|
||||
type="radio"
|
||||
|
@ -118,7 +118,7 @@ exports[`<ThemeChoicePanel /> custom theme should display custom theme 1`] = `
|
|||
>
|
||||
<label
|
||||
class="_label_dgy0u_67 mx_ThemeChoicePanel_themeSelector_Label"
|
||||
for="radix-50"
|
||||
for="radix-:r2a:"
|
||||
>
|
||||
Dark
|
||||
</label>
|
||||
|
@ -135,7 +135,7 @@ exports[`<ThemeChoicePanel /> custom theme should display custom theme 1`] = `
|
|||
>
|
||||
<input
|
||||
class="_input_1vw5h_26"
|
||||
id="radix-51"
|
||||
id="radix-:r2b:"
|
||||
name="themeSelector"
|
||||
title=""
|
||||
type="radio"
|
||||
|
@ -151,7 +151,7 @@ exports[`<ThemeChoicePanel /> custom theme should display custom theme 1`] = `
|
|||
>
|
||||
<label
|
||||
class="_label_dgy0u_67 mx_ThemeChoicePanel_themeSelector_Label"
|
||||
for="radix-51"
|
||||
for="radix-:r2b:"
|
||||
>
|
||||
High contrast
|
||||
</label>
|
||||
|
@ -168,7 +168,7 @@ exports[`<ThemeChoicePanel /> custom theme should display custom theme 1`] = `
|
|||
>
|
||||
<input
|
||||
class="_input_1vw5h_26"
|
||||
id="radix-52"
|
||||
id="radix-:r2c:"
|
||||
name="themeSelector"
|
||||
title=""
|
||||
type="radio"
|
||||
|
@ -184,7 +184,7 @@ exports[`<ThemeChoicePanel /> custom theme should display custom theme 1`] = `
|
|||
>
|
||||
<label
|
||||
class="_label_dgy0u_67 mx_ThemeChoicePanel_themeSelector_Label"
|
||||
for="radix-52"
|
||||
for="radix-:r2c:"
|
||||
>
|
||||
Alice theme
|
||||
</label>
|
||||
|
@ -202,7 +202,7 @@ exports[`<ThemeChoicePanel /> custom theme should display custom theme 1`] = `
|
|||
>
|
||||
<label
|
||||
class="_label_dgy0u_67"
|
||||
for="radix-54"
|
||||
for="radix-:r2d:"
|
||||
>
|
||||
Add custom theme
|
||||
</label>
|
||||
|
@ -210,9 +210,9 @@ exports[`<ThemeChoicePanel /> custom theme should display custom theme 1`] = `
|
|||
class="_controls_1h4nb_17"
|
||||
>
|
||||
<input
|
||||
aria-describedby="radix-53"
|
||||
aria-describedby="radix-:r2e:"
|
||||
class="_control_9gon8_18"
|
||||
id="radix-54"
|
||||
id="radix-:r2d:"
|
||||
name="input"
|
||||
title=""
|
||||
value=""
|
||||
|
@ -220,7 +220,7 @@ exports[`<ThemeChoicePanel /> custom theme should display custom theme 1`] = `
|
|||
</div>
|
||||
<span
|
||||
class="_message_dgy0u_98 _help-message_dgy0u_104"
|
||||
id="radix-53"
|
||||
id="radix-:r2e:"
|
||||
>
|
||||
Enter the URL of a custom theme you want to apply.
|
||||
</span>
|
||||
|
@ -240,7 +240,7 @@ exports[`<ThemeChoicePanel /> custom theme should display custom theme 1`] = `
|
|||
</span>
|
||||
<button
|
||||
aria-label="Delete"
|
||||
aria-labelledby="floating-ui-24"
|
||||
aria-labelledby=":r2f:"
|
||||
class="_icon-button_bh2qc_17 _destructive_bh2qc_83"
|
||||
role="button"
|
||||
style="--cpd-icon-button-size: 32px;"
|
||||
|
@ -309,7 +309,7 @@ exports[`<ThemeChoicePanel /> custom theme should render the custom theme sectio
|
|||
>
|
||||
<input
|
||||
class="_input_qnvru_32"
|
||||
id="radix-32"
|
||||
id="radix-:r10:"
|
||||
name="systemTheme"
|
||||
title=""
|
||||
type="checkbox"
|
||||
|
@ -324,7 +324,7 @@ exports[`<ThemeChoicePanel /> custom theme should render the custom theme sectio
|
|||
>
|
||||
<label
|
||||
class="_label_dgy0u_67"
|
||||
for="radix-32"
|
||||
for="radix-:r10:"
|
||||
>
|
||||
Match system theme
|
||||
</label>
|
||||
|
@ -346,7 +346,7 @@ exports[`<ThemeChoicePanel /> custom theme should render the custom theme sectio
|
|||
<input
|
||||
checked=""
|
||||
class="_input_1vw5h_26"
|
||||
id="radix-33"
|
||||
id="radix-:r11:"
|
||||
name="themeSelector"
|
||||
title=""
|
||||
type="radio"
|
||||
|
@ -362,7 +362,7 @@ exports[`<ThemeChoicePanel /> custom theme should render the custom theme sectio
|
|||
>
|
||||
<label
|
||||
class="_label_dgy0u_67 mx_ThemeChoicePanel_themeSelector_Label"
|
||||
for="radix-33"
|
||||
for="radix-:r11:"
|
||||
>
|
||||
Light
|
||||
</label>
|
||||
|
@ -379,7 +379,7 @@ exports[`<ThemeChoicePanel /> custom theme should render the custom theme sectio
|
|||
>
|
||||
<input
|
||||
class="_input_1vw5h_26"
|
||||
id="radix-34"
|
||||
id="radix-:r12:"
|
||||
name="themeSelector"
|
||||
title=""
|
||||
type="radio"
|
||||
|
@ -395,7 +395,7 @@ exports[`<ThemeChoicePanel /> custom theme should render the custom theme sectio
|
|||
>
|
||||
<label
|
||||
class="_label_dgy0u_67 mx_ThemeChoicePanel_themeSelector_Label"
|
||||
for="radix-34"
|
||||
for="radix-:r12:"
|
||||
>
|
||||
Dark
|
||||
</label>
|
||||
|
@ -412,7 +412,7 @@ exports[`<ThemeChoicePanel /> custom theme should render the custom theme sectio
|
|||
>
|
||||
<input
|
||||
class="_input_1vw5h_26"
|
||||
id="radix-35"
|
||||
id="radix-:r13:"
|
||||
name="themeSelector"
|
||||
title=""
|
||||
type="radio"
|
||||
|
@ -428,7 +428,7 @@ exports[`<ThemeChoicePanel /> custom theme should render the custom theme sectio
|
|||
>
|
||||
<label
|
||||
class="_label_dgy0u_67 mx_ThemeChoicePanel_themeSelector_Label"
|
||||
for="radix-35"
|
||||
for="radix-:r13:"
|
||||
>
|
||||
High contrast
|
||||
</label>
|
||||
|
@ -445,7 +445,7 @@ exports[`<ThemeChoicePanel /> custom theme should render the custom theme sectio
|
|||
>
|
||||
<input
|
||||
class="_input_1vw5h_26"
|
||||
id="radix-36"
|
||||
id="radix-:r14:"
|
||||
name="themeSelector"
|
||||
title=""
|
||||
type="radio"
|
||||
|
@ -461,7 +461,7 @@ exports[`<ThemeChoicePanel /> custom theme should render the custom theme sectio
|
|||
>
|
||||
<label
|
||||
class="_label_dgy0u_67 mx_ThemeChoicePanel_themeSelector_Label"
|
||||
for="radix-36"
|
||||
for="radix-:r14:"
|
||||
>
|
||||
Alice theme
|
||||
</label>
|
||||
|
@ -479,7 +479,7 @@ exports[`<ThemeChoicePanel /> custom theme should render the custom theme sectio
|
|||
>
|
||||
<label
|
||||
class="_label_dgy0u_67"
|
||||
for="radix-38"
|
||||
for="radix-:r15:"
|
||||
>
|
||||
Add custom theme
|
||||
</label>
|
||||
|
@ -487,9 +487,9 @@ exports[`<ThemeChoicePanel /> custom theme should render the custom theme sectio
|
|||
class="_controls_1h4nb_17"
|
||||
>
|
||||
<input
|
||||
aria-describedby="radix-37"
|
||||
aria-describedby="radix-:r16:"
|
||||
class="_control_9gon8_18"
|
||||
id="radix-38"
|
||||
id="radix-:r15:"
|
||||
name="input"
|
||||
title=""
|
||||
value=""
|
||||
|
@ -497,7 +497,7 @@ exports[`<ThemeChoicePanel /> custom theme should render the custom theme sectio
|
|||
</div>
|
||||
<span
|
||||
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.
|
||||
</span>
|
||||
|
@ -517,7 +517,7 @@ exports[`<ThemeChoicePanel /> custom theme should render the custom theme sectio
|
|||
</span>
|
||||
<button
|
||||
aria-label="Delete"
|
||||
aria-labelledby="floating-ui-1"
|
||||
aria-labelledby=":r17:"
|
||||
class="_icon-button_bh2qc_17 _destructive_bh2qc_83"
|
||||
role="button"
|
||||
style="--cpd-icon-button-size: 32px;"
|
||||
|
@ -586,7 +586,7 @@ exports[`<ThemeChoicePanel /> renders the theme choice UI 1`] = `
|
|||
>
|
||||
<input
|
||||
class="_input_qnvru_32"
|
||||
id="radix-0"
|
||||
id="radix-:r0:"
|
||||
name="systemTheme"
|
||||
title=""
|
||||
type="checkbox"
|
||||
|
@ -601,7 +601,7 @@ exports[`<ThemeChoicePanel /> renders the theme choice UI 1`] = `
|
|||
>
|
||||
<label
|
||||
class="_label_dgy0u_67"
|
||||
for="radix-0"
|
||||
for="radix-:r0:"
|
||||
>
|
||||
Match system theme
|
||||
</label>
|
||||
|
@ -623,7 +623,7 @@ exports[`<ThemeChoicePanel /> renders the theme choice UI 1`] = `
|
|||
<input
|
||||
checked=""
|
||||
class="_input_1vw5h_26"
|
||||
id="radix-1"
|
||||
id="radix-:r1:"
|
||||
name="themeSelector"
|
||||
title=""
|
||||
type="radio"
|
||||
|
@ -639,7 +639,7 @@ exports[`<ThemeChoicePanel /> renders the theme choice UI 1`] = `
|
|||
>
|
||||
<label
|
||||
class="_label_dgy0u_67 mx_ThemeChoicePanel_themeSelector_Label"
|
||||
for="radix-1"
|
||||
for="radix-:r1:"
|
||||
>
|
||||
Light
|
||||
</label>
|
||||
|
@ -656,7 +656,7 @@ exports[`<ThemeChoicePanel /> renders the theme choice UI 1`] = `
|
|||
>
|
||||
<input
|
||||
class="_input_1vw5h_26"
|
||||
id="radix-2"
|
||||
id="radix-:r2:"
|
||||
name="themeSelector"
|
||||
title=""
|
||||
type="radio"
|
||||
|
@ -672,7 +672,7 @@ exports[`<ThemeChoicePanel /> renders the theme choice UI 1`] = `
|
|||
>
|
||||
<label
|
||||
class="_label_dgy0u_67 mx_ThemeChoicePanel_themeSelector_Label"
|
||||
for="radix-2"
|
||||
for="radix-:r2:"
|
||||
>
|
||||
Dark
|
||||
</label>
|
||||
|
@ -689,7 +689,7 @@ exports[`<ThemeChoicePanel /> renders the theme choice UI 1`] = `
|
|||
>
|
||||
<input
|
||||
class="_input_1vw5h_26"
|
||||
id="radix-3"
|
||||
id="radix-:r3:"
|
||||
name="themeSelector"
|
||||
title=""
|
||||
type="radio"
|
||||
|
@ -705,7 +705,7 @@ exports[`<ThemeChoicePanel /> renders the theme choice UI 1`] = `
|
|||
>
|
||||
<label
|
||||
class="_label_dgy0u_67 mx_ThemeChoicePanel_themeSelector_Label"
|
||||
for="radix-3"
|
||||
for="radix-:r3:"
|
||||
>
|
||||
High contrast
|
||||
</label>
|
||||
|
|
|
@ -14,7 +14,7 @@ exports[`<FilteredDeviceListHeader /> renders correctly when all devices are sel
|
|||
>
|
||||
<input
|
||||
aria-label="Deselect all"
|
||||
aria-labelledby="floating-ui-6"
|
||||
aria-labelledby=":r6:"
|
||||
checked=""
|
||||
data-testid="device-select-all-checkbox"
|
||||
id="device-select-all-checkbox"
|
||||
|
@ -59,7 +59,7 @@ exports[`<FilteredDeviceListHeader /> renders correctly when no devices are sele
|
|||
>
|
||||
<input
|
||||
aria-label="Select all"
|
||||
aria-labelledby="floating-ui-1"
|
||||
aria-labelledby=":r0:"
|
||||
data-testid="device-select-all-checkbox"
|
||||
id="device-select-all-checkbox"
|
||||
type="checkbox"
|
||||
|
|
|
@ -915,7 +915,7 @@ describe("<SessionManagerTab />", () => {
|
|||
const { getByTestId, findByTestId } = render(getComponent());
|
||||
|
||||
await waitForElementToBeRemoved(() => screen.queryAllByRole("progressbar"));
|
||||
await toggleDeviceDetails(getByTestId, alicesMobileDevice.device_id);
|
||||
toggleDeviceDetails(getByTestId, alicesMobileDevice.device_id);
|
||||
|
||||
const signOutButton = await within(
|
||||
await findByTestId(`device-detail-${alicesMobileDevice.device_id}`),
|
||||
|
@ -1024,7 +1024,7 @@ describe("<SessionManagerTab />", () => {
|
|||
fireEvent.submit(getByLabelText("Password"));
|
||||
});
|
||||
|
||||
await flushPromises();
|
||||
await act(flushPromises);
|
||||
|
||||
// called again with auth
|
||||
expect(mockClient.deleteMultipleDevices).toHaveBeenCalledWith([alicesMobileDevice.device_id], {
|
||||
|
@ -1032,7 +1032,7 @@ describe("<SessionManagerTab />", () => {
|
|||
type: "m.id.user",
|
||||
user: aliceId,
|
||||
},
|
||||
password: "",
|
||||
password: "topsecret",
|
||||
type: "m.login.password",
|
||||
});
|
||||
// devices refreshed
|
||||
|
|
|
@ -58,17 +58,16 @@ describe("<VoiceUserSettingsTab />", () => {
|
|||
describe("devices", () => {
|
||||
it("renders dropdowns for input devices", async () => {
|
||||
render(getComponent());
|
||||
await flushPromises();
|
||||
|
||||
expect(screen.getByLabelText("Microphone")).toHaveDisplayValue(audioIn1.label);
|
||||
expect(screen.getByLabelText("Camera")).toHaveDisplayValue(videoIn1.label);
|
||||
await expect(screen.findByLabelText("Microphone")).resolves.toHaveDisplayValue(audioIn1.label);
|
||||
await expect(screen.findByLabelText("Camera")).resolves.toHaveDisplayValue(videoIn1.label);
|
||||
});
|
||||
|
||||
it("updates device", async () => {
|
||||
render(getComponent());
|
||||
await flushPromises();
|
||||
|
||||
fireEvent.change(screen.getByLabelText("Camera"), { target: { value: videoIn2.deviceId } });
|
||||
fireEvent.change(await screen.findByLabelText("Camera"), { target: { value: videoIn2.deviceId } });
|
||||
|
||||
expect(MediaDeviceHandlerMock.instance.setDevice).toHaveBeenCalledWith(
|
||||
videoIn2.deviceId,
|
||||
|
|
|
@ -46,7 +46,7 @@ exports[`AppearanceUserSettingsTab should render 1`] = `
|
|||
<input
|
||||
class="_input_1vw5h_26"
|
||||
disabled=""
|
||||
id="radix-0"
|
||||
id="radix-:r0:"
|
||||
name="themeSelector"
|
||||
title=""
|
||||
type="radio"
|
||||
|
@ -62,7 +62,7 @@ exports[`AppearanceUserSettingsTab should render 1`] = `
|
|||
>
|
||||
<label
|
||||
class="_label_dgy0u_67 mx_ThemeChoicePanel_themeSelector_Label"
|
||||
for="radix-0"
|
||||
for="radix-:r0:"
|
||||
>
|
||||
Light
|
||||
</label>
|
||||
|
@ -80,7 +80,7 @@ exports[`AppearanceUserSettingsTab should render 1`] = `
|
|||
<input
|
||||
class="_input_1vw5h_26"
|
||||
disabled=""
|
||||
id="radix-1"
|
||||
id="radix-:r1:"
|
||||
name="themeSelector"
|
||||
title=""
|
||||
type="radio"
|
||||
|
@ -96,7 +96,7 @@ exports[`AppearanceUserSettingsTab should render 1`] = `
|
|||
>
|
||||
<label
|
||||
class="_label_dgy0u_67 mx_ThemeChoicePanel_themeSelector_Label"
|
||||
for="radix-1"
|
||||
for="radix-:r1:"
|
||||
>
|
||||
Dark
|
||||
</label>
|
||||
|
@ -114,7 +114,7 @@ exports[`AppearanceUserSettingsTab should render 1`] = `
|
|||
<input
|
||||
class="_input_1vw5h_26"
|
||||
disabled=""
|
||||
id="radix-2"
|
||||
id="radix-:r2:"
|
||||
name="themeSelector"
|
||||
title=""
|
||||
type="radio"
|
||||
|
@ -130,7 +130,7 @@ exports[`AppearanceUserSettingsTab should render 1`] = `
|
|||
>
|
||||
<label
|
||||
class="_label_dgy0u_67 mx_ThemeChoicePanel_themeSelector_Label"
|
||||
for="radix-2"
|
||||
for="radix-:r2:"
|
||||
>
|
||||
High contrast
|
||||
</label>
|
||||
|
@ -170,7 +170,7 @@ exports[`AppearanceUserSettingsTab should render 1`] = `
|
|||
<label
|
||||
aria-label="Modern"
|
||||
class="_label_dgy0u_67"
|
||||
for="radix-3"
|
||||
for="radix-:r3:"
|
||||
>
|
||||
<div
|
||||
class="mxLayoutSwitcher_LayoutSelector_LayoutRadio_inline"
|
||||
|
@ -181,7 +181,7 @@ exports[`AppearanceUserSettingsTab should render 1`] = `
|
|||
<input
|
||||
checked=""
|
||||
class="_input_1vw5h_26"
|
||||
id="radix-3"
|
||||
id="radix-:r3:"
|
||||
name="layout"
|
||||
title=""
|
||||
type="radio"
|
||||
|
@ -297,7 +297,7 @@ exports[`AppearanceUserSettingsTab should render 1`] = `
|
|||
<label
|
||||
aria-label="Message bubbles"
|
||||
class="_label_dgy0u_67"
|
||||
for="radix-4"
|
||||
for="radix-:rc:"
|
||||
>
|
||||
<div
|
||||
class="mxLayoutSwitcher_LayoutSelector_LayoutRadio_inline"
|
||||
|
@ -307,7 +307,7 @@ exports[`AppearanceUserSettingsTab should render 1`] = `
|
|||
>
|
||||
<input
|
||||
class="_input_1vw5h_26"
|
||||
id="radix-4"
|
||||
id="radix-:rc:"
|
||||
name="layout"
|
||||
title=""
|
||||
type="radio"
|
||||
|
@ -423,7 +423,7 @@ exports[`AppearanceUserSettingsTab should render 1`] = `
|
|||
<label
|
||||
aria-label="IRC (experimental)"
|
||||
class="_label_dgy0u_67"
|
||||
for="radix-5"
|
||||
for="radix-:rl:"
|
||||
>
|
||||
<div
|
||||
class="mxLayoutSwitcher_LayoutSelector_LayoutRadio_inline"
|
||||
|
@ -433,7 +433,7 @@ exports[`AppearanceUserSettingsTab should render 1`] = `
|
|||
>
|
||||
<input
|
||||
class="_input_1vw5h_26"
|
||||
id="radix-5"
|
||||
id="radix-:rl:"
|
||||
name="layout"
|
||||
title=""
|
||||
type="radio"
|
||||
|
@ -557,9 +557,9 @@ exports[`AppearanceUserSettingsTab should render 1`] = `
|
|||
class="_container_qnvru_18"
|
||||
>
|
||||
<input
|
||||
aria-describedby="radix-6"
|
||||
aria-describedby="radix-:rv:"
|
||||
class="_input_qnvru_32"
|
||||
id="radix-7"
|
||||
id="radix-:ru:"
|
||||
name="compactLayout"
|
||||
title=""
|
||||
type="checkbox"
|
||||
|
@ -574,13 +574,13 @@ exports[`AppearanceUserSettingsTab should render 1`] = `
|
|||
>
|
||||
<label
|
||||
class="_label_dgy0u_67"
|
||||
for="radix-7"
|
||||
for="radix-:ru:"
|
||||
>
|
||||
Show compact text and messages
|
||||
</label>
|
||||
<span
|
||||
class="_message_dgy0u_98 _help-message_dgy0u_104"
|
||||
id="radix-6"
|
||||
id="radix-:rv:"
|
||||
>
|
||||
Modern layout must be selected to use this feature.
|
||||
</span>
|
||||
|
|
|
@ -129,7 +129,6 @@ exports[`<SecurityUserSettingsTab /> renders security section 1`] = `
|
|||
</th>
|
||||
<td>
|
||||
not found locally
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
|
|
@ -370,7 +370,7 @@ exports[`<SessionManagerTab /> goes to filtered list from security recommendatio
|
|||
>
|
||||
<input
|
||||
aria-label="Select all"
|
||||
aria-labelledby="floating-ui-142"
|
||||
aria-labelledby=":r4e:"
|
||||
data-testid="device-select-all-checkbox"
|
||||
id="device-select-all-checkbox"
|
||||
type="checkbox"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue