Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
pull/28192/head
Michael Telatynski 2024-10-15 16:22:11 +01:00
parent d928a7be9d
commit 67659ab353
No known key found for this signature in database
GPG Key ID: A2B008A5F49F5D0D
48 changed files with 4088 additions and 245 deletions

View File

@ -1,60 +0,0 @@
name: Tests
on:
pull_request: {}
push:
branches: [develop, master]
merge_group:
types: [checks_requested]
repository_dispatch:
types: [element-web-notify]
env:
# These must be set for fetchdep.sh to get the right branch
REPOSITORY: ${{ github.repository }}
PR_NUMBER: ${{ github.event.pull_request.number }}
jobs:
jest:
name: Jest
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Yarn cache
uses: actions/setup-node@v4
with:
cache: "yarn"
node-version: "lts/*"
- name: Install Dependencies
run: "./scripts/layered.sh"
- name: Get number of CPU cores
id: cpu-cores
uses: SimenB/github-actions-cpu-cores@97ba232459a8e02ff6121db9362b09661c875ab8 # v2
- name: Run tests with coverage
run: "yarn coverage --ci --max-workers ${{ steps.cpu-cores.outputs.count }}"
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: coverage
path: |
coverage
!coverage/lcov-report
skip_sonar:
name: Skip SonarCloud in merge queue
if: github.event_name == 'merge_group'
runs-on: ubuntu-latest
needs: jest
steps:
- name: Skip SonarCloud
uses: Sibz/github-status-action@faaa4d96fecf273bd762985e0e7f9f933c774918 # v1
with:
authToken: ${{ secrets.GITHUB_TOKEN }}
state: success
description: SonarCloud skipped
context: SonarCloud Code Analysis
sha: ${{ github.sha }}
target_url: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}

File diff suppressed because it is too large Load Diff

View File

