Migrate to React 18 createRoot API #319
Annotations
21 errors
<UserInfo /> › with crypto enabled › should render a deactivate button for users of the same server if we are a server admin:
test/unit-tests/components/views/right_panel/UserInfo-test.tsx#L657
expect(received).toMatchSnapshot()
Snapshot name: `<UserInfo /> with crypto enabled should render a deactivate button for users of the same server if we are a server admin 1`
- Snapshot - 7
+ Received + 18
@@ -117,20 +117,20 @@
</h2>
<p>
Messages in this room are not end-to-end encrypted.
</p>
<div
- class="mx_UserInfo_container_verifyButton"
+ class="mx_Spinner"
>
<div
- class="mx_AccessibleButton mx_UserInfo_field mx_UserInfo_verifyButton mx_AccessibleButton_hasKind mx_AccessibleButton_kind_link"
- role="button"
- tabindex="0"
- >
- Verify
+ aria-label="Loading…"
+ class="mx_Spinner_icon"
+ data-testid="spinner"
+ role="progressbar"
+ style="width: 32px; height: 32px;"
+ />
</div>
- </div>
<div
class="mx_UserInfo_devices"
>
<div />
<div>
@@ -344,9 +344,20 @@
<path
d="M8.7 17.3a.948.948 0 0 1-.275-.7.95.95 0 0 1 .275-.7l3.9-3.9-3.9-3.9a.948.948 0 0 1-.275-.7.95.95 0 0 1 .275-.7.948.948 0 0 1 .7-.275.95.95 0 0 1 .7.275l4.6 4.6c.1.1.17.208.213.325.041.117.062.242.062.375s-.02.258-.063.375a.877.877 0 0 1-.212.325l-4.6 4.6a.948.948 0 0 1-.7.275.948.948 0 0 1-.7-.275Z"
/>
</svg>
</button>
+ </div>
+ <div
+ class="mx_Spinner"
+ >
+ <div
+ aria-label="Loading…"
+ class="mx_Spinner_icon"
+ data-testid="spinner"
+ role="progressbar"
+ style="width: 32px; height: 32px;"
+ />
</div>
</div>
</div>
</div>
at Object.toMatchSnapshot (test/unit-tests/components/views/right_panel/UserInfo-test.tsx:657:31)
|
MessageComposer › wysiwyg correctly persists state to and from localStorage:
test/unit-tests/components/views/rooms/MessageComposer-test.tsx#L460
expect(element).toHaveTextContent()
Expected element to have text content:
Test Text
Received:
Hello
Ignored nodes: comments, script, style
<html>
<head />
<body>
<div
id="mx_ContextualMenu_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
aria-label="Message composer"
class="mx_MessageComposer"
role="region"
>
<div
class="mx_MessageComposer_wrapper"
>
<div
class="mx_MessageComposer_row"
>
<div
class="mx_SendMessageComposer"
>
<div
class="mx_BasicMessageComposer"
>
<div
aria-label="Formatting"
class="mx_MessageComposerFormatBar"
role="toolbar"
>
<button
aria-label="Bold"
class="mx_AccessibleButton mx_MessageComposerFormatBar_button mx_MessageComposerFormatBar_buttonIconBold"
role="button"
tabindex="0"
type="button"
/>
<button
aria-label="Italics"
class="mx_AccessibleButton mx_MessageComposerFormatBar_button mx_MessageComposerFormatBar_buttonIconItalic"
role="button"
tabindex="-1"
type="button"
/>
<button
aria-label="Strikethrough"
class="mx_AccessibleButton mx_MessageComposerFormatBar_button mx_MessageComposerFormatBar_buttonIconStrikethrough"
role="button"
tabindex="-1"
type="button"
/>
<button
aria-label="Code block"
class="mx_AccessibleButton mx_MessageComposerFormatBar_button mx_MessageComposerFormatBar_buttonIconCode"
role="button"
tabindex="-1"
type="button"
/>
<button
aria-label="Quote"
class="mx_AccessibleButton mx_MessageComposerFormatBar_button mx_MessageComposerFormatBar_buttonIconQuote"
role="button"
tabindex="-1"
type="button"
/>
<button
aria-label="Insert link"
class="mx_AccessibleButton mx_MessageComposerFormatBar_button mx_MessageComposerFormatBar_buttonIconInsertLink"
role="button"
tabindex="-1"
type="button"
/>
</div>
<div
aria-autocomplete="list"
aria-disabled="false"
aria-haspopup="listbox"
aria-label="Send a message…"
aria-multiline="true"
class="mx_BasicMessageComposer_input mx_BasicMessageComposer_input_shouldShowPillAvatar"
contenteditable="true"
data-testid="basicmessagecomposer"
dir="auto"
role="textbox"
tabindex="0"
translate="no"
>
<div>
Hello
</div>
</div>
</div>
</div>
<div
class="mx_MessageComposer_actions"
>
<div
aria-label="Hide formatting"
|
TimelinePanel › read receipts and markers › when there is a non-threaded timeline › and reading the timeline › should send a fully read marker and a public receipt:
test/unit-tests/components/structures/TimelinePanel-test.tsx#L267
expect(jest.fn()).toHaveBeenCalledWith(...expected)
Expected: "#room:example.com", "ev1"
Number of calls: 0
at Object.toHaveBeenCalledWith (test/unit-tests/components/structures/TimelinePanel-test.tsx:267:55)
|
TimelinePanel › read receipts and markers › when there is a non-threaded timeline › and reading the timeline › and reading the timeline again › and forgetting the read markers:
test/unit-tests/components/structures/TimelinePanel-test.tsx#L293
expect(jest.fn()).toHaveBeenCalledWith(...expected)
Expected: "#room:example.com", "ev2"
Number of calls: 0
at Object.toHaveBeenCalledWith (test/unit-tests/components/structures/TimelinePanel-test.tsx:293:59)
|
TimelinePanel › read receipts and markers › when there is a non-threaded timeline › and sending receipts is disabled › should send a fully read marker and a private receipt:
test/unit-tests/components/structures/TimelinePanel-test.tsx#L335
expect(jest.fn()).toHaveBeenCalledWith(...expected)
Expected: "#room:example.com", "ev1"
Number of calls: 0
at Object.toHaveBeenCalledWith (test/unit-tests/components/structures/TimelinePanel-test.tsx:335:55)
|
MemberList › memberlist is rendered correctly › Invite button › renders disabled invite button when current user is a member but does not have rights to invite:
test/unit-tests/components/views/rooms/MemberList-test.tsx#L404
TestingLibraryElementError: Found multiple elements with the text: Invite to this room
Here are the matching elements:
Ignored nodes: comments, script, style
<button
aria-disabled="true"
aria-labelledby=":rbd:"
class="_button_i91xf_17 mx_MemberList_invite"
data-kind="secondary"
data-size="sm"
role="button"
tabindex="0"
>
<svg
fill="currentColor"
height="1em"
viewBox="0 0 24 24"
width="1em"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M10 12c-1.1 0-2.042-.392-2.825-1.175C6.392 10.042 6 9.1 6 8s.392-2.042 1.175-2.825C7.958 4.392 8.9 4 10 4s2.042.392 2.825 1.175C13.608 5.958 14 6.9 14 8s-.392 2.042-1.175 2.825C12.042 11.608 11.1 12 10 12Zm-8 6v-.8c0-.567.146-1.087.438-1.563A2.911 2.911 0 0 1 3.6 14.55a14.843 14.843 0 0 1 3.15-1.163A13.76 13.76 0 0 1 10 13c1.1 0 2.183.13 3.25.387 1.067.259 2.117.646 3.15 1.163.483.25.87.612 1.163 1.087.291.476.437.996.437 1.563v.8c0 .55-.196 1.02-.587 1.413A1.926 1.926 0 0 1 16 20H4c-.55 0-1.02-.196-1.413-.587A1.926 1.926 0 0 1 2 18Zm15-7h2v2c0 .283.096.52.288.713.191.191.429.287.712.287s.52-.096.712-.287A.968.968 0 0 0 21 13v-2h2a.97.97 0 0 0 .712-.287A.968.968 0 0 0 24 10a.967.967 0 0 0-.288-.713A.968.968 0 0 0 23 9h-2V7a.967.967 0 0 0-.288-.713A.968.968 0 0 0 20 6a.968.968 0 0 0-.712.287A.967.967 0 0 0 19 7v2h-2a.968.968 0 0 0-.712.287A.967.967 0 0 0 16 10c0 .283.096.52.288.713A.968.968 0 0 0 17 11Z"
/>
</svg>
Invite to this room
</button>
Ignored nodes: comments, script, style
<button
aria-disabled="true"
aria-labelledby=":rb7:"
class="_button_i91xf_17 mx_MemberList_invite"
data-kind="secondary"
data-size="sm"
role="button"
tabindex="0"
>
<svg
fill="currentColor"
height="1em"
viewBox="0 0 24 24"
width="1em"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M10 12c-1.1 0-2.042-.392-2.825-1.175C6.392 10.042 6 9.1 6 8s.392-2.042 1.175-2.825C7.958 4.392 8.9 4 10 4s2.042.392 2.825 1.175C13.608 5.958 14 6.9 14 8s-.392 2.042-1.175 2.825C12.042 11.608 11.1 12 10 12Zm-8 6v-.8c0-.567.146-1.087.438-1.563A2.911 2.911 0 0 1 3.6 14.55a14.843 14.843 0 0 1 3.15-1.163A13.76 13.76 0 0 1 10 13c1.1 0 2.183.13 3.25.387 1.067.259 2.117.646 3.15 1.163.483.25.87.612 1.163 1.087.291.476.437.996.437 1.563v.8c0 .55-.196 1.02-.587 1.413A1.926 1.926 0 0 1 16 20H4c-.55 0-1.02-.196-1.413-.587A1.926 1.926 0 0 1 2 18Zm15-7h2v2c0 .283.096.52.288.713.191.191.429.287.712.287s.52-.096.712-.287A.968.968 0 0 0 21 13v-2h2a.97.97 0 0 0 .712-.287A.968.968 0 0 0 24 10a.967.967 0 0 0-.288-.713A.968.968 0 0 0 23 9h-2V7a.967.967 0 0 0-.288-.713A.968.968 0 0 0 20 6a.968.968 0 0 0-.712.287A.967.967 0 0 0 19 7v2h-2a.968.968 0 0 0-.712.287A.967.967 0 0 0 16 10c0 .283.096.52.288.713A.968.968 0 0 0 17 11Z"
/>
</svg>
Invite to this room
</button>
(If this is intentional, then use the `*AllBy*` variant of the query (like `queryAllByText`, `getAllByText`, or `findAllByText`)).
Ignored nodes: comments, script, style
<body>
<div>
<div
aria-labelledby="memberlist-panel-tab"
class="mx_BaseCard mx_MemberList"
id="memberlist-panel"
role="tabpanel"
>
<div
class="mx_BaseCard_header"
>
<div
class="mx_BaseCard_header_title"
>
<p
class="_typography_yh5dq_162 _font-body-md-medium_yh5dq_69 mx_BaseCard_header_title_heading"
role="heading"
>
People
</p>
</div>
<button
aria-labelledby=":ram:"
class="_icon-button_bh2qc_17 _subtle-bg_bh2qc_38"
data-testid="base-card-close-button"
role="button"
style="--cpd-icon-button-size: 28px;"
tabindex="0"
>
<div
class="_indicator-icon_133tf_26"
style="--cpd-icon-button-size: 100%;"
>
<svg
fill="currentColor"
height="1em"
viewBox="0 0 24 24"
width="1em"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M6.293 6.293a1 1 0 0
|
MemberList › memberlist is rendered correctly › Invite button › renders enabled invite button when current user is a member and has rights to invite:
test/unit-tests/components/views/rooms/MemberList-test.tsx#L414
TestingLibraryElementError: Found multiple elements with the text: Invite to this room
Here are the matching elements:
Ignored nodes: comments, script, style
<button
aria-disabled="true"
aria-labelledby=":rcn:"
class="_button_i91xf_17 mx_MemberList_invite"
data-kind="secondary"
data-size="sm"
role="button"
tabindex="0"
>
<svg
fill="currentColor"
height="1em"
viewBox="0 0 24 24"
width="1em"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M10 12c-1.1 0-2.042-.392-2.825-1.175C6.392 10.042 6 9.1 6 8s.392-2.042 1.175-2.825C7.958 4.392 8.9 4 10 4s2.042.392 2.825 1.175C13.608 5.958 14 6.9 14 8s-.392 2.042-1.175 2.825C12.042 11.608 11.1 12 10 12Zm-8 6v-.8c0-.567.146-1.087.438-1.563A2.911 2.911 0 0 1 3.6 14.55a14.843 14.843 0 0 1 3.15-1.163A13.76 13.76 0 0 1 10 13c1.1 0 2.183.13 3.25.387 1.067.259 2.117.646 3.15 1.163.483.25.87.612 1.163 1.087.291.476.437.996.437 1.563v.8c0 .55-.196 1.02-.587 1.413A1.926 1.926 0 0 1 16 20H4c-.55 0-1.02-.196-1.413-.587A1.926 1.926 0 0 1 2 18Zm15-7h2v2c0 .283.096.52.288.713.191.191.429.287.712.287s.52-.096.712-.287A.968.968 0 0 0 21 13v-2h2a.97.97 0 0 0 .712-.287A.968.968 0 0 0 24 10a.967.967 0 0 0-.288-.713A.968.968 0 0 0 23 9h-2V7a.967.967 0 0 0-.288-.713A.968.968 0 0 0 20 6a.968.968 0 0 0-.712.287A.967.967 0 0 0 19 7v2h-2a.968.968 0 0 0-.712.287A.967.967 0 0 0 16 10c0 .283.096.52.288.713A.968.968 0 0 0 17 11Z"
/>
</svg>
Invite to this room
</button>
Ignored nodes: comments, script, style
<button
aria-disabled="false"
class="_button_i91xf_17 mx_MemberList_invite"
data-kind="secondary"
data-size="sm"
role="button"
tabindex="0"
>
<svg
fill="currentColor"
height="1em"
viewBox="0 0 24 24"
width="1em"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M10 12c-1.1 0-2.042-.392-2.825-1.175C6.392 10.042 6 9.1 6 8s.392-2.042 1.175-2.825C7.958 4.392 8.9 4 10 4s2.042.392 2.825 1.175C13.608 5.958 14 6.9 14 8s-.392 2.042-1.175 2.825C12.042 11.608 11.1 12 10 12Zm-8 6v-.8c0-.567.146-1.087.438-1.563A2.911 2.911 0 0 1 3.6 14.55a14.843 14.843 0 0 1 3.15-1.163A13.76 13.76 0 0 1 10 13c1.1 0 2.183.13 3.25.387 1.067.259 2.117.646 3.15 1.163.483.25.87.612 1.163 1.087.291.476.437.996.437 1.563v.8c0 .55-.196 1.02-.587 1.413A1.926 1.926 0 0 1 16 20H4c-.55 0-1.02-.196-1.413-.587A1.926 1.926 0 0 1 2 18Zm15-7h2v2c0 .283.096.52.288.713.191.191.429.287.712.287s.52-.096.712-.287A.968.968 0 0 0 21 13v-2h2a.97.97 0 0 0 .712-.287A.968.968 0 0 0 24 10a.967.967 0 0 0-.288-.713A.968.968 0 0 0 23 9h-2V7a.967.967 0 0 0-.288-.713A.968.968 0 0 0 20 6a.968.968 0 0 0-.712.287A.967.967 0 0 0 19 7v2h-2a.968.968 0 0 0-.712.287A.967.967 0 0 0 16 10c0 .283.096.52.288.713A.968.968 0 0 0 17 11Z"
/>
</svg>
Invite to this room
</button>
(If this is intentional, then use the `*AllBy*` variant of the query (like `queryAllByText`, `getAllByText`, or `findAllByText`)).
Ignored nodes: comments, script, style
<body>
<div
data-floating-ui-portal=""
id=":rb5:"
/>
<div>
<div
aria-labelledby="memberlist-panel-tab"
class="mx_BaseCard mx_MemberList"
id="memberlist-panel"
role="tabpanel"
>
<div
class="mx_BaseCard_header"
>
<div
class="mx_BaseCard_header_title"
>
<p
class="_typography_yh5dq_162 _font-body-md-medium_yh5dq_69 mx_BaseCard_header_title_heading"
role="heading"
>
People
</p>
</div>
<button
aria-labelledby=":rcb:"
class="_icon-button_bh2qc_17 _subtle-bg_bh2qc_38"
data-testid="base-card-close-button"
role="button"
style="--cpd-icon-button-size: 28px;"
tabindex="0"
>
<div
class="_indicator-icon_133tf_26"
style="--cpd-icon-button-size: 100%;"
>
<svg
fill="currentColor"
height="1em"
viewBox="0 0 24 24"
width="1em"
xmlns="http://www.w3.org/2000/svg"
>
<path
|
AppTile › destroys non-persisted right panel widget on room change:
test/unit-tests/components/views/elements/AppTile-test.tsx#L173
TestingLibraryElementError: Unable to find an element with the text: Example 1. 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>
<aside
class="mx_RightPanel"
id="mx_RightPanel"
>
<div />
</aside>
</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.getByText (test/unit-tests/components/views/elements/AppTile-test.tsx:173:29)
|
AppTile › distinguishes widgets with the same ID in different rooms:
test/unit-tests/components/views/elements/AppTile-test.tsx#L205
thrown: "Exceeded timeout of 5000 ms for a test.
Add a timeout value to this test to increase the timeout, if this is a long-running test. See https://jestjs.io/docs/api#testname-fn-timeout."
at it (test/unit-tests/components/views/elements/AppTile-test.tsx:205:5)
at Object.describe (test/unit-tests/components/views/elements/AppTile-test.tsx:56:1)
|
AppTile › for a pinned widget › should render:
test/unit-tests/components/views/elements/AppTile-test.tsx#L363
expect(received).toBeFalsy()
Received: <div class="mx_Spinner"><div class="mx_Spinner_Msg">Loading…</div> <div aria-label="Loading…" class="mx_Spinner_icon" data-testid="spinner" role="progressbar" style="width: 32px; height: 32px;" /></div>
at Object.toBeFalsy (test/unit-tests/components/views/elements/AppTile-test.tsx:363:60)
|
<SessionManagerTab /> › Sign out › other devices › deletes a device when interactive auth is not required:
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
|
RoomView › should show error view if failed to look up room alias:
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)
|
RoomView › knock rooms › allows to request to join:
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)
|
RoomView › knock rooms › allows to cancel a join request:
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)
|
RoomView › should close search results when edit is clicked:
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)
|
RoomView › should switch rooms when edit is clicked on a search result for a different room:
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)
|
RoomView › fires Action.RoomLoaded:
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)
|
HTMLExport › should export:
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
|
HTMLExport › should handle when an event has no sender:
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>
|
HTMLExport › should not make /messages requests when exporting 'Current Timeline':
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>
|
jest-tests
Process completed with exit code 1.
|