diff --git a/CHANGELOG.md b/CHANGELOG.md
index c6b8e22f013..b82d5bc48e1 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,44 @@
+Changes in [3.53.0](https://github.com/matrix-org/matrix-react-sdk/releases/tag/v3.53.0) (2022-08-31)
+=====================================================================================================
+
+## ✨ Features
+ * Device manager - scroll to filtered list from security recommendations ([\#9227](https://github.com/matrix-org/matrix-react-sdk/pull/9227)). Contributed by @kerryarchibald.
+ * Device manager - updated dropdown style in filtered device list ([\#9226](https://github.com/matrix-org/matrix-react-sdk/pull/9226)). Contributed by @kerryarchibald.
+ * Device manager - device type and verification icons on device tile ([\#9197](https://github.com/matrix-org/matrix-react-sdk/pull/9197)). Contributed by @kerryarchibald.
+ * Ignore unreads in low priority rooms in the space panel ([\#6518](https://github.com/matrix-org/matrix-react-sdk/pull/6518)). Fixes vector-im/element-web#16836.
+ * Release message right-click context menu out of labs ([\#8613](https://github.com/matrix-org/matrix-react-sdk/pull/8613)).
+ * Device manager - expandable session details in device list ([\#9188](https://github.com/matrix-org/matrix-react-sdk/pull/9188)). Contributed by @kerryarchibald.
+ * Device manager - device list filtering ([\#9181](https://github.com/matrix-org/matrix-react-sdk/pull/9181)). Contributed by @kerryarchibald.
+ * Device manager - add verification details to session details ([\#9187](https://github.com/matrix-org/matrix-react-sdk/pull/9187)). Contributed by @kerryarchibald.
+ * Device manager - current session expandable details ([\#9185](https://github.com/matrix-org/matrix-react-sdk/pull/9185)). Contributed by @kerryarchibald.
+ * Device manager - security recommendations section ([\#9179](https://github.com/matrix-org/matrix-react-sdk/pull/9179)). Contributed by @kerryarchibald.
+ * The Welcome Home Screen: Return Button ([\#9089](https://github.com/matrix-org/matrix-react-sdk/pull/9089)). Fixes vector-im/element-web#22917. Contributed by @justjanne.
+ * Device manager - label devices as inactive ([\#9175](https://github.com/matrix-org/matrix-react-sdk/pull/9175)). Contributed by @kerryarchibald.
+ * Device manager - other sessions list ([\#9155](https://github.com/matrix-org/matrix-react-sdk/pull/9155)). Contributed by @kerryarchibald.
+ * Implement MSC3846: Allowing widgets to access TURN servers ([\#9061](https://github.com/matrix-org/matrix-react-sdk/pull/9061)).
+ * Allow widgets to send/receive to-device messages ([\#8885](https://github.com/matrix-org/matrix-react-sdk/pull/8885)).
+
+## 🐛 Bug Fixes
+ * Add super cool feature ([\#9222](https://github.com/matrix-org/matrix-react-sdk/pull/9222)). Contributed by @gefgu.
+ * Make use of js-sdk roomNameGenerator to handle i18n for generated room names ([\#9209](https://github.com/matrix-org/matrix-react-sdk/pull/9209)). Fixes vector-im/element-web#21369.
+ * Fix progress bar regression throughout the app ([\#9219](https://github.com/matrix-org/matrix-react-sdk/pull/9219)). Fixes vector-im/element-web#23121.
+ * Reuse empty string & space string logic for event types in devtools ([\#9218](https://github.com/matrix-org/matrix-react-sdk/pull/9218)). Fixes vector-im/element-web#23115.
+ * Reduce amount of requests done by the onboarding task list ([\#9194](https://github.com/matrix-org/matrix-react-sdk/pull/9194)). Fixes vector-im/element-web#23085. Contributed by @justjanne.
+ * Avoid hardcoding branding in user onboarding ([\#9206](https://github.com/matrix-org/matrix-react-sdk/pull/9206)). Fixes vector-im/element-web#23111. Contributed by @justjanne.
+ * End jitsi call when member is banned ([\#8879](https://github.com/matrix-org/matrix-react-sdk/pull/8879)). Contributed by @maheichyk.
+ * Fix context menu being opened when clicking message action bar buttons ([\#9200](https://github.com/matrix-org/matrix-react-sdk/pull/9200)). Fixes vector-im/element-web#22279 and vector-im/element-web#23100.
+ * Add gap between checkbox and text in report dialog following the same pattern (8px) used in the gap between the two buttons. It fixes vector-im/element-web#23060 ([\#9195](https://github.com/matrix-org/matrix-react-sdk/pull/9195)). Contributed by @gefgu.
+ * Fix url preview AXE and layout issue & add percy test ([\#9189](https://github.com/matrix-org/matrix-react-sdk/pull/9189)). Fixes vector-im/element-web#23083.
+ * Wrap long space names ([\#9201](https://github.com/matrix-org/matrix-react-sdk/pull/9201)). Fixes vector-im/element-web#23095.
+ * Attempt to fix `Failed to execute 'removeChild' on 'Node'` ([\#9196](https://github.com/matrix-org/matrix-react-sdk/pull/9196)).
+ * Fix soft crash around space hierarchy changing between spaces ([\#9191](https://github.com/matrix-org/matrix-react-sdk/pull/9191)). Fixes matrix-org/element-web-rageshakes#14613.
+ * Fix soft crash around room view store metrics ([\#9190](https://github.com/matrix-org/matrix-react-sdk/pull/9190)). Fixes matrix-org/element-web-rageshakes#14361.
+ * Fix the same person appearing multiple times when searching for them. ([\#9177](https://github.com/matrix-org/matrix-react-sdk/pull/9177)). Fixes vector-im/element-web#22851.
+ * Fix space panel subspace indentation going missing ([\#9167](https://github.com/matrix-org/matrix-react-sdk/pull/9167)). Fixes vector-im/element-web#23049.
+ * Fix invisible power levels tile when showing hidden events ([\#9162](https://github.com/matrix-org/matrix-react-sdk/pull/9162)). Fixes vector-im/element-web#23013.
+ * Space panel accessibility improvements ([\#9157](https://github.com/matrix-org/matrix-react-sdk/pull/9157)). Fixes vector-im/element-web#22995.
+ * Fix inverted logic for showing UserWelcomeTop component ([\#9164](https://github.com/matrix-org/matrix-react-sdk/pull/9164)). Fixes vector-im/element-web#23037.
+
Changes in [3.52.0](https://github.com/matrix-org/matrix-react-sdk/releases/tag/v3.52.0) (2022-08-16)
=====================================================================================================
diff --git a/cypress/e2e/spaces/spaces.spec.ts b/cypress/e2e/spaces/spaces.spec.ts
index 0a8212ab8dd..e7767de9421 100644
--- a/cypress/e2e/spaces/spaces.spec.ts
+++ b/cypress/e2e/spaces/spaces.spec.ts
@@ -237,4 +237,42 @@ describe("Spaces", () => {
cy.contains(".mx_SpaceHierarchy_roomTile", "Gaming").should("exist");
});
});
+
+ it("should render subspaces in the space panel only when expanded", () => {
+ cy.injectAxe();
+
+ cy.createSpace({
+ name: "Child Space",
+ initial_state: [],
+ }).then(spaceId => {
+ cy.createSpace({
+ name: "Root Space",
+ initial_state: [
+ spaceChildInitialState(spaceId),
+ ],
+ }).as("spaceId");
+ });
+ cy.get('.mx_SpacePanel .mx_SpaceButton[aria-label="Root Space"]').should("exist");
+ cy.get('.mx_SpacePanel .mx_SpaceButton[aria-label="Child Space"]').should("not.exist");
+
+ const axeOptions = {
+ rules: {
+ // Disable this check as it triggers on nested roving tab index elements which are in practice fine
+ 'nested-interactive': {
+ enabled: false,
+ },
+ },
+ };
+ cy.checkA11y(undefined, axeOptions);
+ cy.get(".mx_SpacePanel").percySnapshotElement("Space panel collapsed", { widths: [68] });
+
+ cy.get(".mx_SpaceButton_toggleCollapse").click({ force: true });
+ cy.get(".mx_SpacePanel:not(.collapsed)").should("exist");
+
+ cy.contains(".mx_SpaceItem", "Root Space").should("exist")
+ .contains(".mx_SpaceItem", "Child Space").should("exist");
+
+ cy.checkA11y(undefined, axeOptions);
+ cy.get(".mx_SpacePanel").percySnapshotElement("Space panel expanded", { widths: [258] });
+ });
});
diff --git a/cypress/e2e/spotlight/spotlight.spec.ts b/cypress/e2e/spotlight/spotlight.spec.ts
index fee1e390713..d4b2d2cf9b0 100644
--- a/cypress/e2e/spotlight/spotlight.spec.ts
+++ b/cypress/e2e/spotlight/spotlight.spec.ts
@@ -114,6 +114,7 @@ Cypress.Commands.add("startDM", (name: string) => {
cy.openSpotlightDialog().within(() => {
cy.spotlightFilter(Filter.People);
cy.spotlightSearch().clear().type(name);
+ cy.wait(1000); // wait for the dialog code to settle
cy.get(".mx_Spinner").should("not.exist");
cy.spotlightResults().should("have.length", 1);
cy.spotlightResults().eq(0).should("contain", name);
@@ -216,6 +217,7 @@ describe("Spotlight", () => {
it("should find joined rooms", () => {
cy.openSpotlightDialog().within(() => {
cy.spotlightSearch().clear().type(room1Name);
+ cy.wait(1000); // wait for the dialog code to settle
cy.spotlightResults().should("have.length", 1);
cy.spotlightResults().eq(0).should("contain", room1Name);
cy.spotlightResults().eq(0).click();
@@ -229,6 +231,7 @@ describe("Spotlight", () => {
cy.openSpotlightDialog().within(() => {
cy.spotlightFilter(Filter.PublicRooms);
cy.spotlightSearch().clear().type(room1Name);
+ cy.wait(1000); // wait for the dialog code to settle
cy.spotlightResults().should("have.length", 1);
cy.spotlightResults().eq(0).should("contain", room1Name);
cy.spotlightResults().eq(0).should("contain", "View");
@@ -243,6 +246,7 @@ describe("Spotlight", () => {
cy.openSpotlightDialog().within(() => {
cy.spotlightFilter(Filter.PublicRooms);
cy.spotlightSearch().clear().type(room2Name);
+ cy.wait(1000); // wait for the dialog code to settle
cy.spotlightResults().should("have.length", 1);
cy.spotlightResults().eq(0).should("contain", room2Name);
cy.spotlightResults().eq(0).should("contain", "Join");
@@ -258,6 +262,7 @@ describe("Spotlight", () => {
cy.openSpotlightDialog().within(() => {
cy.spotlightFilter(Filter.PublicRooms);
cy.spotlightSearch().clear().type(room3Name);
+ cy.wait(1000); // wait for the dialog code to settle
cy.spotlightResults().should("have.length", 1);
cy.spotlightResults().eq(0).should("contain", room3Name);
cy.spotlightResults().eq(0).should("contain", "View");
@@ -296,6 +301,7 @@ describe("Spotlight", () => {
cy.openSpotlightDialog().within(() => {
cy.spotlightFilter(Filter.People);
cy.spotlightSearch().clear().type(bot1Name);
+ cy.wait(1000); // wait for the dialog code to settle
cy.spotlightResults().should("have.length", 1);
cy.spotlightResults().eq(0).should("contain", bot1Name);
cy.spotlightResults().eq(0).click();
@@ -308,6 +314,7 @@ describe("Spotlight", () => {
cy.openSpotlightDialog().within(() => {
cy.spotlightFilter(Filter.People);
cy.spotlightSearch().clear().type(bot2Name);
+ cy.wait(1000); // wait for the dialog code to settle
cy.spotlightResults().should("have.length", 1);
cy.spotlightResults().eq(0).should("contain", bot2Name);
cy.spotlightResults().eq(0).click();
@@ -324,6 +331,7 @@ describe("Spotlight", () => {
cy.openSpotlightDialog().within(() => {
cy.spotlightFilter(Filter.People);
cy.spotlightSearch().clear().type(bot2Name);
+ cy.wait(1000); // wait for the dialog code to settle
cy.spotlightResults().should("have.length", 1);
cy.spotlightResults().eq(0).should("contain", bot2Name);
cy.spotlightResults().eq(0).click();
@@ -341,27 +349,53 @@ describe("Spotlight", () => {
cy.get(".mx_RoomSublist[aria-label=People]").should("contain", bot2Name);
// Invite BotBob into existing DM with ByteBot
- cy.getDmRooms(bot2.getUserId()).then(dmRooms => dmRooms[0])
- .then(groupDmId => cy.inviteUser(groupDmId, bot1.getUserId()))
- .then(() => {
- cy.roomHeaderName().should("contain", `${bot1Name} and ${bot2Name}`);
- cy.get(".mx_RoomSublist[aria-label=People]").should("contain", `${bot1Name} and ${bot2Name}`);
+ cy.getDmRooms(bot2.getUserId())
+ .should("have.length", 1)
+ .then(dmRooms => cy.getClient().then(client => client.getRoom(dmRooms[0])))
+ .then(groupDm => {
+ cy.inviteUser(groupDm.roomId, bot1.getUserId());
+ cy.roomHeaderName().should(($element) =>
+ expect($element.get(0).innerText).contains(groupDm.name));
+ cy.get(".mx_RoomSublist[aria-label=People]").should(($element) =>
+ expect($element.get(0).innerText).contains(groupDm.name));
+
+ // Search for BotBob by id, should return group DM and user
+ cy.openSpotlightDialog().within(() => {
+ cy.spotlightFilter(Filter.People);
+ cy.spotlightSearch().clear().type(bot1.getUserId());
+ cy.wait(1000); // wait for the dialog code to settle
+ cy.spotlightResults().should("have.length", 2);
+ cy.spotlightResults().eq(0).should("contain", groupDm.name);
+ });
+
+ // Search for ByteBot by id, should return group DM and user
+ cy.openSpotlightDialog().within(() => {
+ cy.spotlightFilter(Filter.People);
+ cy.spotlightSearch().clear().type(bot2.getUserId());
+ cy.wait(1000); // wait for the dialog code to settle
+ cy.spotlightResults().should("have.length", 2);
+ cy.spotlightResults().eq(0).should("contain", groupDm.name);
+ });
});
+ });
- // Search for BotBob by id, should return group DM and user
+ // Test against https://github.com/vector-im/element-web/issues/22851
+ it("should show each person result only once", () => {
cy.openSpotlightDialog().within(() => {
cy.spotlightFilter(Filter.People);
- cy.spotlightSearch().clear().type(bot1.getUserId());
- cy.spotlightResults().should("have.length", 2);
- cy.spotlightResults().eq(0).should("contain", `${bot1Name} and ${bot2Name}`);
- });
- // Search for ByteBot by id, should return group DM and user
- cy.openSpotlightDialog().within(() => {
- cy.spotlightFilter(Filter.People);
- cy.spotlightSearch().clear().type(bot2.getUserId());
- cy.spotlightResults().should("have.length", 2);
- cy.spotlightResults().eq(0).should("contain", `${bot1Name} and ${bot2Name}`);
+ // 2 rounds of search to simulate the bug conditions. Specifically, the first search
+ // should have 1 result (not 2) and the second search should also have 1 result (instead
+ // of the super buggy 3 described by https://github.com/vector-im/element-web/issues/22851)
+ //
+ // We search for user ID to trigger the profile lookup within the dialog.
+ for (let i = 0; i < 2; i++) {
+ cy.log("Iteration: " + i);
+ cy.spotlightSearch().clear().type(bot1.getUserId());
+ cy.wait(1000); // wait for the dialog code to settle
+ cy.spotlightResults().should("have.length", 1);
+ cy.spotlightResults().eq(0).should("contain", bot1.getUserId());
+ }
});
});
@@ -369,6 +403,7 @@ describe("Spotlight", () => {
cy.openSpotlightDialog().within(() => {
cy.spotlightFilter(Filter.People);
cy.spotlightSearch().clear().type(bot2Name);
+ cy.wait(1000); // wait for the dialog code to settle
cy.spotlightResults().should("have.length", 1);
cy.spotlightResults().eq(0).should("contain", bot2Name);
cy.get(".mx_SpotlightDialog_startGroupChat").should("contain", "Start a group chat");
@@ -390,6 +425,7 @@ describe("Spotlight", () => {
cy.openSpotlightDialog().within(() => {
cy.spotlightFilter(Filter.People);
cy.spotlightSearch().clear().type(bot1Name);
+ cy.wait(1000); // wait for the dialog code to settle
cy.get(".mx_Spinner").should("not.exist");
cy.spotlightResults().should("have.length", 1);
});
diff --git a/cypress/e2e/timeline/timeline.spec.ts b/cypress/e2e/timeline/timeline.spec.ts
index 6eacacfed23..94b6ffaa425 100644
--- a/cypress/e2e/timeline/timeline.spec.ts
+++ b/cypress/e2e/timeline/timeline.spec.ts
@@ -155,7 +155,7 @@ describe("Timeline", () => {
cy.visit("/#/room/" + roomId);
cy.setSettingValue("layout", null, SettingLevel.DEVICE, Layout.IRC);
cy.contains(".mx_RoomView_body .mx_GenericEventListSummary[data-layout=irc] " +
- ".mx_GenericEventListSummary_summary", "created and configured the room.");
+ ".mx_GenericEventListSummary_summary", "created and configured the room.").should("exist");
cy.get(".mx_Spinner").should("not.exist");
cy.percySnapshot("Configured room on IRC layout");
});
@@ -166,7 +166,7 @@ describe("Timeline", () => {
// Wait until configuration is finished
cy.contains(".mx_RoomView_body .mx_GenericEventListSummary " +
- ".mx_GenericEventListSummary_summary", "created and configured the room.");
+ ".mx_GenericEventListSummary_summary", "created and configured the room.").should("exist");
// Click "expand" link button
cy.get(".mx_GenericEventListSummary_toggle[aria-expanded=false]").click();
@@ -193,14 +193,14 @@ describe("Timeline", () => {
cy.visit("/#/room/" + roomId);
cy.setSettingValue("showHiddenEventsInTimeline", null, SettingLevel.DEVICE, true);
cy.contains(".mx_RoomView_body .mx_GenericEventListSummary .mx_GenericEventListSummary_summary",
- "created and configured the room.");
+ "created and configured the room.").should("exist");
// Edit message
cy.contains(".mx_RoomView_body .mx_EventTile .mx_EventTile_line", "Message").within(() => {
cy.get('[aria-label="Edit"]').click({ force: true }); // Cypress has no ability to hover
cy.get(".mx_BasicMessageComposer_input").type("Edit{enter}");
});
- cy.get(".mx_RoomView_body .mx_EventTile").contains(".mx_EventTile[data-scroll-tokens]", "MessageEdit");
+ cy.contains(".mx_EventTile[data-scroll-tokens]", "MessageEdit").should("exist");
// Click timestamp to highlight hidden event line
cy.get(".mx_RoomView_body .mx_EventTile_info .mx_MessageTimestamp").click();
@@ -228,18 +228,19 @@ describe("Timeline", () => {
cy.visit("/#/room/" + roomId);
cy.setSettingValue("showHiddenEventsInTimeline", null, SettingLevel.DEVICE, true);
cy.contains(".mx_RoomView_body .mx_GenericEventListSummary " +
- ".mx_GenericEventListSummary_summary", "created and configured the room.");
+ ".mx_GenericEventListSummary_summary", "created and configured the room.").should("exist");
// Edit message
cy.contains(".mx_RoomView_body .mx_EventTile .mx_EventTile_line", "Message").within(() => {
cy.get('[aria-label="Edit"]').click({ force: true }); // Cypress has no ability to hover
cy.get(".mx_BasicMessageComposer_input").type("Edit{enter}");
});
- cy.contains(".mx_RoomView_body .mx_EventTile[data-scroll-tokens]", "MessageEdit");
+ cy.contains(".mx_RoomView_body .mx_EventTile[data-scroll-tokens]", "MessageEdit").should("exist");
// Click top left of the event toggle, which should not be covered by MessageActionBar's safe area
- cy.get(".mx_EventTile .mx_ViewSourceEvent").realHover()
- .get(".mx_EventTile .mx_ViewSourceEvent .mx_ViewSourceEvent_toggle").click('topLeft', { force: false });
+ cy.get(".mx_EventTile .mx_ViewSourceEvent").should("exist").realHover().within(() => {
+ cy.get(".mx_ViewSourceEvent_toggle").click('topLeft', { force: false });
+ });
// Make sure the expand toggle worked
cy.get(".mx_EventTile .mx_ViewSourceEvent_expanded .mx_ViewSourceEvent_toggle").should("be.visible");
@@ -249,17 +250,17 @@ describe("Timeline", () => {
cy.visit("/#/room/" + roomId);
cy.setSettingValue("layout", null, SettingLevel.DEVICE, Layout.Bubble);
cy.contains(".mx_RoomView_body .mx_GenericEventListSummary[data-layout=bubble] " +
- ".mx_GenericEventListSummary_summary", "created and configured the room.");
+ ".mx_GenericEventListSummary_summary", "created and configured the room.").should("exist");
// Click "expand" link button
cy.get(".mx_GenericEventListSummary_toggle[aria-expanded=false]").click();
// Click "collapse" link button on the first hovered info event line
- cy.get(".mx_GenericEventListSummary_unstyledList .mx_EventTile_info:first-of-type").realHover()
- .get(".mx_GenericEventListSummary_toggle[aria-expanded=true]").click({ force: false });
+ cy.get(".mx_GenericEventListSummary_unstyledList .mx_EventTile_info:first-of-type").realHover();
+ cy.get(".mx_GenericEventListSummary_toggle[aria-expanded=true]").click({ force: false });
// Make sure "collapse" link button worked
- cy.get(".mx_GenericEventListSummary_toggle[aria-expanded=false]");
+ cy.get(".mx_GenericEventListSummary_toggle[aria-expanded=false]").should("exist");
});
it("should highlight search result words regardless of formatting", () => {
@@ -273,6 +274,49 @@ describe("Timeline", () => {
cy.get(".mx_EventTile:not(.mx_EventTile_contextual)").find(".mx_EventTile_searchHighlight").should("exist");
cy.get(".mx_RoomView_searchResultsPanel").percySnapshotElement("Highlighted search results");
});
+
+ it("should render url previews", () => {
+ cy.intercept("**/_matrix/media/r0/thumbnail/matrix.org/2022-08-16_yaiSVSRIsNFfxDnV?*", {
+ statusCode: 200,
+ fixture: "riot.png",
+ headers: {
+ "Content-Type": "image/png",
+ },
+ }).as("mxc");
+ cy.intercept("**/_matrix/media/r0/preview_url?url=https%3A%2F%2Fcall.element.io%2F&ts=*", {
+ statusCode: 200,
+ body: {
+ "og:title": "Element Call",
+ "og:description": null,
+ "og:image:width": 48,
+ "og:image:height": 48,
+ "og:image": "mxc://matrix.org/2022-08-16_yaiSVSRIsNFfxDnV",
+ "og:image:type": "image/png",
+ "matrix:image:size": 2121,
+ },
+ headers: {
+ "Content-Type": "application/json",
+ },
+ }).as("preview_url");
+
+ cy.sendEvent(
+ roomId,
+ null,
+ "m.room.message" as EventType,
+ MessageEvent.from("https://call.element.io/").serialize().content,
+ );
+ cy.visit("/#/room/" + roomId);
+
+ cy.get(".mx_LinkPreviewWidget").should("exist").should("contain.text", "Element Call");
+
+ cy.wait("@preview_url");
+ cy.wait("@mxc");
+
+ cy.checkA11y();
+ cy.get(".mx_EventTile_last").percySnapshotElement("URL Preview", {
+ widths: [800, 400],
+ });
+ });
});
describe("message sending", () => {
@@ -285,7 +329,7 @@ describe("Timeline", () => {
cy.getComposer().type(`${MESSAGE}{enter}`);
// Reply to the message
- cy.get(".mx_RoomView_body .mx_EventTile").contains(".mx_EventTile_line", "Hello world").within(() => {
+ cy.get(".mx_RoomView_body").contains(".mx_EventTile_line", "Hello world").within(() => {
cy.get('[aria-label="Reply"]').click({ force: true }); // Cypress has no ability to hover
});
};
@@ -296,20 +340,22 @@ describe("Timeline", () => {
cy.getComposer().type(`${reply}{enter}`);
- cy.get(".mx_RoomView_body .mx_EventTile .mx_EventTile_line").find(".mx_ReplyTile .mx_MTextBody")
+ cy.get(".mx_RoomView_body .mx_EventTile .mx_EventTile_line .mx_ReplyTile .mx_MTextBody")
.should("contain", MESSAGE);
- cy.get(".mx_RoomView_body .mx_EventTile > .mx_EventTile_line > .mx_MTextBody").contains(reply)
+ cy.contains(".mx_RoomView_body .mx_EventTile > .mx_EventTile_line > .mx_MTextBody", reply)
.should("have.length", 1);
});
- xit("can reply with a voice message", () => {
+ it("can reply with a voice message", () => {
viewRoomSendMessageAndSetupReply();
- cy.openMessageComposerOptions().find(`[aria-label="Voice Message"]`).click();
+ cy.openMessageComposerOptions().within(() => {
+ cy.get(`[aria-label="Voice Message"]`).click();
+ });
cy.wait(3000);
- cy.getComposer().find(".mx_MessageComposer_sendMessage").click();
+ cy.get(".mx_RoomView_body .mx_MessageComposer .mx_MessageComposer_sendMessage").click();
- cy.get(".mx_RoomView_body .mx_EventTile .mx_EventTile_line").find(".mx_ReplyTile .mx_MTextBody")
+ cy.get(".mx_RoomView_body .mx_EventTile .mx_EventTile_line .mx_ReplyTile .mx_MTextBody")
.should("contain", MESSAGE);
cy.get(".mx_RoomView_body .mx_EventTile > .mx_EventTile_line > .mx_MVoiceMessageBody")
.should("have.length", 1);
diff --git a/cypress/e2e/user-onboarding/user-onboarding-new.ts b/cypress/e2e/user-onboarding/user-onboarding-new.ts
index 44787ee61e8..c6eac8ce27d 100644
--- a/cypress/e2e/user-onboarding/user-onboarding-new.ts
+++ b/cypress/e2e/user-onboarding/user-onboarding-new.ts
@@ -40,6 +40,13 @@ describe("User Onboarding (new user)", () => {
bot1 = _bot1;
});
cy.get('.mx_UserOnboardingPage').should('exist');
+ cy.get('.mx_UserOnboardingButton').should('exist');
+ cy.get('.mx_UserOnboardingList')
+ .should('exist')
+ .should(($list) => {
+ const list = $list.get(0);
+ expect(getComputedStyle(list).opacity).to.be.eq("1");
+ });
});
});
@@ -47,20 +54,14 @@ describe("User Onboarding (new user)", () => {
cy.stopSynapse(synapse);
});
- it("page is shown", () => {
- cy.get('.mx_UserOnboardingPage').should('exist');
- cy.get('.mx_UserOnboardingList')
- .should('exist')
- .should(($list) => {
- const list = $list.get(0);
- expect(getComputedStyle(list).opacity).to.be.eq("1");
- });
+ it("page is shown and preference exists", () => {
cy.get('.mx_UserOnboardingPage')
.percySnapshotElement("User onboarding page");
+ cy.openUserSettings("Preferences");
+ cy.contains("Show shortcut to welcome checklist above the room list").should("exist");
});
it("app download dialog", () => {
- cy.get('.mx_UserOnboardingPage').should('exist');
cy.contains(".mx_UserOnboardingTask_action", "Download apps").click();
cy.get('[role=dialog]')
.contains("#mx_BaseDialog_title", "Download Element")
@@ -79,8 +80,18 @@ describe("User Onboarding (new user)", () => {
cy.get(".mx_InviteDialog_editor input").type(bot1.getUserId());
cy.get(".mx_InviteDialog_buttonAndSpinner").click();
cy.get(".mx_InviteDialog_buttonAndSpinner").should("not.exist");
+ const message = "Hi!";
+ cy.get(".mx_SendMessageComposer").type(`${message}!{enter}`);
+ cy.contains(".mx_MTextBody.mx_EventTile_content", message);
cy.visit("/#/home");
-
+ cy.get('.mx_UserOnboardingPage').should('exist');
+ cy.get('.mx_UserOnboardingButton').should('exist');
+ cy.get('.mx_UserOnboardingList')
+ .should('exist')
+ .should(($list) => {
+ const list = $list.get(0);
+ expect(getComputedStyle(list).opacity).to.be.eq("1");
+ });
cy.get(".mx_ProgressBar").invoke("val").should("be.greaterThan", oldProgress);
});
});
diff --git a/cypress/e2e/user-onboarding/user-onboarding-old.ts b/cypress/e2e/user-onboarding/user-onboarding-old.ts
index 2be066e0a1c..f079ed9a4c3 100644
--- a/cypress/e2e/user-onboarding/user-onboarding-old.ts
+++ b/cypress/e2e/user-onboarding/user-onboarding-old.ts
@@ -40,7 +40,10 @@ describe("User Onboarding (old user)", () => {
cy.stopSynapse(synapse);
});
- it("page is hidden", () => {
+ it("page and preference are hidden", () => {
cy.get('.mx_UserOnboardingPage').should('not.exist');
+ cy.get('.mx_UserOnboardingButton').should('not.exist');
+ cy.openUserSettings("Preferences");
+ cy.contains("Show shortcut to welcome page above the room list").should("not.exist");
});
});
diff --git a/cypress/e2e/widgets/widget-pip-close.spec.ts b/cypress/e2e/widgets/widget-pip-close.spec.ts
new file mode 100644
index 00000000000..7689e38ed00
--- /dev/null
+++ b/cypress/e2e/widgets/widget-pip-close.spec.ts
@@ -0,0 +1,201 @@
+/*
+Copyright 2022 Mikhail Aheichyk
+Copyright 2022 Nordeck IT + Consulting GmbH.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+///