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

Commit ca16462

Browse files
committed
Merge remote-tracking branch 'origin/develop' into staging
2 parents 0c28d37 + 679b170 commit ca16462

File tree

155 files changed

+2932
-1853
lines changed

Some content is hidden

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

155 files changed

+2932
-1853
lines changed

package.json

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -62,12 +62,13 @@
6262
"resolutions": {
6363
"@types/react-dom": "17.0.25",
6464
"@types/react": "17.0.80",
65+
"@types/seedrandom": "3.0.4",
6566
"oidc-client-ts": "3.0.1",
6667
"jwt-decode": "4.0.0"
6768
},
6869
"dependencies": {
6970
"@babel/runtime": "^7.12.5",
70-
"@matrix-org/analytics-events": "^0.20.0",
71+
"@matrix-org/analytics-events": "^0.21.0",
7172
"@matrix-org/emojibase-bindings": "^1.1.2",
7273
"@matrix-org/matrix-wysiwyg": "2.17.0",
7374
"@matrix-org/olm": "3.2.15",
@@ -76,11 +77,12 @@
7677
"@sentry/browser": "^7.0.0",
7778
"@testing-library/react-hooks": "^8.0.1",
7879
"@vector-im/compound-design-tokens": "^1.2.0",
79-
"@vector-im/compound-web": "^4.2.0",
80+
"@vector-im/compound-web": "^4.3.1",
8081
"@zxcvbn-ts/core": "^3.0.4",
8182
"@zxcvbn-ts/language-common": "^3.0.4",
8283
"@zxcvbn-ts/language-en": "^3.0.2",
8384
"await-lock": "^2.1.0",
85+
"bloom-filters": "^3.0.1",
8486
"blurhash": "^2.0.3",
8587
"classnames": "^2.2.6",
8688
"commonmark": "^0.31.0",
@@ -90,7 +92,7 @@
9092
"emojibase-regex": "15.3.0",
9193
"escape-html": "^1.0.3",
9294
"file-saver": "^2.0.5",
93-
"filesize": "10.1.1",
95+
"filesize": "10.1.2",
9496
"gfm.css": "^1.1.2",
9597
"glob-to-regexp": "^0.4.1",
9698
"graphemer": "^1.4.0",
@@ -116,7 +118,7 @@
116118
"opus-recorder": "^8.0.3",
117119
"pako": "^2.0.3",
118120
"png-chunks-extract": "^1.0.0",
119-
"posthog-js": "1.130.1",
121+
"posthog-js": "1.131.4",
120122
"proposal-temporal": "^0.9.0",
121123
"qrcode": "1.5.3",
122124
"re-resizable": "^6.9.0",
@@ -182,12 +184,13 @@
182184
"@types/react-transition-group": "^4.4.0",
183185
"@types/sanitize-html": "2.11.0",
184186
"@types/sdp-transform": "^2.4.6",
187+
"@types/seedrandom": "3.0.4",
185188
"@types/tar-js": "^0.3.2",
186189
"@types/ua-parser-js": "^0.7.36",
187190
"@types/uuid": "^9.0.2",
188191
"@typescript-eslint/eslint-plugin": "^7.0.0",
189192
"@typescript-eslint/parser": "^7.0.0",
190-
"axe-core": "4.9.0",
193+
"axe-core": "4.9.1",
191194
"babel-jest": "^29.0.0",
192195
"blob-polyfill": "^7.0.0",
193196
"eslint": "8.57.0",
@@ -200,7 +203,7 @@
200203
"eslint-plugin-matrix-org": "1.2.1",
201204
"eslint-plugin-react": "^7.28.0",
202205
"eslint-plugin-react-hooks": "^4.3.0",
203-
"eslint-plugin-unicorn": "^52.0.0",
206+
"eslint-plugin-unicorn": "^53.0.0",
204207
"express": "^4.18.2",
205208
"fake-indexeddb": "^5.0.2",
206209
"fetch-mock-jest": "^1.5.1",

playwright/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM mcr.microsoft.com/playwright:v1.43.1-jammy
1+
FROM mcr.microsoft.com/playwright:v1.44.0-jammy
22

33
WORKDIR /work/matrix-react-sdk
44
VOLUME ["/work/element-web/node_modules"]

playwright/e2e/crypto/verification.spec.ts

Lines changed: 57 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -240,24 +240,26 @@ test.describe("User verification", () => {
240240
test.use({
241241
displayName: "Alice",
242242
botCreateOpts: { displayName: "Bob", autoAcceptInvites: true, userIdPrefix: "bob_" },
243+
room: async ({ page, app, bot: bob, user: aliceCredentials }, use) => {
244+
await app.client.bootstrapCrossSigning(aliceCredentials);
245+
246+
// the other user creates a DM
247+
const dmRoomId = await createDMRoom(bob, aliceCredentials.userId);
248+
249+
// accept the DM
250+
await app.viewRoomByName("Bob");
251+
await page.getByRole("button", { name: "Start chatting" }).click();
252+
await use({ roomId: dmRoomId });
253+
},
243254
});
244255

245256
test("can receive a verification request when there is no existing DM", async ({
246257
page,
247-
app,
248258
bot: bob,
249259
user: aliceCredentials,
250260
toasts,
261+
room: { roomId: dmRoomId },
251262
}) => {
252-
await app.client.bootstrapCrossSigning(aliceCredentials);
253-
254-
// the other user creates a DM
255-
const dmRoomId = await createDMRoom(bob, aliceCredentials.userId);
256-
257-
// accept the DM
258-
await app.viewRoomByName("Bob");
259-
await page.getByRole("button", { name: "Start chatting" }).click();
260-
261263
// once Alice has joined, Bob starts the verification
262264
const bobVerificationRequest = await bob.evaluateHandle(
263265
async (client, { dmRoomId, aliceCredentials }) => {
@@ -294,6 +296,51 @@ test.describe("User verification", () => {
294296
await expect(page.getByText("You've successfully verified Bob!")).toBeVisible();
295297
await page.getByRole("button", { name: "Got it" }).click();
296298
});
299+
300+
test("can abort emoji verification when emoji mismatch", async ({
301+
page,
302+
bot: bob,
303+
user: aliceCredentials,
304+
toasts,
305+
room: { roomId: dmRoomId },
306+
cryptoBackend,
307+
}) => {
308+
test.skip(cryptoBackend === "legacy", "Not implemented for legacy crypto");
309+
310+
// once Alice has joined, Bob starts the verification
311+
const bobVerificationRequest = await bob.evaluateHandle(
312+
async (client, { dmRoomId, aliceCredentials }) => {
313+
const room = client.getRoom(dmRoomId);
314+
while (room.getMember(aliceCredentials.userId)?.membership !== "join") {
315+
await new Promise((resolve) => {
316+
room.once(window.matrixcs.RoomStateEvent.Members, resolve);
317+
});
318+
}
319+
320+
return client.getCrypto().requestVerificationDM(aliceCredentials.userId, dmRoomId);
321+
},
322+
{ dmRoomId, aliceCredentials },
323+
);
324+
325+
// Accept verification via toast
326+
const toast = await toasts.getToast("Verification requested");
327+
await toast.getByRole("button", { name: "Verify Session" }).click();
328+
329+
// request verification by emoji
330+
await page.locator("#mx_RightPanel").getByRole("button", { name: "Verify by emoji" }).click();
331+
332+
/* on the bot side, wait for the verifier to exist ... */
333+
const botVerifier = await awaitVerifier(bobVerificationRequest);
334+
// ... confirm ...
335+
botVerifier.evaluate((verifier) => verifier.verify()).catch(() => {});
336+
// ... and abort the verification
337+
await page.getByRole("button", { name: "They don't match" }).click();
338+
339+
const dialog = page.locator(".mx_Dialog");
340+
await expect(dialog.getByText("Your messages are not secure")).toBeVisible();
341+
await dialog.getByRole("button", { name: "OK" }).click();
342+
await expect(dialog).not.toBeVisible();
343+
});
297344
});
298345

299346
/** Extract the qrcode out of an on-screen html element */

playwright/e2e/room/room-header.spec.ts

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -276,4 +276,26 @@ test.describe("Room Header", () => {
276276
await expect(header).toMatchScreenshot("room-header-with-apps-button-not-highlighted.png");
277277
});
278278
});
279+
280+
test.describe("with encryption", () => {
281+
test("should render the E2E icon and the buttons", async ({ page, app, user }) => {
282+
// Create an encrypted room
283+
await app.client.createRoom({
284+
name: "Test Encrypted Room",
285+
initial_state: [
286+
{
287+
type: "m.room.encryption",
288+
state_key: "",
289+
content: {
290+
algorithm: "m.megolm.v1.aes-sha2",
291+
},
292+
},
293+
],
294+
});
295+
await app.viewRoomByName("Test Encrypted Room");
296+
297+
const header = page.locator(".mx_LegacyRoomHeader");
298+
await expect(header).toMatchScreenshot("encrypted-room-header.png");
299+
});
300+
});
279301
});

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

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -133,9 +133,7 @@ test.describe("General user settings tab", () => {
133133
test("should support adding and removing a profile picture", async ({ uut }) => {
134134
const profileSettings = uut.locator(".mx_ProfileSettings");
135135
// Upload a picture
136-
await profileSettings
137-
.locator(".mx_ProfileSettings_avatarUpload")
138-
.setInputFiles("playwright/sample-files/riot.png");
136+
await profileSettings.getByAltText("Upload").setInputFiles("playwright/sample-files/riot.png");
139137

140138
// Find and click "Remove" link button
141139
await profileSettings.locator(".mx_ProfileSettings_profile").getByRole("button", { name: "Remove" }).click();
5.38 KB
Loading
-2.25 KB
Loading

res/css/components/views/elements/_AppPermission.pcss

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -44,24 +44,3 @@ limitations under the License.
4444
}
4545
}
4646
}
47-
48-
.mx_Tooltip.mx_Tooltip--appPermission {
49-
box-shadow: none;
50-
background-color: $tooltip-timeline-bg-color;
51-
color: $tooltip-timeline-fg-color;
52-
border: none;
53-
border-radius: 3px;
54-
padding: 6px 8px;
55-
56-
&.mx_Tooltip--appPermission--dark {
57-
.mx_Tooltip_chevron::after {
58-
border-right-color: $tooltip-timeline-bg-color;
59-
}
60-
}
61-
62-
ul {
63-
list-style-position: inside;
64-
padding-left: 2px;
65-
margin-left: 0;
66-
}
67-
}

res/css/structures/_SpacePanel.pcss

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -472,3 +472,10 @@ limitations under the License.
472472
.mx_SpacePanel_sharePublicSpace {
473473
margin: 0;
474474
}
475+
476+
.mx_SpacePanel_Tooltip_KeyboardShortcut {
477+
kbd {
478+
font-family: inherit;
479+
text-transform: capitalize;
480+
}
481+
}

res/css/structures/_TabbedView.pcss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ limitations under the License.
167167
}
168168

169169
/* Hide the labels on tabs, showing only the icons, on narrow viewports. */
170-
@media (max-width: 768px) {
170+
@media (max-width: 1024px) {
171171
.mx_TabbedView_tabsOnLeft.mx_TabbedView_responsive {
172172
.mx_TabbedView_tabLabel_text {
173173
display: none;

0 commit comments

Comments
 (0)