@ -19,7 +19,7 @@ exports[`FilePanel renders empty state 1`] = `
</p>
</div>
<button
aria-labelledby="floating-ui-1"
aria-labelledby="floating-ui-626p1"
class="_icon-button_bh2qc_17 _subtle-bg_bh2qc_38"
data-testid="base-card-close-button"
role="button"

View File

@ -62,7 +62,7 @@ exports[`RoomView for a local room in state CREATING should match the snapshot 1
style="--cpd-icon-button-size: 100%;"
>
<svg
aria-labelledby="floating-ui-364"
aria-labelledby="floating-ui-7cy2364"
fill="currentColor"
height="1em"
viewBox="0 0 24 24"
@ -78,7 +78,7 @@ exports[`RoomView for a local room in state CREATING should match the snapshot 1
<button
aria-disabled="false"
aria-label="Voice call"
aria-labelledby="floating-ui-369"
aria-labelledby="floating-ui-y96p369"
class="_icon-button_bh2qc_17"
role="button"
style="--cpd-icon-button-size: 32px;"
@ -103,7 +103,7 @@ exports[`RoomView for a local room in state CREATING should match the snapshot 1
</button>
<button
aria-label="Room info"
aria-labelledby="floating-ui-374"
aria-labelledby="floating-ui-73r5374"
class="_icon-button_bh2qc_17"
role="button"
style="--cpd-icon-button-size: 32px;"
@ -128,7 +128,7 @@ exports[`RoomView for a local room in state CREATING should match the snapshot 1
</button>
<button
aria-label="Threads"
aria-labelledby="floating-ui-379"
aria-labelledby="floating-ui-piqn379"
class="_icon-button_bh2qc_17"
role="button"
style="--cpd-icon-button-size: 32px;"
@ -157,7 +157,7 @@ exports[`RoomView for a local room in state CREATING should match the snapshot 1
>
<div
aria-label="2 members"
aria-labelledby="floating-ui-384"
aria-labelledby="floating-ui-ccam384"
class="mx_AccessibleButton mx_FacePile"
role="button"
tabindex="0"
@ -280,7 +280,7 @@ exports[`RoomView for a local room in state ERROR should match the snapshot 1`]
style="--cpd-icon-button-size: 100%;"
>
<svg
aria-labelledby="floating-ui-394"
aria-labelledby="floating-ui-3nyq394"
fill="currentColor"
height="1em"
viewBox="0 0 24 24"
@ -296,7 +296,7 @@ exports[`RoomView for a local room in state ERROR should match the snapshot 1`]
<button
aria-disabled="false"
aria-label="Voice call"
aria-labelledby="floating-ui-399"
aria-labelledby="floating-ui-gtzm399"
class="_icon-button_bh2qc_17"
role="button"
style="--cpd-icon-button-size: 32px;"
@ -321,7 +321,7 @@ exports[`RoomView for a local room in state ERROR should match the snapshot 1`]
</button>
<button
aria-label="Room info"
aria-labelledby="floating-ui-404"
aria-labelledby="floating-ui-cw76404"
class="_icon-button_bh2qc_17"
role="button"
style="--cpd-icon-button-size: 32px;"
@ -346,7 +346,7 @@ exports[`RoomView for a local room in state ERROR should match the snapshot 1`]
</button>
<button
aria-label="Threads"
aria-labelledby="floating-ui-409"
aria-labelledby="floating-ui-hyam409"
class="_icon-button_bh2qc_17"
role="button"
style="--cpd-icon-button-size: 32px;"
@ -375,7 +375,7 @@ exports[`RoomView for a local room in state ERROR should match the snapshot 1`]
>
<div
aria-label="2 members"
aria-labelledby="floating-ui-414"
aria-labelledby="floating-ui-ytbj414"
class="mx_AccessibleButton mx_FacePile"
role="button"
tabindex="0"
@ -583,7 +583,7 @@ exports[`RoomView for a local room in state NEW should match the snapshot 1`] =
style="--cpd-icon-button-size: 100%;"
>
<svg
aria-labelledby="floating-ui-224"
aria-labelledby="floating-ui-dpqa224"
fill="currentColor"
height="1em"
viewBox="0 0 24 24"
@ -599,7 +599,7 @@ exports[`RoomView for a local room in state NEW should match the snapshot 1`] =
<button
aria-disabled="false"
aria-label="Voice call"
aria-labelledby="floating-ui-229"
aria-labelledby="floating-ui-4wkl229"
class="_icon-button_bh2qc_17"
role="button"
style="--cpd-icon-button-size: 32px;"
@ -624,7 +624,7 @@ exports[`RoomView for a local room in state NEW should match the snapshot 1`] =
</button>
<button
aria-label="Room info"
aria-labelledby="floating-ui-234"
aria-labelledby="floating-ui-s99w234"
class="_icon-button_bh2qc_17"
role="button"
style="--cpd-icon-button-size: 32px;"
@ -649,7 +649,7 @@ exports[`RoomView for a local room in state NEW should match the snapshot 1`] =
</button>
<button
aria-label="Threads"
aria-labelledby="floating-ui-239"
aria-labelledby="floating-ui-h575239"
class="_icon-button_bh2qc_17"
role="button"
style="--cpd-icon-button-size: 32px;"
@ -678,7 +678,7 @@ exports[`RoomView for a local room in state NEW should match the snapshot 1`] =
>
<div
aria-label="2 members"
aria-labelledby="floating-ui-244"
aria-labelledby="floating-ui-38qo244"
class="mx_AccessibleButton mx_FacePile"
role="button"
tabindex="0"
@ -963,7 +963,7 @@ exports[`RoomView for a local room in state NEW that is encrypted should match t
style="--cpd-icon-button-size: 100%;"
>
<svg
aria-labelledby="floating-ui-294"
aria-labelledby="floating-ui-cfuh294"
fill="currentColor"
height="1em"
viewBox="0 0 24 24"
@ -979,7 +979,7 @@ exports[`RoomView for a local room in state NEW that is encrypted should match t
<button
aria-disabled="false"
aria-label="Voice call"
aria-labelledby="floating-ui-299"
aria-labelledby="floating-ui-zobk299"
class="_icon-button_bh2qc_17"
role="button"
style="--cpd-icon-button-size: 32px;"
@ -1004,7 +1004,7 @@ exports[`RoomView for a local room in state NEW that is encrypted should match t
</button>
<button
aria-label="Room info"
aria-labelledby="floating-ui-304"
aria-labelledby="floating-ui-fzwm304"
class="_icon-button_bh2qc_17"
role="button"
style="--cpd-icon-button-size: 32px;"
@ -1029,7 +1029,7 @@ exports[`RoomView for a local room in state NEW that is encrypted should match t
</button>
<button
aria-label="Threads"
aria-labelledby="floating-ui-309"
aria-labelledby="floating-ui-9voq309"
class="_icon-button_bh2qc_17"
role="button"
style="--cpd-icon-button-size: 32px;"
@ -1058,7 +1058,7 @@ exports[`RoomView for a local room in state NEW that is encrypted should match t
>
<div
aria-label="2 members"
aria-labelledby="floating-ui-314"
aria-labelledby="floating-ui-h9ia314"
class="mx_AccessibleButton mx_FacePile"
role="button"
tabindex="0"
@ -1370,7 +1370,7 @@ exports[`RoomView video rooms should render joined video room view 1`] = `
>
<button
aria-label="Room info"
aria-labelledby="floating-ui-84"
aria-labelledby="floating-ui-x4mx84"
class="_icon-button_bh2qc_17"
role="button"
style="--cpd-icon-button-size: 32px;"
@ -1395,7 +1395,7 @@ exports[`RoomView video rooms should render joined video room view 1`] = `
</button>
<button
aria-label="Chat"
aria-labelledby="floating-ui-89"
aria-labelledby="floating-ui-od2g89"
class="_icon-button_bh2qc_17"
role="button"
style="--cpd-icon-button-size: 32px;"
@ -1420,7 +1420,7 @@ exports[`RoomView video rooms should render joined video room view 1`] = `
</button>
<button
aria-label="Threads"
aria-labelledby="floating-ui-94"
aria-labelledby="floating-ui-s0j594"
class="_icon-button_bh2qc_17"
role="button"
style="--cpd-icon-button-size: 32px;"
@ -1449,7 +1449,7 @@ exports[`RoomView video rooms should render joined video room view 1`] = `
>
<div
aria-label="0 members"
aria-labelledby="floating-ui-99"
aria-labelledby="floating-ui-n51q99"
class="mx_AccessibleButton mx_FacePile"
role="button"
tabindex="0"
@ -1487,7 +1487,7 @@ exports[`RoomView video rooms should render joined video room view 1`] = `
</p>
</div>
<button
aria-labelledby="floating-ui-108"
aria-labelledby="floating-ui-k0nr108"
class="_icon-button_bh2qc_17 _subtle-bg_bh2qc_38"
data-testid="base-card-close-button"
role="button"

View File

@ -393,7 +393,7 @@ exports[`SpaceHierarchy <SpaceHierarchy /> renders 1`] = `
Join
</div>
<span
aria-labelledby="floating-ui-9"
aria-labelledby="floating-ui-nzy79"
tabindex="0"
>
<span

View File

@ -6,7 +6,7 @@ exports[`ThreadPanel Header expect that All filter for ThreadPanelHeader properl
class="mx_BaseCard_header_title"
>
<button
aria-labelledby="floating-ui-1"
aria-labelledby="floating-ui-93sh1"
class="_icon-button_bh2qc_17"
role="button"
style="--cpd-icon-button-size: 24px;"
@ -41,7 +41,7 @@ exports[`ThreadPanel Header expect that My filter for ThreadPanelHeader properly
class="mx_BaseCard_header_title"
>
<button
aria-labelledby="floating-ui-6"
aria-labelledby="floating-ui-zp986"
class="_icon-button_bh2qc_17"
role="button"
style="--cpd-icon-button-size: 24px;"

View File

@ -16,7 +16,7 @@ exports[`DecoratedRoomAvatar shows an avatar with globe icon and tooltip for pub
r
</span>
<div
aria-labelledby="floating-ui-1"
aria-labelledby="floating-ui-tmsb1"
class="mx_DecoratedRoomAvatar_icon mx_DecoratedRoomAvatar_icon_globe"
tabindex="0"
/>
@ -40,7 +40,7 @@ exports[`DecoratedRoomAvatar shows the presence indicator in a DM room that also
r
</span>
<div
aria-labelledby="floating-ui-6"
aria-labelledby="floating-ui-8xag6"
class="mx_DecoratedRoomAvatar_icon mx_DecoratedRoomAvatar_icon_online"
tabindex="0"
/>

View File

@ -7,7 +7,7 @@ exports[`WithPresenceIndicator renders presence indicator with tooltip for DM ro
>
<span />
<div
aria-labelledby="floating-ui-1"
aria-labelledby="floating-ui-urk41"
class="mx_WithPresenceIndicator_icon mx_WithPresenceIndicator_icon_online"
style="width: 32px; height: 32px;"
tabindex="0"
@ -23,7 +23,7 @@ exports[`WithPresenceIndicator renders presence indicator with tooltip for DM ro
>
<span />
<div
aria-labelledby="floating-ui-6"
aria-labelledby="floating-ui-hbg46"
class="mx_WithPresenceIndicator_icon mx_WithPresenceIndicator_icon_offline"
style="width: 32px; height: 32px;"
tabindex="0"
@ -39,7 +39,7 @@ exports[`WithPresenceIndicator renders presence indicator with tooltip for DM ro
>
<span />
<div
aria-labelledby="floating-ui-12"
aria-labelledby="floating-ui-7h6o12"
class="mx_WithPresenceIndicator_icon mx_WithPresenceIndicator_icon_away"
style="width: 32px; height: 32px;"
tabindex="0"

View File

@ -32,7 +32,7 @@ exports[`<BeaconListItem /> when a beacon is live and has locations renders beac
class="mx_BeaconListItem_interactions"
>
<a
aria-labelledby="floating-ui-1"
aria-labelledby="floating-ui-gc0w1"
data-testid="open-location-in-osm"
href="https://www.openstreetmap.org/?mlat=51&mlon=41#map=16/51/41"
rel="noreferrer noopener"

View File

@ -74,7 +74,7 @@ exports[`<DialogSidebar /> renders sidebar correctly with beacons 1`] = `
class="mx_BeaconListItem_interactions"
>
<a
aria-labelledby="floating-ui-8"
aria-labelledby="floating-ui-rag48"
data-testid="open-location-in-osm"
href="https://www.openstreetmap.org/?mlat=51&mlon=41#map=16/51/41"
rel="noreferrer noopener"

View File

@ -3,7 +3,7 @@
exports[`<ShareLatestLocation /> renders share buttons when there is a location 1`] = `
<DocumentFragment>
<a
aria-labelledby="floating-ui-1"
aria-labelledby="floating-ui-sj751"
data-testid="open-location-in-osm"
href="https://www.openstreetmap.org/?mlat=51&mlon=42#map=16/51/42"
rel="noreferrer noopener"

View File

@ -64,8 +64,8 @@ describe("<ChangelogDialog />", () => {
files: [],
});
const newVersion = "newsha1-react-newsha2-js-newsha3";
const oldVersion = "oldsha1-react-oldsha2-js-oldsha3";
const newVersion = "newsha1-js-newsha3";
const oldVersion = "oldsha1-js-oldsha3";
const { asFragment } = render(
<ChangelogDialog newVersion={newVersion} version={oldVersion} onFinished={jest.fn()} />,
);

View File

@ -51,26 +51,6 @@ exports[`<ChangelogDialog /> should fetch github proxy url for each repo with ol
</li>
</ul>
</div>
<div>
<h2
class="mx_Heading_h4"
>
element-hq/matrix-react-sdk
</h2>
<ul>
<li
class="mx_ChangelogDialog_li"
>
<a
href="https://api.github.com/repos/element-hq/matrix-react-sdk/commit/commit-sha"
rel="noreferrer noopener"
target="_blank"
>
This is a commit message
</a>
</li>
</ul>
</div>
<div>
<h2
class="mx_Heading_h4"

View File

@ -33,7 +33,7 @@ exports[`DevtoolsDialog renders the devtools dialog 1`] = `
>
Room ID: !id
<div
aria-describedby="floating-ui-2"
aria-describedby="floating-ui-ar4m2"
aria-label="Copy"
class="mx_AccessibleButton mx_CopyableText_copyButton"
role="button"

View File

@ -73,7 +73,7 @@ exports[`LogoutDialog Prompts user to connect backup if there is a backup on the
</details>
</div>
<div
aria-describedby="floating-ui-22"
aria-describedby="floating-ui-ykjp22"
aria-label="Close dialog"
class="mx_AccessibleButton mx_Dialog_cancelButton"
role="button"
@ -161,7 +161,7 @@ exports[`LogoutDialog Prompts user to set up backup if there is no backup on the
</details>
</div>
<div
aria-describedby="floating-ui-28"
aria-describedby="floating-ui-kxc528"
aria-label="Close dialog"
class="mx_AccessibleButton mx_Dialog_cancelButton"
role="button"

View File

@ -102,7 +102,7 @@ exports[`<MessageEditHistory /> should match the snapshot 1`] = `
</div>
</div>
<div
aria-describedby="floating-ui-2"
aria-describedby="floating-ui-e5si2"
aria-label="Close dialog"
class="mx_AccessibleButton mx_Dialog_cancelButton"
role="button"
@ -316,7 +316,7 @@ exports[`<MessageEditHistory /> should support events with 1`] = `
</div>
</div>
<div
aria-describedby="floating-ui-8"
aria-describedby="floating-ui-qhq68"
aria-label="Close dialog"
class="mx_AccessibleButton mx_Dialog_cancelButton"
role="button"

View File

@ -50,7 +50,7 @@ exports[`<ServerPickerDialog /> should render dialog 1`] = `
class="mx_StyledRadioButton_content"
>
<span
aria-labelledby="floating-ui-1"
aria-labelledby="floating-ui-w2rv1"
class="mx_Login_underlinedServerName"
tabindex="0"
>

View File

@ -30,7 +30,7 @@ exports[`AppTile destroys non-persisted right panel widget on room change 1`] =
/>
</div>
<button
aria-labelledby="floating-ui-1"
aria-labelledby="floating-ui-134r1"
class="_icon-button_bh2qc_17 _subtle-bg_bh2qc_38"
data-testid="base-card-close-button"
role="button"
@ -302,8 +302,8 @@ exports[`AppTile for a pinned widget should render permission request 1`] = `
<span>
Using this widget may share data
<div
aria-describedby="floating-ui-87"
aria-labelledby="floating-ui-86"
aria-describedby="floating-ui-c47x87"
aria-labelledby="floating-ui-e4v186"
class="mx_TextWithTooltip_target mx_TextWithTooltip_target--helpIcon"
>
<svg

View File

@ -3,7 +3,7 @@
exports[`<FacePile /> renders with a tooltip 1`] = `
<DocumentFragment>
<div
aria-labelledby="floating-ui-1"
aria-labelledby="floating-ui-te7y1"
class="mx_AccessibleButton mx_FacePile"
role="button"
tabindex="0"

View File

@ -21,7 +21,7 @@ exports[`<ImageView /> renders correctly 1`] = `
class="mx_ImageView_toolbar"
>
<div
aria-describedby="floating-ui-2"
aria-describedby="floating-ui-crjn2"
aria-label="Zoom out"
class="mx_AccessibleButton mx_ImageView_button mx_ImageView_button_zoomOut"
role="button"

View File

@ -3,7 +3,7 @@
exports[`InfoTooltip should show tooltip on hover 1`] = `
<DocumentFragment>
<div
aria-describedby="floating-ui-2"
aria-describedby="floating-ui-b6ga2"
class="mx_InfoTooltip"
tabindex="0"
>

View File

@ -3,8 +3,8 @@
exports[`<RoomFacePile /> renders 1`] = `
<DocumentFragment>
<div
aria-describedby="floating-ui-2"
aria-labelledby="floating-ui-1"
aria-describedby="floating-ui-igbf2"
aria-labelledby="floating-ui-w6nt1"
class="mx_AccessibleButton mx_FacePile"
role="button"
tabindex="0"

View File

@ -23,7 +23,7 @@ exports[`<LocationViewDialog /> renders map correctly 1`] = `
class="mx_ZoomButtons"
>
<div
aria-describedby="floating-ui-6"
aria-describedby="floating-ui-9csj6"
aria-label="Zoom in"
class="mx_AccessibleButton mx_ZoomButtons_button"
data-testid="map-zoom-in-button"

View File

@ -34,7 +34,7 @@ exports[`MLocationBody <MLocationBody> without error renders map correctly 1`] =
class="mx_MLocationBody"
>
<div
aria-labelledby="floating-ui-18"
aria-labelledby="floating-ui-4fzy18"
class="mx_MLocationBody_map"
>
<div
@ -67,7 +67,7 @@ exports[`MLocationBody <MLocationBody> without error renders marker correctly fo
class="mx_MLocationBody"
>
<div
aria-labelledby="floating-ui-30"
aria-labelledby="floating-ui-4fzy30"
class="mx_MLocationBody_map"
>
<div

View File

@ -82,7 +82,7 @@ exports[`<PollHistory /> renders a list of active polls when there are polls in
tabindex="0"
>
<div
aria-labelledby="floating-ui-10"
aria-labelledby="floating-ui-r0s310"
class="mx_PollListItem_content"
>
<span>
@ -107,7 +107,7 @@ exports[`<PollHistory /> renders a list of active polls when there are polls in
tabindex="0"
>
<div
aria-labelledby="floating-ui-16"
aria-labelledby="floating-ui-at1s16"
class="mx_PollListItem_content"
>
<span>

View File

@ -10,7 +10,7 @@ exports[`<PollListItem /> renders a poll 1`] = `
tabindex="0"
>
<div
aria-labelledby="floating-ui-1"
aria-labelledby="floating-ui-o5151"
class="mx_PollListItem_content"
>
<span>

View File

@ -10,7 +10,7 @@ exports[`<PollListItemEnded /> renders a poll with no responses 1`] = `
tabindex="0"
>
<div
aria-labelledby="floating-ui-1"
aria-labelledby="floating-ui-l7o01"
class="mx_PollListItemEnded_content"
>
<div

View File

@ -19,7 +19,7 @@ exports[`<BaseCard /> should close when clicking X button 1`] = `
</p>
</div>
<button
aria-labelledby="floating-ui-1"
aria-labelledby="floating-ui-gpof1"
class="_icon-button_bh2qc_17 _subtle-bg_bh2qc_38"
data-testid="base-card-close-button"
role="button"

View File

@ -19,7 +19,7 @@ exports[`<ExtensionsCard /> should render empty state 1`] = `
</p>
</div>
<button
aria-labelledby="floating-ui-1"
aria-labelledby="floating-ui-x3bg1"
class="_icon-button_bh2qc_17 _subtle-bg_bh2qc_38"
data-testid="base-card-close-button"
role="button"
@ -119,7 +119,7 @@ exports[`<ExtensionsCard /> should render widgets 1`] = `
</p>
</div>
<button
aria-labelledby="floating-ui-6"
aria-labelledby="floating-ui-kac16"
class="_icon-button_bh2qc_17 _subtle-bg_bh2qc_38"
data-testid="base-card-close-button"
role="button"

View File

@ -19,7 +19,7 @@ exports[`<PinnedMessagesCard /> should show the empty state when there are no pi
</p>
</div>
<button
aria-labelledby="floating-ui-12"
aria-labelledby="floating-ui-k3to12"
class="_icon-button_bh2qc_17 _subtle-bg_bh2qc_38"
data-testid="base-card-close-button"
role="button"
@ -100,7 +100,7 @@ exports[`<PinnedMessagesCard /> should show two pinned messages 1`] = `
</p>
</div>
<button
aria-labelledby="floating-ui-18"
aria-labelledby="floating-ui-9iwr18"
class="_icon-button_bh2qc_17 _subtle-bg_bh2qc_38"
data-testid="base-card-close-button"
role="button"
@ -156,7 +156,7 @@ exports[`<PinnedMessagesCard /> should show two pinned messages 1`] = `
class="mx_PinnedEventTile_top"
>
<span
aria-labelledby="floating-ui-24"
aria-labelledby="floating-ui-i00u24"
class="mx_PinnedEventTile_sender mx_Username_color3"
>
@alice:example.org
@ -233,7 +233,7 @@ exports[`<PinnedMessagesCard /> should show two pinned messages 1`] = `
class="mx_PinnedEventTile_top"
>
<span
aria-labelledby="floating-ui-29"
aria-labelledby="floating-ui-yxil29"
class="mx_PinnedEventTile_sender mx_Username_color3"
>
@alice:example.org
@ -319,7 +319,7 @@ exports[`<PinnedMessagesCard /> unpin all should not allow to unpinall 1`] = `
</p>
</div>
<button
aria-labelledby="floating-ui-712"
aria-labelledby="floating-ui-y2hf712"
class="_icon-button_bh2qc_17 _subtle-bg_bh2qc_38"
data-testid="base-card-close-button"
role="button"
@ -375,7 +375,7 @@ exports[`<PinnedMessagesCard /> unpin all should not allow to unpinall 1`] = `
class="mx_PinnedEventTile_top"
>
<span
aria-labelledby="floating-ui-718"
aria-labelledby="floating-ui-rbcw718"
class="mx_PinnedEventTile_sender mx_Username_color3"
>
@alice:example.org
@ -452,7 +452,7 @@ exports[`<PinnedMessagesCard /> unpin all should not allow to unpinall 1`] = `
class="mx_PinnedEventTile_top"
>
<span
aria-labelledby="floating-ui-723"
aria-labelledby="floating-ui-acez723"
class="mx_PinnedEventTile_sender mx_Username_color3"
>
@alice:example.org

View File

@ -15,7 +15,7 @@ exports[`<RoomSummaryCard /> has button to edit topic 1`] = `
class="mx_BaseCard_header_spacer"
/>
<button
aria-labelledby="floating-ui-20"
aria-labelledby="floating-ui-0vu820"
class="_icon-button_bh2qc_17 _subtle-bg_bh2qc_38"
data-testid="base-card-close-button"
role="button"
@ -669,7 +669,7 @@ exports[`<RoomSummaryCard /> renders the room summary 1`] = `
class="mx_BaseCard_header_spacer"
/>
<button
aria-labelledby="floating-ui-1"
aria-labelledby="floating-ui-fg3t1"
class="_icon-button_bh2qc_17 _subtle-bg_bh2qc_38"
data-testid="base-card-close-button"
role="button"
@ -1286,7 +1286,7 @@ exports[`<RoomSummaryCard /> renders the room topic in the summary 1`] = `
class="mx_BaseCard_header_spacer"
/>
<button
aria-labelledby="floating-ui-10"
aria-labelledby="floating-ui-nwmj10"
class="_icon-button_bh2qc_17 _subtle-bg_bh2qc_38"
data-testid="base-card-close-button"
role="button"

View File

@ -88,7 +88,7 @@ exports[`<UserInfo /> with crypto enabled renders <BasicUserInfo /> 1`] = `
</p>
</div>
<button
aria-labelledby="floating-ui-220"
aria-labelledby="floating-ui-tg52220"
class="_icon-button_bh2qc_17 _subtle-bg_bh2qc_38"
data-testid="base-card-close-button"
role="button"
@ -402,7 +402,7 @@ exports[`<UserInfo /> with crypto enabled should render a deactivate button for
</p>
</div>
<button
aria-labelledby="floating-ui-290"
aria-labelledby="floating-ui-hwpo290"
class="_icon-button_bh2qc_17 _subtle-bg_bh2qc_38"
data-testid="base-card-close-button"
role="button"

View File

@ -3,7 +3,7 @@
exports[`<VideoRoomChatButton /> renders button with an unread marker when room is unread 1`] = `
<button
aria-label="Chat"
aria-labelledby="floating-ui-6"
aria-labelledby="floating-ui-iun36"
class="_icon-button_bh2qc_17"
data-indicator="default"
role="button"

View File

@ -166,9 +166,11 @@ describe("RoomKnocksBar", () => {
beforeEach(() => jest.spyOn(room, "getMembersWithMembership").mockReturnValue([bob]));
it("renders a heading and a paragraph with name and user ID", () => {
getComponent(room);
const { container } = getComponent(room);
expect(screen.getByRole("heading")).toHaveTextContent("Asking to join");
expect(screen.getByRole("paragraph")).toHaveTextContent(`${bob.name} (${bob.userId})`);
expect(container.querySelector(".mx_RoomKnocksBar_paragraph")).toHaveTextContent(
`${bob.name} (${bob.userId})`,
);
});
describe("when a knock reason is not provided", () => {
@ -296,24 +298,30 @@ describe("RoomKnocksBar", () => {
describe("when knock members count is 2", () => {
it("renders a paragraph with two names", () => {
jest.spyOn(room, "getMembersWithMembership").mockReturnValue([bob, jane]);
getComponent(room);
expect(screen.getByRole("paragraph")).toHaveTextContent(`${bob.name} and ${jane.name}`);
const { container } = getComponent(room);
expect(container.querySelector(".mx_RoomKnocksBar_paragraph")).toHaveTextContent(
`${bob.name} and ${jane.name}`,
);
});
});
describe("when knock members count is 3", () => {
it("renders a paragraph with three names", () => {
jest.spyOn(room, "getMembersWithMembership").mockReturnValue([bob, jane, john]);
getComponent(room);
expect(screen.getByRole("paragraph")).toHaveTextContent(`${bob.name}, ${jane.name} and ${john.name}`);
const { container } = getComponent(room);
expect(container.querySelector(".mx_RoomKnocksBar_paragraph")).toHaveTextContent(
`${bob.name}, ${jane.name} and ${john.name}`,
);
});
});
describe("when knock count is greater than 3", () => {
it("renders a paragraph with two names and a count", () => {
jest.spyOn(room, "getMembersWithMembership").mockReturnValue([bob, jane, john, other]);
getComponent(room);
expect(screen.getByRole("paragraph")).toHaveTextContent(`${bob.name}, ${jane.name} and 2 others`);
const { container } = getComponent(room);
expect(container.querySelector(".mx_RoomKnocksBar_paragraph")).toHaveTextContent(
`${bob.name}, ${jane.name} and 2 others`,
);
});
});
});

View File

@ -25,7 +25,7 @@ exports[`<PinnedEventTile /> should render pinned event 1`] = `
class="mx_PinnedEventTile_top"
>
<span
aria-labelledby="floating-ui-1"
aria-labelledby="floating-ui-v83z1"
class="mx_PinnedEventTile_sender mx_Username_color2"
>
@alice:server.org
@ -101,7 +101,7 @@ exports[`<PinnedEventTile /> should render pinned event with thread info 1`] = `
class="mx_PinnedEventTile_top"
>
<span
aria-labelledby="floating-ui-6"
aria-labelledby="floating-ui-lzzu6"
class="mx_PinnedEventTile_sender mx_Username_color2"
>
@alice:server.org

View File

@ -3,7 +3,8 @@
exports[`ReadReceiptGroup <ReadReceiptPerson /> should display a tooltip 1`] = `
<div
class="_tooltip_1pslb_17"
id="floating-ui-6"
data-floating-ui-focusable=""
id="floating-ui-h0aa6"
role="tooltip"
style="position: absolute; left: 0px; top: 0px; transform: translate(0px, 0px);"
tabindex="-1"
@ -21,7 +22,7 @@ exports[`ReadReceiptGroup <ReadReceiptPerson /> should display a tooltip 1`] = `
stroke="none"
/>
<clippath
id="floating-ui-9"
id="floating-ui-myn19"
>
<rect
height="10"
@ -32,13 +33,13 @@ exports[`ReadReceiptGroup <ReadReceiptPerson /> should display a tooltip 1`] = `
</clippath>
</svg>
<span
id="floating-ui-4"
id="floating-ui-jfzo4"
>
Alice
</span>
<span
class="_caption_1pslb_37 cpd-theme-dark"
id="floating-ui-5"
id="floating-ui-qc6f5"
>
@alice:example.org
</span>

View File

@ -47,7 +47,7 @@ exports[`RoomHeader dm does not show the face pile for DMs 1`] = `
style="--mx-flex-display: flex; --mx-flex-direction: row; --mx-flex-align: center; --mx-flex-justify: start; --mx-flex-gap: var(--cpd-space-2x);"
>
<button
aria-labelledby="floating-ui-1180"
aria-labelledby="floating-ui-d01t1180"
class="_icon-button_bh2qc_17"
role="button"
style="--cpd-icon-button-size: 32px;"
@ -73,7 +73,7 @@ exports[`RoomHeader dm does not show the face pile for DMs 1`] = `
<button
aria-disabled="true"
aria-label="There's no one here to call"
aria-labelledby="floating-ui-1185"
aria-labelledby="floating-ui-pz7p1185"
class="_icon-button_bh2qc_17"
role="button"
style="--cpd-icon-button-size: 32px;"
@ -98,7 +98,7 @@ exports[`RoomHeader dm does not show the face pile for DMs 1`] = `
</button>
<button
aria-label="Room info"
aria-labelledby="floating-ui-1190"
aria-labelledby="floating-ui-m28y1190"
class="_icon-button_bh2qc_17"
role="button"
style="--cpd-icon-button-size: 32px;"
@ -123,7 +123,7 @@ exports[`RoomHeader dm does not show the face pile for DMs 1`] = `
</button>
<button
aria-label="Threads"
aria-labelledby="floating-ui-1195"
aria-labelledby="floating-ui-fg1o1195"
class="_icon-button_bh2qc_17"
role="button"
style="--cpd-icon-button-size: 32px;"

View File

@ -19,7 +19,7 @@ exports[`<ThirdPartyMemberInfo /> should render invite 1`] = `
</p>
</div>
<button
aria-labelledby="floating-ui-1"
aria-labelledby="floating-ui-1c881"
class="_icon-button_bh2qc_17 _subtle-bg_bh2qc_38"
data-testid="base-card-close-button"
role="button"
@ -93,7 +93,7 @@ exports[`<ThirdPartyMemberInfo /> should render invite when room in not availabl
</p>
</div>
<button
aria-labelledby="floating-ui-6"
aria-labelledby="floating-ui-thxu6"
class="_icon-button_bh2qc_17 _subtle-bg_bh2qc_38"
data-testid="base-card-close-button"
role="button"

View File

@ -6,7 +6,7 @@ exports[`FormattingButtons renders in german 1`] = `
class="mx_FormattingButtons"
>
<button
aria-label="Fett"
aria-label="composer"
class="mx_AccessibleButton mx_FormattingButtons_Button mx_FormattingButtons_Button_hover"
role="button"
tabindex="0"
@ -25,7 +25,7 @@ exports[`FormattingButtons renders in german 1`] = `
</svg>
</button>
<button
aria-label="Kursiv"
aria-label="composer"
class="mx_AccessibleButton mx_FormattingButtons_Button mx_FormattingButtons_Button_hover"
role="button"
tabindex="0"
@ -44,7 +44,7 @@ exports[`FormattingButtons renders in german 1`] = `
</svg>
</button>
<button
aria-label="Unterstrichen"
aria-label="composer"
class="mx_AccessibleButton mx_FormattingButtons_Button mx_FormattingButtons_Button_hover"
role="button"
tabindex="0"
@ -63,7 +63,7 @@ exports[`FormattingButtons renders in german 1`] = `
</svg>
</button>
<button
aria-label="Durchgestrichen"
aria-label="composer"
class="mx_AccessibleButton mx_FormattingButtons_Button mx_FormattingButtons_Button_hover"
role="button"
tabindex="0"
@ -82,7 +82,7 @@ exports[`FormattingButtons renders in german 1`] = `
</svg>
</button>
<button
aria-label="Ungeordnete Liste"
aria-label="composer"
class="mx_AccessibleButton mx_FormattingButtons_Button mx_FormattingButtons_Button_hover"
role="button"
tabindex="0"
@ -101,7 +101,7 @@ exports[`FormattingButtons renders in german 1`] = `
</svg>
</button>
<button
aria-label="Nummerierte Liste"
aria-label="composer"
class="mx_AccessibleButton mx_FormattingButtons_Button mx_FormattingButtons_Button_hover"
role="button"
tabindex="0"
@ -120,7 +120,7 @@ exports[`FormattingButtons renders in german 1`] = `
</svg>
</button>
<button
aria-label="Zitieren"
aria-label="action"
class="mx_AccessibleButton mx_FormattingButtons_Button mx_FormattingButtons_Button_hover"
role="button"
tabindex="0"
@ -139,7 +139,7 @@ exports[`FormattingButtons renders in german 1`] = `
</svg>
</button>
<button
aria-label="Code"
aria-label="composer"
class="mx_AccessibleButton mx_FormattingButtons_Button mx_FormattingButtons_Button_hover"
role="button"
tabindex="0"
@ -158,7 +158,7 @@ exports[`FormattingButtons renders in german 1`] = `
</svg>
</button>
<button
aria-label="Quelltextblock"
aria-label="composer"
class="mx_AccessibleButton mx_FormattingButtons_Button mx_FormattingButtons_Button_hover"
role="button"
tabindex="0"
@ -177,7 +177,7 @@ exports[`FormattingButtons renders in german 1`] = `
</svg>
</button>
<button
aria-label="Link"
aria-label="composer"
class="mx_AccessibleButton mx_FormattingButtons_Button mx_FormattingButtons_Button_hover"
role="button"
tabindex="0"

View File

@ -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="floating-ui-00dz24"
class="_icon-button_bh2qc_17 _destructive_bh2qc_83"
role="button"
style="--cpd-icon-button-size: 32px;"
@ -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="floating-ui-uox11"
class="_icon-button_bh2qc_17 _destructive_bh2qc_83"
role="button"
style="--cpd-icon-button-size: 32px;"

View File

@ -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="floating-ui-mabr6"
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="floating-ui-lbo81"
data-testid="device-select-all-checkbox"
id="device-select-all-checkbox"
type="checkbox"

View File

@ -6,7 +6,7 @@ SPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only
Please see LICENSE files in the repository root for full details.
*/
import { act, fireEvent, render, screen, within } from "jest-matrix-react";
import { act, fireEvent, render, screen } from "jest-matrix-react";
import {
EventTimeline,
EventType,
@ -46,7 +46,7 @@ describe("PeopleRoomSettingsTab", () => {
</MatrixClientContext.Provider>,
);
const getGroup = () => screen.getByRole("group", { name: "Asking to join" });
const getParagraph = () => screen.getByRole("paragraph");
const getParagraph = () => document.querySelector("p");
it("renders a heading", () => {
getComponent(room);
@ -115,7 +115,7 @@ describe("PeopleRoomSettingsTab", () => {
it("allows to expand a reason", () => {
getComponent(room);
fireEvent.click(getButton("See more"));
expect(within(getGroup()).getByRole("paragraph")).toHaveTextContent(reason);
expect(getGroup().querySelector("p")).toHaveTextContent(reason);
});
it("allows to collapse a reason", () => {

View File

@ -352,7 +352,7 @@ exports[`<SessionManagerTab /> goes to filtered list from security recommendatio
>
<input
aria-label="Select all"
aria-labelledby="floating-ui-142"
aria-labelledby="floating-ui-bhqy142"
data-testid="device-select-all-checkbox"
id="device-select-all-checkbox"
type="checkbox"

View File

@ -229,12 +229,12 @@ exports[`<SpacePanel /> should show all activated MetaSpaces in the correct orde
class="mx_ThreadsActivityCentre_container"
>
<button
aria-controls="floating-ui-40"
aria-describedby="floating-ui-40"
aria-controls="floating-ui-mjxi40"
aria-describedby="floating-ui-mjxi40"
aria-expanded="true"
aria-haspopup="dialog"
aria-label="Threads"
aria-labelledby="floating-ui-33"
aria-labelledby="floating-ui-ifq433"
class="_icon-button_bh2qc_17 mx_ThreadsActivityCentreButton"
role="button"
style="--cpd-icon-button-size: 32px;"
@ -258,6 +258,11 @@ exports[`<SpacePanel /> should show all activated MetaSpaces in the correct orde
</svg>
</div>
</button>
<span
aria-hidden="true"
style="border: 0px; height: 1px; margin: -1px; overflow: hidden; padding: 0px; position: fixed; white-space: nowrap; width: 1px; top: 0px; left: 0px;"
tabindex="-1"
/>
<span
data-floating-ui-focus-guard=""
data-type="outside"
@ -266,7 +271,7 @@ exports[`<SpacePanel /> should show all activated MetaSpaces in the correct orde
tabindex="0"
/>
<span
aria-owns="undefined"
aria-owns="floating-ui-tf1337"
style="border: 0px; height: 1px; margin: -1px; overflow: hidden; padding: 0px; position: fixed; white-space: nowrap; width: 1px; top: 0px; left: 0px;"
/>
<span

View File

@ -150,7 +150,7 @@ exports[`ThreadsActivityCentre should close the release announcement when the TA
aria-expanded="true"
aria-haspopup="menu"
aria-label="Threads"
aria-labelledby="floating-ui-42"
aria-labelledby="floating-ui-hbr542"
class="_icon-button_bh2qc_17 mx_ThreadsActivityCentreButton"
data-state="open"
id="radix-2"
@ -183,10 +183,11 @@ exports[`ThreadsActivityCentre should close the release announcement when the TA
aria-hidden="true"
data-aria-hidden="true"
data-floating-ui-portal=""
id="floating-ui-46"
id="floating-ui-k9oa46"
>
<div
class="_tooltip_1pslb_17 _invisible_1pslb_30"
data-floating-ui-focusable=""
style="position: absolute; left: 0px; top: 0px; transform: translate(6px, 5px);"
tabindex="-1"
>
@ -203,7 +204,7 @@ exports[`ThreadsActivityCentre should close the release announcement when the TA
stroke="none"
/>
<clippath
id="floating-ui-47"
id="floating-ui-c5yf47"
>
<rect
height="10"
@ -214,7 +215,7 @@ exports[`ThreadsActivityCentre should close the release announcement when the TA
</clippath>
</svg>
<span
id="floating-ui-42"
id="floating-ui-hbr542"
>
Threads
</span>
@ -483,12 +484,12 @@ exports[`ThreadsActivityCentre should render the release announcement 1`] = `
class="mx_ThreadsActivityCentre_container"
>
<button
aria-controls="floating-ui-8"
aria-describedby="floating-ui-8"
aria-controls="floating-ui-dh9r8"
aria-describedby="floating-ui-dh9r8"
aria-expanded="true"
aria-haspopup="dialog"
aria-label="Threads"
aria-labelledby="floating-ui-10"
aria-labelledby="floating-ui-bsvo10"
class="_icon-button_bh2qc_17 mx_ThreadsActivityCentreButton"
role="button"
style="--cpd-icon-button-size: 32px;"
@ -512,6 +513,11 @@ exports[`ThreadsActivityCentre should render the release announcement 1`] = `
</svg>
</div>
</button>
<span
aria-hidden="true"
style="border: 0px; height: 1px; margin: -1px; overflow: hidden; padding: 0px; position: fixed; white-space: nowrap; width: 1px; top: 0px; left: 0px;"
tabindex="-1"
/>
<span
data-floating-ui-focus-guard=""
data-type="outside"
@ -520,7 +526,7 @@ exports[`ThreadsActivityCentre should render the release announcement 1`] = `
tabindex="0"
/>
<span
aria-owns="floating-ui-15"
aria-owns="floating-ui-1xw415"
style="border: 0px; height: 1px; margin: -1px; overflow: hidden; padding: 0px; position: fixed; white-space: nowrap; width: 1px; top: 0px; left: 0px;"
/>
<span
@ -535,10 +541,11 @@ exports[`ThreadsActivityCentre should render the release announcement 1`] = `
<div
data-floating-ui-inert=""
data-floating-ui-portal=""
id="floating-ui-14"
id="floating-ui-meuw14"
>
<div
class="_tooltip_1pslb_17 _invisible_1pslb_30"
data-floating-ui-focusable=""
style="position: absolute; left: 0px; top: 0px; transform: translate(0px, 0px);"
tabindex="-1"
>
@ -555,7 +562,7 @@ exports[`ThreadsActivityCentre should render the release announcement 1`] = `
stroke="none"
/>
<clippath
id="floating-ui-16"
id="floating-ui-dccs16"
>
<rect
height="10"
@ -566,7 +573,7 @@ exports[`ThreadsActivityCentre should render the release announcement 1`] = `
</clippath>
</svg>
<span
id="floating-ui-10"
id="floating-ui-bsvo10"
>
Threads
</span>
@ -574,7 +581,7 @@ exports[`ThreadsActivityCentre should render the release announcement 1`] = `
</div>
<div
data-floating-ui-portal=""
id="floating-ui-15"
id="floating-ui-1xw415"
>
<span
data-floating-ui-focus-guard=""
@ -585,10 +592,11 @@ exports[`ThreadsActivityCentre should render the release announcement 1`] = `
tabindex="0"
/>
<div
aria-describedby="floating-ui-7"
aria-labelledby="floating-ui-6"
aria-describedby="floating-ui-xjg57"
aria-labelledby="floating-ui-ckeg6"
class="_content_1oa1y_17"
id="floating-ui-8"
data-floating-ui-focusable=""
id="floating-ui-dh9r8"
role="dialog"
style="position: absolute; left: 0px; top: 0px; transform: translate(0px, 0px);"
tabindex="-1"
@ -606,7 +614,7 @@ exports[`ThreadsActivityCentre should render the release announcement 1`] = `
stroke="none"
/>
<clippath
id="floating-ui-17"
id="floating-ui-lg3d17"
>
<rect
height="20"
@ -618,13 +626,13 @@ exports[`ThreadsActivityCentre should render the release announcement 1`] = `
</svg>
<h3
class="_typography_yh5dq_162 _font-body-lg-semibold_yh5dq_83 _header_1oa1y_46"
id="floating-ui-6"
id="floating-ui-ckeg6"
>
Threads Activity Centre
</h3>
<span
class="_typography_yh5dq_162 _font-body-sm-regular_yh5dq_40 _description_1oa1y_52"
id="floating-ui-7"
id="floating-ui-xjg57"
>
Threads notifications have moved, find them here from now on.
</span>

View File

@ -11,7 +11,7 @@ import { render } from "jest-matrix-react";
import { TextInputField } from "@matrix-org/react-sdk-module-api/lib/components/TextInputField";
import { Spinner as ModuleSpinner } from "@matrix-org/react-sdk-module-api/lib/components/Spinner";
import "../../src/modules/ModuleRunner";
import "../../../src/modules/ModuleRunner";
describe("Module Components", () => {
// Note: we're not testing to see if there's components that are missing a renderFactory()

View File

@ -11,7 +11,7 @@ import { mocked } from "jest-mock";
import PWAPlatform from "../../../../src/vector/platform/PWAPlatform";
import WebPlatform from "../../../../src/vector/platform/WebPlatform";
jest.mock("../../../../../src/vector/platform/WebPlatform");
jest.mock("../../../../src/vector/platform/WebPlatform");
describe("PWAPlatform", () => {
beforeEach(() => {

View File

@ -8763,7 +8763,7 @@ minimatch@^9.0.4:
dependencies:
brace-expansion "^2.0.1"
minimist@^1.2.0, minimist@^1.2.5, minimist@^1.2.6, minimist@^1.2.8, minimist@~1.2.5:
minimist@^1.2.0, minimist@^1.2.6, minimist@^1.2.8, minimist@~1.2.5:
version "1.2.8"
resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.8.tgz#c1a464e7693302e082a075cee0c057741ac4772c"
integrity sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==