Skip to content

Mock useId so it can be reset before each tests #18467

Mock useId so it can be reset before each tests

Mock useId so it can be reset before each tests #18467

Triggered via pull request April 24, 2026 09:29
Status Failure
Total duration 10m 8s
Artifacts 2

tests.yml

on: pull_request
Matrix: Jest (Element Web)
Matrix: Vitest
jest-tests
2s
jest-tests
Fit to window
Zoom out
Zoom in

Annotations

21 errors and 2 warnings
<CreateRoomDialog /> › for a private room › should render not the advanced options when UI.advancedSettings is disabled: apps/web/test/unit-tests/components/views/dialogs/CreateRoomDialog-test.tsx#L262
expect(received).toMatchSnapshot() Snapshot name: `<CreateRoomDialog /> for a private room should render not the advanced options when UI.advancedSettings is disabled 1` - Snapshot - 6 + Received + 6 @@ -122,11 +122,11 @@ class="_container_udcm8_10" > <input checked="" class="_input_udcm8_24" - id="_r_o_" + id="test-id-4" role="switch" type="checkbox" /> <div class="_ui_udcm8_34" @@ -136,17 +136,17 @@ <div class="_inline-field-body_19upo_38" > <label class="_label_19upo_59" - for="_r_o_" + for="test-id-4" > Enable end-to-end encryption </label> <span class="_message_19upo_85 _help-message_19upo_91" - id="radix-test-id-9" + id="radix-_r_49_" > You can't disable this later. Bridges & most bots won't work yet. </span> </div> </div> @@ -159,11 +159,11 @@ <div class="_container_udcm8_10" > <input class="_input_udcm8_24" - id="_r_p_" + id="test-id-5" role="switch" type="checkbox" /> <div class="_ui_udcm8_34" @@ -173,17 +173,17 @@ <div class="_inline-field-body_19upo_38" > <label class="_label_19upo_59" - for="_r_p_" + for="test-id-5" > Encrypt state events </label> <span class="_message_19upo_85 _help-message_19upo_91" - id="radix-test-id-11" + id="radix-_r_4b_" > Enables experimental support for encrypting state events, which hides metadata such as room names and topics from the server. This metadata will also be hidden from people joining rooms later, and people whose clients do not support MSC4362. </span> </div> </div> at Object.toMatchSnapshot (test/unit-tests/components/views/dialogs/CreateRoomDialog-test.tsx:262:34)
<CreateRoomDialog /> › for a private room › should create a private room: apps/web/test/unit-tests/components/views/dialogs/CreateRoomDialog-test.tsx#L238
expect(received).toMatchSnapshot() Snapshot name: `<CreateRoomDialog /> for a private room should create a private room 1` - Snapshot - 6 + Received + 6 @@ -122,11 +122,11 @@ class="_container_udcm8_10" > <input checked="" class="_input_udcm8_24" - id="_r_m_" + id="test-id-4" role="switch" type="checkbox" /> <div class="_ui_udcm8_34" @@ -136,17 +136,17 @@ <div class="_inline-field-body_19upo_38" > <label class="_label_19upo_59" - for="_r_m_" + for="test-id-4" > Enable end-to-end encryption </label> <span class="_message_19upo_85 _help-message_19upo_91" - id="radix-test-id-9" + id="radix-_r_3v_" > You can't disable this later. Bridges & most bots won't work yet. </span> </div> </div> @@ -167,11 +167,11 @@ <div class="_container_udcm8_10" > <input class="_input_udcm8_24" - id="_r_n_" + id="test-id-5" role="switch" type="checkbox" /> <div class="_ui_udcm8_34" @@ -181,17 +181,17 @@ <div class="_inline-field-body_19upo_38" > <label class="_label_19upo_59" - for="_r_n_" + for="test-id-5" > Block anyone not part of server.org from ever joining this room. </label> <span class="_message_19upo_85 _help-message_19upo_91" - id="radix-test-id-11" + id="radix-_r_41_" > You might enable this if the room will only be used for collaborating with internal teams on your homeserver. This cannot be changed later. </span> </div> </div> at Object.toMatchSnapshot (test/unit-tests/components/views/dialogs/CreateRoomDialog-test.tsx:238:34)
LegacyCallHangupEvent › getTextFor › in a DM room (should not be prefixed) › returns 'Call ended' regardless of sender: apps/web/src/MatrixClientPeg.ts#L181
User is not logged in at MatrixClientPegClass.safeGet (src/MatrixClientPeg.ts:181:19) at Object.safeGet (test/unit-tests/stores/message-preview/previews/LegacyCallHangupEvent-test.ts:61:40)
LegacyCallHangupEvent › getTextFor › in a DM room (should not be prefixed) › returns 'Call ended' regardless of sender: apps/web/src/MatrixClientPeg.ts#L181
User is not logged in at MatrixClientPegClass.safeGet (src/MatrixClientPeg.ts:181:19) at Object.safeGet (test/unit-tests/stores/message-preview/previews/LegacyCallHangupEvent-test.ts:53:45)
LegacyCallHangupEvent › getTextFor › in a room that should be prefixed (non-DM) › returns '<sender> ended the call' when the event is from someone else: apps/web/src/MatrixClientPeg.ts#L181
User is not logged in at MatrixClientPegClass.safeGet (src/MatrixClientPeg.ts:181:19) at safeGet (src/stores/message-preview/previews/utils.ts:15:40) at LegacyCallHangupEvent.getTextFor (src/stores/message-preview/previews/LegacyCallHangupEvent.ts:19:23) at Object.getTextFor (test/unit-tests/stores/message-preview/previews/LegacyCallHangupEvent-test.ts:47:32)
LegacyCallHangupEvent › getTextFor › in a room that should be prefixed (non-DM) › returns 'You ended the call' when the event is from self: apps/web/src/MatrixClientPeg.ts#L181
User is not logged in at MatrixClientPegClass.safeGet (src/MatrixClientPeg.ts:181:19) at Object.safeGet (test/unit-tests/stores/message-preview/previews/LegacyCallHangupEvent-test.ts:27:52)
LifecycleStore › dismisses toast on accept button: apps/web/test/unit-tests/stores/LifecycleStore-test.ts#L75
TypeError: Cannot read properties of undefined (reading '0') at Object.<anonymous> (test/unit-tests/stores/LifecycleStore-test.ts:75:40)
LifecycleStore › should show a toast if the matrix server version is unsupported: apps/web/test/unit-tests/stores/LifecycleStore-test.ts#L56
expect(jest.fn()).toHaveBeenCalledWith(...expected) Expected: ObjectContaining {"title": "Your server is unsupported"} Number of calls: 0 at Object.toHaveBeenCalledWith (test/unit-tests/stores/LifecycleStore-test.ts:56:35)
<AdvancedPanel /> › <OtherSettings /> › should display the blacklist of unverified devices settings: apps/web/test/unit-tests/components/views/settings/encryption/AdvancedPanel-test.tsx#L76
expect(received).toMatchSnapshot() Snapshot name: `<AdvancedPanel /> <OtherSettings /> should display the blacklist of unverified devices settings 1` - Snapshot - 4 + Received + 4 @@ -15,14 +15,14 @@ > <div class="_container_udcm8_10" > <input - aria-describedby="radix-test-id-1" + aria-describedby="radix-_r_7_" checked="" class="_input_udcm8_24" - id="radix-test-id-0" + id="radix-_r_6_" name="neverSendEncrypted" role="switch" title="" type="checkbox" /> @@ -34,17 +34,17 @@ <div class="_inline-field-body_19upo_38" > <label class="_label_19upo_59" - for="radix-test-id-0" + for="radix-_r_6_" > In encrypted rooms, only send messages to verified users </label> <span class="_message_19upo_85 _help-message_19upo_91" - id="radix-test-id-1" + id="radix-_r_7_" > Warning: users who have not explicitly verified with you (e.g. using emoji) will not receive your encrypted messages. Also, unverified devices of verified users will not receive your encrypted messages. Changes require an application restart to take effect. </span> </div> </div> at Object.toMatchSnapshot (test/unit-tests/components/views/settings/encryption/AdvancedPanel-test.tsx:76:57)
ElementCall › instance in a non-video room › the perParticipantE2EE url flag is used in encrypted rooms while respecting the feature_disable_call_per_sender_encryption flag: apps/web/test/unit-tests/models/Call-test.ts#L1055
expect(received).toBe(expected) // Object.is equality Expected: false Received: true at Object.toBe (test/unit-tests/models/Call-test.ts:1055:70)
RoomViewStore › can be used to view a room by ID and join: apps/web/src/MatrixClientPeg.ts#L181
User is not logged in at MatrixClientPegClass.safeGet (src/MatrixClientPeg.ts:181:19) at RoomViewStore.safeGet [as viewRoom] (src/stores/RoomViewStore.tsx:338:42) at RoomViewStore.viewRoom [as onDispatch] (src/stores/RoomViewStore.tsx:220:22) at MatrixDispatcher.invokeCallback (src/dispatcher/dispatcher.ts:115:31) at invokeCallback (src/dispatcher/dispatcher.ts:92:22) at Timeout.task [as _onTimeout] (../../node_modules/jsdom/lib/jsdom/browser/Window.js:579:19)
RoomViewStore › can be used to view a room by ID and join: apps/web/src/MatrixClientPeg.ts#L181
User is not logged in at MatrixClientPegClass.safeGet (src/MatrixClientPeg.ts:181:19) at RoomViewStore.safeGet [as viewRoom] (src/stores/RoomViewStore.tsx:338:42) at RoomViewStore.viewRoom [as onDispatch] (src/stores/RoomViewStore.tsx:220:22) at MatrixDispatcher.invokeCallback (src/dispatcher/dispatcher.ts:115:31) at invokeCallback (src/dispatcher/dispatcher.ts:92:22) at Timeout.task [as _onTimeout] (../../node_modules/jsdom/lib/jsdom/browser/Window.js:579:19)
RoomViewStore › can be used to view a room by ID and join: apps/web/src/MatrixClientPeg.ts#L181
User is not logged in at MatrixClientPegClass.safeGet (src/MatrixClientPeg.ts:181:19) at RoomViewStore.safeGet [as viewRoom] (src/stores/RoomViewStore.tsx:338:42) at RoomViewStore.viewRoom [as onDispatch] (src/stores/RoomViewStore.tsx:220:22) at MatrixDispatcher.invokeCallback (src/dispatcher/dispatcher.ts:115:31) at invokeCallback (src/dispatcher/dispatcher.ts:92:22) at Timeout.task [as _onTimeout] (../../node_modules/jsdom/lib/jsdom/browser/Window.js:579:19)
RoomViewStore › can be used to view a room by ID and join: apps/web/src/MatrixClientPeg.ts#L181
User is not logged in at MatrixClientPegClass.safeGet (src/MatrixClientPeg.ts:181:19) at RoomViewStore.safeGet [as viewRoom] (src/stores/RoomViewStore.tsx:338:42) at RoomViewStore.viewRoom [as onDispatch] (src/stores/RoomViewStore.tsx:220:22) at MatrixDispatcher.invokeCallback (src/dispatcher/dispatcher.ts:115:31) at invokeCallback (src/dispatcher/dispatcher.ts:92:22) at Timeout.task [as _onTimeout] (../../node_modules/jsdom/lib/jsdom/browser/Window.js:579:19)
RoomViewStore › can be used to view a room by ID and join: apps/web/src/MatrixClientPeg.ts#L181
User is not logged in at MatrixClientPegClass.safeGet (src/MatrixClientPeg.ts:181:19) at RoomViewStore.safeGet [as viewRoom] (src/stores/RoomViewStore.tsx:338:42) at RoomViewStore.viewRoom [as onDispatch] (src/stores/RoomViewStore.tsx:220:22) at MatrixDispatcher.invokeCallback (src/dispatcher/dispatcher.ts:115:31) at invokeCallback (src/dispatcher/dispatcher.ts:92:22) at Timeout.task [as _onTimeout] (../../node_modules/jsdom/lib/jsdom/browser/Window.js:579:19)
RoomViewStore › can be used to view a room by ID and join: apps/web/test/test-utils/utilities.ts#L47
untilDispatch: timed out at at Object.<anonymous> (/home/runner/work/element-web/element-web/apps/web/test/unit-tests/stores/RoomViewStore-test.ts:215:28) at test/test-utils/utilities.ts:47:28 at Timeout.task [as _onTimeout] (../../node_modules/jsdom/lib/jsdom/browser/Window.js:579:19)
<Notifications /> › correctly handles the loading/disabled state: apps/web/test/unit-tests/components/views/settings/notifications/Notifications2-test.tsx#L114
expect(received).toMatchSnapshot() Snapshot name: `<Notifications /> correctly handles the loading/disabled state 1` - Snapshot - 2 + Received + 2 @@ -781,11 +781,11 @@ > <div class="_container_153f2_10" > <input - aria-describedby="test-id-33" + aria-describedby="_r_24_" checked="" class="_input_153f2_18" disabled="" id="checkbox_wAHG75JNTN" type="checkbox" @@ -821,11 +821,11 @@ Notify when someone uses a keyword </span> </label> <span class="_message_19upo_85 _help-message_19upo_91" - id="test-id-33" + id="_r_24_" > Enter keywords here, or use for spelling variations or nicknames </span> </div> </div> at toMatchSnapshot (test/unit-tests/components/views/settings/notifications/Notifications2-test.tsx:114:38)
<Notifications /> › matches the snapshot: apps/web/test/unit-tests/components/views/settings/notifications/Notifications2-test.tsx#L100
expect(received).toMatchSnapshot() Snapshot name: `<Notifications /> matches the snapshot 1` - Snapshot - 2 + Received + 2 @@ -769,11 +769,11 @@ > <div class="_container_153f2_10" > <input - aria-describedby="test-id-33" + aria-describedby="_r_t_" checked="" class="_input_153f2_18" id="checkbox_SwicmKUiOB" type="checkbox" /> @@ -808,11 +808,11 @@ Notify when someone uses a keyword </span> </label> <span class="_message_19upo_85 _help-message_19upo_91" - id="test-id-33" + id="_r_t_" > Enter keywords here, or use for spelling variations or nicknames </span> </div> </div> at Object.toMatchSnapshot (test/unit-tests/components/views/settings/notifications/Notifications2-test.tsx:100:34)
WysiwygComposer › Mentions and commands › clicking on a mention in the composer dispatches the correct action: apps/web/test/unit-tests/components/views/rooms/wysiwyg_composer/components/WysiwygComposer-test.tsx#L355
expect(jest.fn()).toHaveBeenCalledTimes(expected) Expected number of calls: 1 Received number of calls: 0 at Object.toHaveBeenCalledTimes (test/unit-tests/components/views/rooms/wysiwyg_composer/components/WysiwygComposer-test.tsx:355:33)
RoomView › group calls › hides the right panel chat when returning to a room that previously showed a call: apps/web/test/unit-tests/components/structures/RoomView-test.tsx#L726
expect(received).toBe(expected) // Object.is equality Expected: null Received: <aside class="mx_RightPanel" data-testid="right-panel" id="mx_RightPanel"><div class="mx_BaseCard mx_ThreadPanel mx_TimelineCard"><div class="mx_BaseCard_header"><div class="mx_BaseCard_header_title"><p class="_typography_6v6n8_153 _font-body-md-medium_6v6n8_60 mx_BaseCard_header_title_heading" role="heading">Chat</p></div><button aria-labelledby="test-id-434" class="_icon-button_1215g_8" data-kind="secondary" data-testid="base-card-close-button" role="button" style="--cpd-icon-button-size: 28px;" tabindex="0"><div class="_indicator-icon_147l5_17" 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 1 1.414 0L12 10.586l4.293-4.293a1 1 0 1 1 1.414 1.414L13.414 12l4.293 4.293a1 1 0 0 1-1.414 1.414L12 13.414l-4.293 4.293a1 1 0 0 1-1.414-1.414L10.586 12 6.293 7.707a1 1 0 0 1 0-1.414" /></svg></div></button></div><div class="mx_TimelineCard_timeline"><div class="mx_AutoHideScrollbar mx_ScrollPanel mx_RoomView_messagePanel" tabindex="-1"><div class="mx_RoomView_messageListWrapper"><ol aria-live="polite" class="mx_RoomView_MessageList" style="height: 400px;" /></div></div></div><div aria-label="Message composer" class="mx_MessageComposer mx_MessageComposer--compact mx_MessageComposer_e2eStatus" role="region"><div class="mx_MessageComposer_wrapper"><div class="mx_MessageComposer_row"><div class="mx_MessageComposer_e2eIconWrapper"><svg aria-label="Messages in this room are not end-to-end encrypted" aria-labelledby="test-id-436" class="mx_E2EIcon mx_MessageComposer_e2eIcon" color="var(--cpd-color-icon-info-primary)" fill="currentColor" height="12px" viewBox="0 0 24 24" width="12px" xmlns="http://www.w3.org/2000/svg"><path d="M6 22q-.825 0-1.412-.587A1.93 1.93 0 0 1 4 20V10q0-.825.588-1.412a2 2 0 0 1 .702-.463L1.333 4.167a1 1 0 0 1 1.414-1.414L7 7.006v-.012l13 13v.012l1.247 1.247a1 1 0 1 1-1.414 1.414l-.896-.896A1.94 1.94 0 0 1 18 22zm14-4.834V10q0-.825-.587-1.412A1.93 1.93 0 0 0 18 8h-1V6q0-2.075-1.463-3.537Q14.075 1 12 1T8.463 2.463a4.9 4.9 0 0 0-1.22 1.946L9 6.166V6q0-1.25.875-2.125A2.9 2.9 0 0 1 12 3q1.25 0 2.125.875T15 6v2h-4.166z" /></svg></div><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" role="button" tabindex="0" type="button"><svg fill="currentColor" height="1em" viewBox="0 0 24 24" width="1em" xmlns="http://www.w3.org/2000/svg"><path … /></svg></button><button aria-label="Italics" class="mx_AccessibleButton mx_MessageComposerFormatBar_button" role="button" tabindex="-1" type="button"><svg fill="currentColor" height="1em" viewBox="0 0 24 24" width="1em" xmlns="http://www.w3.org/2000/svg"><path … /></svg></button><button aria-label="Strikethrough" class="mx_AccessibleButton mx_MessageComposerFormatBar_button" role="button" tabindex="-1" type="button"><svg fill="currentColor" height="1em" viewBox="0 0 24 24" width="1em" xmlns="http://www.w3.org/2000/svg"><path … /></svg></button><button aria-label="Code block" class="mx_AccessibleButton mx_MessageComposerFormatBar_button" role="button" tabindex="-1" type="button"><svg fill="currentColor" height="1em" viewBox="0 0 24 24" width="1em" xmlns="http://www.w3.org/2000/svg"><path … /></svg></button><button aria-label="Quote" class="mx_AccessibleButton mx_MessageComposerFormatBar_button" role="button" tabindex="-1" type="button"><svg fill="currentColor" height="1em" viewBox="0 0 24 24" width="1em" xmlns="http://www.w3.org/2000/svg"><path … /></svg></button><button aria-label="Insert link" class="mx_AccessibleButton mx_MessageComposerFormatBar_button" role="button" tabindex="-1" type="button"><svg fill="currentColor" height="1em" viewBox="0 0 24 24" width="1em" xmlns="http://www.w3.org/2000/svg"><path … /></svg></button></div><div aria-autocomplete="list" aria-disabled="false" aria-h
jest-tests
Process completed with exit code 1.
Jest (Element Web) (1)
Node.js 20 actions are deprecated. The following actions are running on Node.js 20 and may not work as expected: SimenB/github-actions-cpu-cores@97ba232459a8e02ff6121db9362b09661c875ab8. Actions will be forced to run with Node.js 24 by default starting June 2nd, 2026. Node.js 20 will be removed from the runner on September 16th, 2026. Please check if updated versions of these actions are available that support Node.js 24. To opt into Node.js 24 now, set the FORCE_JAVASCRIPT_ACTIONS_TO_NODE24=true environment variable on the runner or in your workflow file. Once Node.js 24 becomes the default, you can temporarily opt out by setting ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION=true. For more information see: https://github.blog/changelog/2025-09-19-deprecation-of-node-20-on-github-actions-runners/
Jest (Element Web) (2)
Node.js 20 actions are deprecated. The following actions are running on Node.js 20 and may not work as expected: SimenB/github-actions-cpu-cores@97ba232459a8e02ff6121db9362b09661c875ab8. Actions will be forced to run with Node.js 24 by default starting June 2nd, 2026. Node.js 20 will be removed from the runner on September 16th, 2026. Please check if updated versions of these actions are available that support Node.js 24. To opt into Node.js 24 now, set the FORCE_JAVASCRIPT_ACTIONS_TO_NODE24=true environment variable on the runner or in your workflow file. Once Node.js 24 becomes the default, you can temporarily opt out by setting ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION=true. For more information see: https://github.blog/changelog/2025-09-19-deprecation-of-node-20-on-github-actions-runners/

Artifacts

Produced during runtime
Name Size Digest
coverage-module-api
1.42 KB
sha256:bc5f11315050fc2df84a9fc61b537112d8210706a4ffa138e31d4c0a24f83c16
coverage-shared-components
25.6 KB
sha256:ec9e55d102a5653939fe02b9442a6b6767c1f3ace314c0d22cf41bd84070ab02