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

Commit b00322d

Browse files
committed
Merge branch 'develop' of https://github.com/matrix-org/matrix-react-sdk into t3chguy/fix/24963
2 parents 607f016 + ea6a203 commit b00322d

File tree

115 files changed

+1966
-1242
lines changed

Some content is hidden

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

115 files changed

+1966
-1242
lines changed

.github/workflows/element-web.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
name: Element Web - Build
55
on:
66
schedule:
7-
- cron: "17 4 * * *" # every day at 04:17 UTC
7+
- cron: "17 4 * * 1-5" # every weekday at 04:17 UTC
88
pull_request: {}
99
push:
1010
branches: [develop, master]

cypress/e2e/composer/composer.spec.ts

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -42,39 +42,39 @@ describe("Composer", () => {
4242

4343
it("sends a message when you click send or press Enter", () => {
4444
// Type a message
45-
cy.get("div[contenteditable=true]").type("my message 0");
45+
cy.findTextbox("Send a message…").type("my message 0");
4646
// It has not been sent yet
4747
cy.contains(".mx_EventTile_body", "my message 0").should("not.exist");
4848

4949
// Click send
50-
cy.get('div[aria-label="Send message"]').click();
50+
cy.findButton("Send message").click();
5151
// It has been sent
5252
cy.contains(".mx_EventTile_body", "my message 0");
5353

5454
// Type another and press Enter afterwards
55-
cy.get("div[contenteditable=true]").type("my message 1{enter}");
55+
cy.findTextbox("Send a message…").type("my message 1{enter}");
5656
// It was sent
5757
cy.contains(".mx_EventTile_body", "my message 1");
5858
});
5959

6060
it("can write formatted text", () => {
61-
cy.get("div[contenteditable=true]").type("my bold{ctrl+b} message");
62-
cy.get('div[aria-label="Send message"]').click();
61+
cy.findTextbox("Send a message…").type("my bold{ctrl+b} message");
62+
cy.findButton("Send message").click();
6363
// Note: both "bold" and "message" are bold, which is probably surprising
6464
cy.contains(".mx_EventTile_body strong", "bold message");
6565
});
6666

6767
it("should allow user to input emoji via graphical picker", () => {
6868
cy.getComposer(false).within(() => {
69-
cy.get('[aria-label="Emoji"]').click();
69+
cy.findButton("Emoji").click();
7070
});
7171

7272
cy.get('[data-testid="mx_EmojiPicker"]').within(() => {
7373
cy.contains(".mx_EmojiPicker_item", "😇").click();
7474
});
7575

7676
cy.get(".mx_ContextualMenu_background").click(); // Close emoji picker
77-
cy.get("div[contenteditable=true]").type("{enter}"); // Send message
77+
cy.findTextbox("Send a message…").type("{enter}"); // Send message
7878

7979
cy.contains(".mx_EventTile_body", "😇");
8080
});
@@ -86,12 +86,12 @@ describe("Composer", () => {
8686

8787
it("only sends when you press Ctrl+Enter", () => {
8888
// Type a message and press Enter
89-
cy.get("div[contenteditable=true]").type("my message 3{enter}");
89+
cy.findTextbox("Send a message…").type("my message 3{enter}");
9090
// It has not been sent yet
9191
cy.contains(".mx_EventTile_body", "my message 3").should("not.exist");
9292

9393
// Press Ctrl+Enter
94-
cy.get("div[contenteditable=true]").type("{ctrl+enter}");
94+
cy.findTextbox("Send a message…").type("{ctrl+enter}");
9595
// It was sent
9696
cy.contains(".mx_EventTile_body", "my message 3");
9797
});
@@ -114,7 +114,7 @@ describe("Composer", () => {
114114
cy.contains(".mx_EventTile_body", "my message 0").should("not.exist");
115115

116116
// Click send
117-
cy.get('div[aria-label="Send message"]').click();
117+
cy.findButton("Send message").click();
118118
// It has been sent
119119
cy.contains(".mx_EventTile_body", "my message 0");
120120

@@ -143,7 +143,7 @@ describe("Composer", () => {
143143

144144
it("can write formatted text", () => {
145145
cy.get("div[contenteditable=true]").type("my {ctrl+b}bold{ctrl+b} message");
146-
cy.get('div[aria-label="Send message"]').click();
146+
cy.findButton("Send message").click();
147147
cy.contains(".mx_EventTile_body strong", "bold");
148148
});
149149

@@ -172,13 +172,13 @@ describe("Composer", () => {
172172
cy.get("div[contenteditable=true]").type("my message 0{selectAll}");
173173

174174
// Open link modal
175-
cy.get('button[aria-label="Link"]').click();
175+
cy.findButton("Link").click();
176176
// Fill the link field
177-
cy.get('input[label="Link"]').type("https://matrix.org/");
177+
cy.findTextbox("Link").type("https://matrix.org/");
178178
// Click on save
179-
cy.get('button[type="submit"]').click();
179+
cy.findButton("Save").click();
180180
// Send the message
181-
cy.get('div[aria-label="Send message"]').click();
181+
cy.findButton("Send message").click();
182182

183183
// It was sent
184184
cy.contains(".mx_EventTile_body a", "my message 0");

cypress/e2e/right-panel/file-panel.spec.ts

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -210,6 +210,22 @@ describe("FilePanel", () => {
210210
});
211211
});
212212
});
213+
214+
it("should not add inline padding to a tile when it is selected with right click", () => {
215+
// Upload a file
216+
uploadFile("cypress/fixtures/1sec.ogg");
217+
218+
cy.get(".mx_FilePanel .mx_RoomView_MessageList").within(() => {
219+
// Wait until the spinner of the audio player vanishes
220+
cy.get(".mx_InlineSpinner").should("not.exist");
221+
222+
// Right click the uploaded file to select the tile
223+
cy.get(".mx_EventTile").rightclick();
224+
225+
// Assert that inline padding is not applied
226+
cy.get(".mx_EventTile_selected .mx_EventTile_line").should("have.css", "padding-inline", "0px");
227+
});
228+
});
213229
});
214230

215231
describe("download", () => {
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
/*
2+
Copyright 2023 Suguru Hirahara
3+
4+
Licensed under the Apache License, Version 2.0 (the "License");
5+
you may not use this file except in compliance with the License.
6+
You may obtain a copy of the License at
7+
8+
http://www.apache.org/licenses/LICENSE-2.0
9+
10+
Unless required by applicable law or agreed to in writing, software
11+
distributed under the License is distributed on an "AS IS" BASIS,
12+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
See the License for the specific language governing permissions and
14+
limitations under the License.
15+
*/
16+
17+
/// <reference types="cypress" />
18+
19+
import { HomeserverInstance } from "../../plugins/utils/homeserver";
20+
21+
const USER_NAME = "Alice";
22+
23+
describe("Set integration manager", () => {
24+
let homeserver: HomeserverInstance;
25+
26+
beforeEach(() => {
27+
cy.startHomeserver("default").then((data) => {
28+
homeserver = data;
29+
cy.initTestUser(homeserver, USER_NAME);
30+
});
31+
});
32+
33+
afterEach(() => {
34+
cy.stopHomeserver(homeserver);
35+
});
36+
37+
it("should be correctly rendered", () => {
38+
cy.openUserSettings("General");
39+
40+
cy.get(".mx_SetIntegrationManager").within(() => {
41+
// Assert the toggle switch is enabled by default
42+
cy.get(".mx_ToggleSwitch_enabled").should("exist");
43+
44+
// Assert space between "Manage integrations" and the integration server address is set to 4px;
45+
cy.get(".mx_SetIntegrationManager_heading_manager").should("have.css", "column-gap", "4px");
46+
47+
cy.get(".mx_SetIntegrationManager_heading_manager").within(() => {
48+
cy.get(".mx_SettingsTab_heading").should("have.text", "Manage integrations");
49+
50+
// Assert the headings' inline end margin values are set to zero in favor of the column-gap declaration
51+
cy.get(".mx_SettingsTab_heading").should("have.css", "margin-inline-end", "0px");
52+
cy.get(".mx_SettingsTab_subheading").should("have.css", "margin-inline-end", "0px");
53+
});
54+
});
55+
56+
cy.get(".mx_SetIntegrationManager").percySnapshotElement("'Manage integrations' on General settings tab", {
57+
widths: [692], // actual width of mx_SetIntegrationManager
58+
});
59+
});
60+
});

cypress/e2e/sliding-sync/sliding-sync.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ describe("Sliding Sync", () => {
202202

203203
// disable notifs in this room (TODO: CS API call?)
204204
cy.contains(".mx_RoomTile", "Test Room").find(".mx_RoomTile_notificationsButton").click({ force: true });
205-
cy.contains("Off").click();
205+
cy.contains("Mute room").click();
206206

207207
// create a new room so we know when the message has been received as it'll re-shuffle the room list
208208
cy.createRoom({

0 commit comments

Comments
 (0)