Skip to content
This repository was archived by the owner on Sep 11, 2024. It is now read-only.

Commit 8b38839

Browse files
authored
Merge branch 'develop' into prbranch
2 parents 80833d8 + aec2f1f commit 8b38839

File tree

591 files changed

+12577
-10490
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

591 files changed

+12577
-10490
lines changed

.eslintrc.js

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -144,20 +144,6 @@ module.exports = {
144144
"!matrix-js-sdk/src/models/read-receipt",
145145
"!matrix-js-sdk/src/models/relations-container",
146146
"!matrix-js-sdk/src/models/related-relations",
147-
"!matrix-js-sdk/src/@types",
148-
"!matrix-js-sdk/src/@types/global",
149-
"!matrix-js-sdk/src/@types/auth",
150-
"!matrix-js-sdk/src/@types/beacon",
151-
"!matrix-js-sdk/src/@types/threepids",
152-
"!matrix-js-sdk/src/@types/polls",
153-
"!matrix-js-sdk/src/@types/crypto",
154-
"!matrix-js-sdk/src/@types/local_notifications",
155-
"!matrix-js-sdk/src/@types/location",
156-
"!matrix-js-sdk/src/@types/topic",
157-
"!matrix-js-sdk/src/@types/registration",
158-
"!matrix-js-sdk/src/@types/read_receipts",
159-
"!matrix-js-sdk/src/@types/extensible_events",
160-
"!matrix-js-sdk/src/@types/IIdentityServerProvider",
161147
],
162148
message: "Please use matrix-js-sdk/src/matrix instead",
163149
},

.github/workflows/cypress.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ jobs:
163163
echo "CYPRESS_RUST_CRYPTO=1" >> "$GITHUB_ENV"
164164
165165
- name: Run Cypress tests
166-
uses: cypress-io/github-action@90dff940a41c08c7c344310eac7e57eda636326a
166+
uses: cypress-io/github-action@fa88e4afe551e64c8827a4b9e379afc63d8f691a
167167
with:
168168
working-directory: matrix-react-sdk
169169
# The built-in Electron runner seems to grind to a halt trying to run the tests, so use chrome.

.github/workflows/i18n_check.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ jobs:
1111

