Migrate to React 18 createRoot API #319
Annotations
10 errors
Run tests:
test/unit-tests/components/views/settings/tabs/user/SessionManagerTab-test.tsx#L916
expect(element).toHaveAttribute("aria-disabled", "true") // element.getAttribute("aria-disabled") === "true"
Expected the element to have attribute:
aria-disabled="true"
Received:
null
Ignored nodes: comments, script, style
<html>
<head />
<body>
<div
id="mx_Dialog_Container"
/>
<div
id="mx_Dialog_StaticContainer"
/>
<div
id="mx_Dialog_Container"
/>
<div
id="mx_Dialog_StaticContainer"
/>
<div
id="mx_Dialog_Container"
/>
<div
id="mx_Dialog_StaticContainer"
/>
<div
id="mx_Dialog_Container"
/>
<div
id="mx_Dialog_StaticContainer"
/>
<div
id="mx_Dialog_Container"
/>
<div
id="mx_Dialog_StaticContainer"
/>
<div
id="mx_Dialog_Container"
/>
<div
id="mx_Dialog_StaticContainer"
/>
<div
id="mx_Dialog_Container"
/>
<div
id="mx_Dialog_StaticContainer"
/>
<div
id="mx_Dialog_Container"
/>
<div
id="mx_Dialog_StaticContainer"
/>
<div
id="mx_ContextualMenu_Container"
/>
<div
id="mx_Dialog_Container"
/>
<div
id="mx_Dialog_StaticContainer"
/>
<div
id="mx_Dialog_Container"
/>
<div
id="mx_Dialog_StaticContainer"
/>
<div
id="mx_Dialog_StaticContainer"
/>
<div
id="mx_Dialog_Container"
/>
<div
id="mx_Dialog_StaticContainer"
/>
<div
id="mx_Dialog_StaticContainer"
/>
<div
id="mx_Dialog_Container"
/>
<div
id="mx_Dialog_StaticContainer"
/>
<div>
<div
class="mx_SettingsTab"
>
<div
class="mx_SettingsTab_sections"
>
<div
class="mx_SettingsSection"
>
<div
class="mx_SettingsSection_subSections"
>
<div
class="mx_SettingsSubsection"
>
<div
class="mx_SettingsSubsectionHeading"
>
<h3
class="mx_Heading_h4 mx_SettingsSubsectionHeading_heading"
>
Link new device
</h3>
</div>
<div
class="mx_SettingsSubsection_content"
>
<div
class="mx_LoginWithQRSection"
>
<p
class="mx_SettingsTab_subsectionText"
>
Use a QR code to sign in to another device and set up secure messaging.
</p>
<div
aria-disabled="true"
class="mx_AccessibleButton mx_AccessibleButton_hasKind mx_AccessibleButton_kind_primary mx_AccessibleButton_disabled"
disabled=""
role="button"
tabindex="0"
>
<svg
fill="currentColor"
height="20"
viewBox="0 0 24 24"
width="20"
xmlns="http://www.w3.org/2000/svg"
>
<path
clip-rule="evenodd"
d="M3 4a1 1 0 0 1 1-1h6a1 1 0 0 1 1 1v6a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V4Zm2 5V5h4v4H5Zm-2 5a1 1 0 0 1 1-1h6a1 1 0 0 1 1 1v6a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1v-6Zm2 5v-4h4v4H5Zm9-16a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h6a1 1 0 0 0 1-1V4a1 1 0 0 0-1-1h-6Zm1 2v4h4V5h-4Z"
fill-rule="evenodd"
/>
<path
d="M15 16v-3h-2v3h2Z"
/>
<path
d="M17 16h-2v2h-2v3h2v-3h2v2h4v-2h-2v-5h-2v3Z"
/>
</svg>
Show QR code
</div>
<p
class
|
Run tests:
test/unit-tests/components/structures/RoomView-test.tsx#L522
Unable to find an element with the text: Are you sure you're at the right place?. This could be because the text is broken up by multiple elements. In this case, you can provide a function for your text matcher to make your matcher more flexible.
Ignored nodes: comments, script, style
<body>
<div />
</body>
at waitForWrapper (node_modules/@testing-library/dom/dist/wait-for.js:163:27)
at node_modules/@testing-library/dom/dist/query-helpers.js:86:33
at Object.findByText (test/unit-tests/components/structures/RoomView-test.tsx:522:15)
|
Run tests:
test/unit-tests/components/structures/RoomView-test.tsx#L540
TestingLibraryElementError: Unable to find an accessible element with the role "button" and name "Request access"
There are no accessible roles. But there might be some inaccessible roles. If you wish to access them, then set the `hidden` option to `true`. Learn more about this here: https://testing-library.com/docs/dom-testing-library/api-queries#byrole
Ignored nodes: comments, script, style
<body>
<div />
</body>
at Object.getElementError (node_modules/@testing-library/dom/dist/config.js:37:19)
at node_modules/@testing-library/dom/dist/query-helpers.js:76:38
at node_modules/@testing-library/dom/dist/query-helpers.js:52:17
at node_modules/@testing-library/dom/dist/query-helpers.js:95:19
at Object.getByRole (test/unit-tests/components/structures/RoomView-test.tsx:540:36)
|
Run tests:
test/unit-tests/components/structures/RoomView-test.tsx#L556
TestingLibraryElementError: Unable to find an accessible element with the role "button" and name "Cancel request"
There are no accessible roles. But there might be some inaccessible roles. If you wish to access them, then set the `hidden` option to `true`. Learn more about this here: https://testing-library.com/docs/dom-testing-library/api-queries#byrole
Ignored nodes: comments, script, style
<body>
<div />
</body>
at Object.getElementError (node_modules/@testing-library/dom/dist/config.js:37:19)
at node_modules/@testing-library/dom/dist/query-helpers.js:76:38
at node_modules/@testing-library/dom/dist/query-helpers.js:52:17
at node_modules/@testing-library/dom/dist/query-helpers.js:95:19
at Object.getByRole (test/unit-tests/components/structures/RoomView-test.tsx:556:36)
|
Run tests:
test/unit-tests/components/structures/RoomView-test.tsx#L571
TypeError: Cannot read properties of null (reading 'setState')
at Object.setState (test/unit-tests/components/structures/RoomView-test.tsx:571:30)
|
Run tests:
test/unit-tests/components/structures/RoomView-test.tsx#L632
TypeError: Cannot read properties of null (reading 'setState')
at Object.setState (test/unit-tests/components/structures/RoomView-test.tsx:632:30)
|
Run tests:
test/unit-tests/components/structures/RoomView-test.tsx#L685
expect(jest.fn()).toHaveBeenCalledWith(...expected)
Expected: {"action": "room_loaded"}
Received
1
Object {
- "action": "room_loaded",
+ "action": "view_room",
+ "metricsTrigger": undefined,
+ "room_id": "!28:example.org",
},
2
Object {
- "action": "room_loaded",
+ "action": "active_room_changed",
+ "newRoomId": "!28:example.org",
+ "oldRoomId": "!26:example.org",
},
3
Object {
- "action": "room_loaded",
+ "action": "active_room_changed",
+ "newRoomId": "!28:example.org",
+ "oldRoomId": "!26:example.org",
},
Number of calls: 30
at Object.toHaveBeenCalledWith (test/unit-tests/components/structures/RoomView-test.tsx:685:30)
|
Run tests:
test/unit-tests/utils/exportUtils/HTMLExport-test.ts#L221
expect(received).toMatchSnapshot()
Snapshot name: `HTMLExport should export 1`
- Snapshot - 1
+ Received + 1
@@ -57,11 +57,11 @@
<h2> !myroom:example.org </h2>
<p> created this room. <br/><br/> <p><span>This is the start of export of <strong>!myroom:example.org</strong>. Exported by <a href="https://matrix.to/#/%40userId%3Amatrix.org" target="_blank" rel="noopener noreferrer"><strong>@userid:matrix.org</strong></a> at 11/17/2022.</span></p> </p>
<br/>
<p> </p>
</div>
- <li><div class="mx_TimelineSeparator" role="separator" aria-label="Thu, Jan 1, 1970"><hr role="none"/><div class="mx_DateSeparator_dateContent"><h2 class="mx_DateSeparator_dateHeading" aria-hidden="true">Thu, Jan 1, 1970</h2></div><hr role="none"/></div></li><div class="mx_Export_EventWrapper" id="49"><li class="mx_EventTile" tabindex="-1" aria-live="off" aria-atomic="true" data-scroll-tokens="49" data-layout="group" data-self="false" data-event-id="49" data-has-reply="false"><div class="mx_DisambiguatedProfile"><span class="mx_Username_color4 mx_DisambiguatedProfile_displayName" dir="auto">@User49:example.com</span></div><div class="mx_EventTile_avatar"><button role="button" aria-label="Profile picture" title="@User49:example.com" aria-live="off" data-testid="avatar-img" data-type="round" data-color="4" class="_avatar_mcap2_17 mx_BaseAvatar _avatar-imageless_mcap2_61" style="--cpd-avatar-size: 30px;">u</button></div><div class="mx_EventTile_line"><a href="https://matrix.to/#/!myroom:example.org/49" aria-label="00:00"><span class="mx_MessageTimestamp" aria-hidden="true" aria-live="off">00:00</span></a><div class="mx_MTextBody mx_EventTile_content"><div class="mx_EventTile_body translate" dir="auto">Message #49</div></div></div></li></div><div class="mx_Export_EventWrapper" id="48"><li class="mx_EventTile" tabindex="-1" aria-live="off" aria-atomic="true" data-scroll-tokens="48" data-layout="group" data-self="false" data-event-id="48" data-has-reply="false"><div class="mx_DisambiguatedProfile"><span class="mx_Username_color3 mx_DisambiguatedProfile_displayName" dir="auto">@user48:example.com</span></div><div class="mx_EventTile_avatar"><button role="button" aria-label="Profile picture" title="@user48:example.com" aria-live="off" data-testid="avatar-img" data-type="round" data-color="3" class="_avatar_mcap2_17 mx_BaseAvatar _avatar-imageless_mcap2_61" style="--cpd-avatar-size: 30px;">u</button></div><div class="mx_EventTile_line"><a href="https://matrix.to/#/!myroom:example.org/48" aria-label="00:00"><span class="mx_MessageTimestamp" aria-hidden="true" aria-live="off">00:00</span></a><div class="mx_MTextBody mx_EventTile_content"><div class="mx_EventTile_body translate" dir="auto">Message #48</div></div></div></li></div><div class="mx_Export_EventWrapper" id="47"><li class="mx_EventTile" tabindex="-1" aria-live="off" aria-atomic="true" data-scroll-tokens="47" data-layout="group" data-self="false" data-event-id="47" data-has-reply="false"><div class="mx_DisambiguatedProfile"><span class="mx_Username_color2 mx_DisambiguatedProfile_displayName" dir="auto">@User47:example.com</span></div><div class="mx_EventTile_avatar"><button role="button" aria-label="Profile picture" title="@User47:example.com" aria-live="off" data-testid="avatar-img" data-type="round" data-color="2" class="_avatar_mcap2_17 mx_BaseAvatar _avatar-imageless_mcap2_61" style="--cpd-avatar-size: 30px;">u</button></div><div class="mx_EventTile_line"><a href="https://matrix.to/#/!myroom:example.org/47" aria-label="00:00"><span class="mx_MessageTimestamp" aria-hidden="true" aria-live="off">00:00</span></a><div class="mx_MTextBody mx_EventTile_content"><div class="mx_EventTile_body translate" dir="auto">Message #47</div></div></div></li></div><div class="mx_Export_EventWrapper" id="46"><li class="mx_EventTile" tabindex="-1" aria-live="off
|
Run tests:
test/unit-tests/utils/exportUtils/HTMLExport-test.ts#L368
expect(received).toContain(expected) // indexOf
Expected substring: "Message with no sender"
Received string: "
<!DOCTYPE html>
<html lang=\"en\">
<head>
<meta charset=\"UTF-8\" />
<meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\" />
<meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\" />
<link href=\"css/style.css\" rel=\"stylesheet\" />
<script src=\"js/script.js\"></script>
<title>Exported Data</title>
</head>
<body style=\"height: 100vh;\" class=\"cpd-theme-light\">
<div id=\"matrixchat\" style=\"height: 100%; overflow: auto\">
<div class=\"mx_MatrixChat_wrapper\" aria-hidden=\"false\">
<div class=\"mx_MatrixChat\">
<main class=\"mx_RoomView\">
<div class=\"mx_LegacyRoomHeader light-panel\">
<div class=\"mx_LegacyRoomHeader_wrapper\" aria-owns=\"mx_RightPanel\">
<div class=\"mx_LegacyRoomHeader_avatar\">
<div class=\"mx_DecoratedRoomAvatar\">
<span role=\"presentation\" title=\"!myroom:example.org\" data-testid=\"avatar-img\" data-type=\"round\" data-color=\"1\" class=\"_avatar_mcap2_17 mx_BaseAvatar _avatar-imageless_mcap2_61\" style=\"--cpd-avatar-size:32px\">!</span>
</div>
</div>
<div class=\"mx_LegacyRoomHeader_name\">
<div
dir=\"auto\"
class=\"mx_LegacyRoomHeader_nametext\"
title=\"!myroom:example.org\"
>
!myroom:example.org
</div>
</div>
<div class=\"mx_LegacyRoomHeader_topic\" dir=\"auto\"> </div>
</div>
</div>·····························
<div class=\"mx_MainSplit\">
<div class=\"mx_RoomView_body\">
<div
class=\"mx_RoomView_timeline mx_RoomView_timeline_rr_enabled\"
>
<div
class=\"
mx_AutoHideScrollbar
mx_ScrollPanel
mx_RoomView_messagePanel
\"
>
<div class=\"mx_RoomView_messageListWrapper\">
<ol
class=\"mx_RoomView_MessageList\"
aria-live=\"polite\"
role=\"list\"
>
<div class=\"mx_NewRoomIntro\">
<span role=\"presentation\" title=\"!myroom:example.org\" data-testid=\"avatar-img\" data-type=\"round\" data-color=\"1\" class=\"_avatar_mcap2_17 mx_BaseAvatar _avatar-imageless_mcap2_61\" style=\"--cpd-avatar-size:32px\">!</span>
<h2> !myroom:example.org </h2>
<p> created this room. <br/><br/> <p><span>This is the start of export of <strong>!myroom:example.org</strong>. Exported by <a href=\"https://matrix.to/#/%40userId%3Amatrix.org\" target=\"_blank\" rel=\"noopener noreferrer\"><strong>@userid:matrix.org</strong></a> at 11/17/2022.</span></p> </p>
<br/>
<p> </p>
|
Run tests:
test/unit-tests/utils/exportUtils/HTMLExport-test.ts#L622
expect(received).toContain(expected) // indexOf
Expected substring: "testing testing"
Received string: "
<!DOCTYPE html>
<html lang=\"en\">
<head>
<meta charset=\"UTF-8\" />
<meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\" />
<meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\" />
<link href=\"css/style.css\" rel=\"stylesheet\" />
<script src=\"js/script.js\"></script>
<title>Exported Data</title>
</head>
<body style=\"height: 100vh;\" class=\"cpd-theme-light\">
<div id=\"matrixchat\" style=\"height: 100%; overflow: auto\">
<div class=\"mx_MatrixChat_wrapper\" aria-hidden=\"false\">
<div class=\"mx_MatrixChat\">
<main class=\"mx_RoomView\">
<div class=\"mx_LegacyRoomHeader light-panel\">
<div class=\"mx_LegacyRoomHeader_wrapper\" aria-owns=\"mx_RightPanel\">
<div class=\"mx_LegacyRoomHeader_avatar\">
<div class=\"mx_DecoratedRoomAvatar\">
<span role=\"presentation\" title=\"!myroom:example.org\" data-testid=\"avatar-img\" data-type=\"round\" data-color=\"1\" class=\"_avatar_mcap2_17 mx_BaseAvatar _avatar-imageless_mcap2_61\" style=\"--cpd-avatar-size:32px\">!</span>
</div>
</div>
<div class=\"mx_LegacyRoomHeader_name\">
<div
dir=\"auto\"
class=\"mx_LegacyRoomHeader_nametext\"
title=\"!myroom:example.org\"
>
!myroom:example.org
</div>
</div>
<div class=\"mx_LegacyRoomHeader_topic\" dir=\"auto\"> </div>
</div>
</div>·····························
<div class=\"mx_MainSplit\">
<div class=\"mx_RoomView_body\">
<div
class=\"mx_RoomView_timeline mx_RoomView_timeline_rr_enabled\"
>
<div
class=\"
mx_AutoHideScrollbar
mx_ScrollPanel
mx_RoomView_messagePanel
\"
>
<div class=\"mx_RoomView_messageListWrapper\">
<ol
class=\"mx_RoomView_MessageList\"
aria-live=\"polite\"
role=\"list\"
>
<div class=\"mx_NewRoomIntro\">
<span role=\"presentation\" title=\"!myroom:example.org\" data-testid=\"avatar-img\" data-type=\"round\" data-color=\"1\" class=\"_avatar_mcap2_17 mx_BaseAvatar _avatar-imageless_mcap2_61\" style=\"--cpd-avatar-size:32px\">!</span>
<h2> !myroom:example.org </h2>
<p> created this room. <br/><br/> <p><span>This is the start of export of <strong>!myroom:example.org</strong>. Exported by <a href=\"https://matrix.to/#/%40userId%3Amatrix.org\" target=\"_blank\" rel=\"noopener noreferrer\"><strong>@userid:matrix.org</strong></a> at 11/17/2022.</span></p> </p>
<br/>
<p> </p>
|
Loading