1212
- name: "Get modified files"
1313
id: changed_files
14-
if: github.event_name == 'pull_request' && github.event.pull_request.user.login != 'RiotTranslateBot'
15-
uses: tj-actions/changed-files@87697c0dca7dd44e37a2b79a79489332556ff1f3 # v37
14+
if: github.event_name == 'pull_request' && github.event.pull_request.user.login != 'RiotTranslateBot' && github.event.pull_request.user.login != 't3chguy'
15+
uses: tj-actions/changed-files@17f3fec1edef0c3916d59cbcee1585fcd457e456 # v38
1616
with:
1717
files: |
1818
src/i18n/strings/*
@@ -25,8 +25,8 @@ jobs:
2525
github.event.pull_request.user.login != 'RiotTranslateBot' &&
2626
steps.changed_files.outputs.any_modified == 'true'
2727
run: |
28-
echo "Only translation files modified by `yarn i18n` can be committed - other translation files will confuse weblate in unrecoverable ways."
2928
exit 1
29+
echo "Only translation files modified by 'yarn i18n' can be committed - other translation files will confuse weblate in unrecoverable ways."
3030
3131
- uses: actions/setup-node@v3
3232
with:

__mocks__/languages.json

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,4 @@
11
{
2-
"en": {
3-
"fileName": "en_EN.json",
4-
"label": "English"
5-
},
6-
"en-us": {
7-
"fileName": "en_US.json",
8-
"label": "English (US)"
9-
}
2+
"en": "en_EN.json",
3+
"en-us": "en_US.json"
104
}

cypress/e2e/audio-player/audio-player.spec.ts

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,8 @@ describe("Audio player", () => {
168168
it("should be correctly rendered - light theme with monospace font", () => {
169169
uploadFile("cypress/fixtures/1sec-long-name-audio-file.ogg");
170170

171-
takeSnapshots("Selected EventTile of audio player (light theme, monospace font)", true); // Enable monospace
171+
// Disabled because flaky - see https://github.com/vector-im/element-web/issues/24881
172+
//takeSnapshots("Selected EventTile of audio player (light theme, monospace font)", true); // Enable monospace
172173
});
173174

174175
it("should be correctly rendered - high contrast theme", () => {
@@ -186,7 +187,8 @@ describe("Audio player", () => {
186187

187188
uploadFile("cypress/fixtures/1sec-long-name-audio-file.ogg");
188189

189-
takeSnapshots("Selected EventTile of audio player (high contrast)");
190+
// Disabled because flaky - see https://github.com/vector-im/element-web/issues/24881
191+
//takeSnapshots("Selected EventTile of audio player (high contrast)");
190192
});
191193

192194
it("should be correctly rendered - dark theme", () => {
@@ -254,8 +256,8 @@ describe("Audio player", () => {
254256
});
255257
});
256258

257-
// Take snapshots
258-
takeSnapshots("Selected EventTile of audio player with a reply");
259+
// Disabled because flaky - see https://github.com/vector-im/element-web/issues/24881
260+
//takeSnapshots("Selected EventTile of audio player with a reply");
259261
});
260262

261263
it("should support creating a reply chain with multiple audio files", () => {

cypress/e2e/read-receipts/read-receipts.spec.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,7 @@ limitations under the License.
1616

1717
/// <reference types="cypress" />
1818

19-
import type { MatrixClient, MatrixEvent, ISendEventResponse } from "matrix-js-sdk/src/matrix";
20-
import type { ReceiptType } from "matrix-js-sdk/src/@types/read_receipts";
19+
import type { MatrixClient, MatrixEvent, ISendEventResponse, ReceiptType } from "matrix-js-sdk/src/matrix";
2120
import { HomeserverInstance } from "../../plugins/utils/homeserver";
2221

2322
describe("Read receipts", () => {

cypress/e2e/settings/general-user-settings-tab.spec.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -133,10 +133,12 @@ describe("General user settings tab", () => {
133133
cy.findByRole("button", { name: "Language Dropdown" }).click();
134134

135135
// Assert that the default option is rendered and highlighted
136-
cy.findByRole("option", { name: /Bahasa Indonesia/ })
136+
cy.findByRole("option", { name: /Albanian/ })
137137
.should("be.visible")
138138
.should("have.class", "mx_Dropdown_option_highlight");
139139

140+
cy.findByRole("option", { name: /Deutsch/ }).should("be.visible");
141+
140142
// Click again to close the dropdown
141143
cy.findByRole("button", { name: "Language Dropdown" }).click();
142144

@@ -230,7 +232,7 @@ describe("General user settings tab", () => {
230232
cy.closeDialog();
231233

232234
// Assert the avatar's initial characters are set
233-
cy.get(".mx_UserMenu .mx_BaseAvatar_initial").findByText("A").should("exist"); // Alice
234-
cy.get(".mx_RoomView_wrapper .mx_BaseAvatar_initial").findByText("A").should("exist"); // Alice
235+
cy.get(".mx_UserMenu .mx_BaseAvatar").findByText("A").should("exist"); // Alice
236+
cy.get(".mx_RoomView_wrapper .mx_BaseAvatar").findByText("A").should("exist"); // Alice
235237
});
236238
});

cypress/e2e/threads/threads.spec.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ describe("Threads", () => {
9898
// Wait until the both messages are read
9999
cy.get(".mx_ThreadView .mx_EventTile_last[data-layout=group]").within(() => {
100100
cy.get(".mx_EventTile_line .mx_MTextBody").findByText(MessageLong).should("exist");
101-
cy.get(".mx_ReadReceiptGroup .mx_BaseAvatar_image").should("be.visible");
101+
cy.get(".mx_ReadReceiptGroup .mx_BaseAvatar").should("be.visible");
102102

103103
// Make sure the CSS style for spacing is applied to mx_EventTile_line on group/modern layout
104104
cy.get(".mx_EventTile_line").should("have.css", "padding-inline-start", ThreadViewGroupSpacingStart);
@@ -118,7 +118,7 @@ describe("Threads", () => {
118118
cy.get(".mx_EventTile_line .mx_MTextBody").findByText(MessageLong).should("exist");
119119

120120
// Make sure the avatar inside ReadReceiptGroup is visible on the group layout
121-
cy.get(".mx_ReadReceiptGroup .mx_BaseAvatar_image").should("be.visible");
121+
cy.get(".mx_ReadReceiptGroup .mx_BaseAvatar").should("be.visible");
122122
});
123123

124124
// Enable the bubble layout
@@ -127,12 +127,12 @@ describe("Threads", () => {
127127
cy.get(".mx_ThreadView .mx_EventTile[data-layout='bubble'].mx_EventTile_last").within(() => {
128128
// TODO: remove this after fixing the issue of ReadReceiptGroup being hidden on the bubble layout
129129
// See: https://github.com/vector-im/element-web/issues/23569
130-
cy.get(".mx_ReadReceiptGroup .mx_BaseAvatar_image").should("exist");
130+
cy.get(".mx_ReadReceiptGroup .mx_BaseAvatar").should("exist");
131131

132132
// Make sure the avatar inside ReadReceiptGroup is visible on bubble layout
133133
// TODO: enable this after fixing the issue of ReadReceiptGroup being hidden on the bubble layout
134134
// See: https://github.com/vector-im/element-web/issues/23569
135-
// cy.get(".mx_ReadReceiptGroup .mx_BaseAvatar_image").should("be.visible");
135+
// cy.get(".mx_ReadReceiptGroup .mx_BaseAvatar").should("be.visible");
136136
});
137137

138138
// Re-enable the group layout

cypress/e2e/timeline/timeline.spec.ts

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ const expectDisplayName = (e: JQuery<HTMLElement>, displayName: string): void =>
4545
const expectAvatar = (e: JQuery<HTMLElement>, avatarUrl: string): void => {
4646
cy.all([cy.window({ log: false }), cy.getClient()]).then(([win, cli]) => {
4747
const size = AVATAR_SIZE * win.devicePixelRatio;
48-
expect(e.find(".mx_BaseAvatar_image").attr("src")).to.equal(
48+
expect(e.find(".mx_BaseAvatar img").attr("src")).to.equal(
4949
// eslint-disable-next-line no-restricted-properties
5050
cli.mxcUrlToHttp(avatarUrl, size, size, AVATAR_RESIZE_METHOD),
5151
);
@@ -197,10 +197,10 @@ describe("Timeline", () => {
197197

198198
cy.get(".mx_GenericEventListSummary").within(() => {
199199
// Click "expand" link button
200-
cy.findByRole("button", { name: "expand" }).click();
200+
cy.findByRole("button", { name: "Expand" }).click();
201201

202202
// Assert that the "expand" link button worked
203-
cy.findByRole("button", { name: "collapse" }).should("exist");
203+
cy.findByRole("button", { name: "Collapse" }).should("exist");
204204
});
205205

206206
cy.get(".mx_MainSplit").percySnapshotElement("Expanded GELS on IRC layout", { percyCSS });
@@ -224,10 +224,10 @@ describe("Timeline", () => {
224224

225225
cy.get(".mx_GenericEventListSummary").within(() => {
226226
// Click "expand" link button
227-
cy.findByRole("button", { name: "expand" }).click();
227+
cy.findByRole("button", { name: "Expand" }).click();
228228

229229
// Assert that the "expand" link button worked
230-
cy.findByRole("button", { name: "collapse" }).should("exist");
230+
cy.findByRole("button", { name: "Collapse" }).should("exist");
231231
});
232232

233233
cy.get(".mx_MainSplit").percySnapshotElement("Expanded GELS on modern layout", { percyCSS });
@@ -247,10 +247,10 @@ describe("Timeline", () => {
247247

248248
cy.get(".mx_GenericEventListSummary").within(() => {
249249
// Click "expand" link button
250-
cy.findByRole("button", { name: "expand" }).click();
250+
cy.findByRole("button", { name: "Expand" }).click();
251251

252252
// Assert that the "expand" link button worked
253-
cy.findByRole("button", { name: "collapse" }).should("exist");
253+
cy.findByRole("button", { name: "Collapse" }).should("exist");
254254
});
255255

256256
// Make sure spacer is not visible on bubble layout
@@ -270,10 +270,10 @@ describe("Timeline", () => {
270270
.realHover()
271271
.findByRole("toolbar", { name: "Message Actions" })
272272
.should("be.visible");
273-
cy.findByRole("button", { name: "collapse" }).click();
273+
cy.findByRole("button", { name: "Collapse" }).click();
274274

275275
// Assert that "collapse" link button worked
276-
cy.findByRole("button", { name: "expand" }).should("exist");
276+
cy.findByRole("button", { name: "Expand" }).should("exist");
277277
});
278278

279279
// Save snapshot of collapsed generic event list summary on bubble layout
@@ -292,7 +292,7 @@ describe("Timeline", () => {
292292
});
293293

294294
// Click "expand" link button
295-
cy.get(".mx_GenericEventListSummary").findByRole("button", { name: "expand" }).click();
295+
cy.get(".mx_GenericEventListSummary").findByRole("button", { name: "Expand" }).click();
296296

297297
// Check the event line has margin instead of inset property
298298
// cf. _EventTile.pcss
@@ -388,7 +388,7 @@ describe("Timeline", () => {
388388

389389
// 2. Alignment of expanded GELS and messages
390390
// Click "expand" link button
391-
cy.get(".mx_GenericEventListSummary").findByRole("button", { name: "expand" }).click();
391+
cy.get(".mx_GenericEventListSummary").findByRole("button", { name: "Expand" }).click();
392392
// Check inline start spacing of info line on expanded GELS
393393
cy.get(".mx_EventTile[data-layout=irc].mx_EventTile_info:first-of-type .mx_EventTile_line")
394394
// See: _EventTile.pcss

cypress/global.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ limitations under the License.
1717
import "../src/@types/global";
1818
import "../src/@types/svg";
1919
import "../src/@types/raw-loader";
20+
// eslint-disable-next-line no-restricted-imports
2021
import "matrix-js-sdk/src/@types/global";
2122
import type {
2223
MatrixClient,

0 commit comments

Comments
 (0)