From 8fcbf13240b781c76676ba7f200bf8adb32fc106 Mon Sep 17 00:00:00 2001 From: Michael Weimann Date: Tue, 3 Jan 2023 15:17:15 +0100 Subject: [PATCH 1/5] Fix space lock icon size --- res/css/structures/_SpaceRoomView.pcss | 6 +++--- res/css/views/dialogs/_JoinRuleDropdown.pcss | 2 ++ res/css/views/spaces/_SpaceCreateMenu.pcss | 2 ++ 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/res/css/structures/_SpaceRoomView.pcss b/res/css/structures/_SpaceRoomView.pcss index f5d567d93fc..633c94dfa31 100644 --- a/res/css/structures/_SpaceRoomView.pcss +++ b/res/css/structures/_SpaceRoomView.pcss @@ -38,9 +38,9 @@ $SpaceRoomViewInnerWidth: 428px; &::before { position: absolute; content: ""; - width: 32px; - height: 32px; - top: 24px; + width: 24px; + height: 24px; + top: 27px; left: 20px; mask-position: center; mask-repeat: no-repeat; diff --git a/res/css/views/dialogs/_JoinRuleDropdown.pcss b/res/css/views/dialogs/_JoinRuleDropdown.pcss index ddb16c31df7..83d73fcea28 100644 --- a/res/css/views/dialogs/_JoinRuleDropdown.pcss +++ b/res/css/views/dialogs/_JoinRuleDropdown.pcss @@ -50,8 +50,10 @@ limitations under the License. } .mx_JoinRuleDropdown_invite::before { + box-sizing: border-box; mask-image: url("$(res)/img/element-icons/lock.svg"); mask-size: contain; + padding: 1px; } .mx_JoinRuleDropdown_public::before { diff --git a/res/css/views/spaces/_SpaceCreateMenu.pcss b/res/css/views/spaces/_SpaceCreateMenu.pcss index f1697dacb04..9bb95de2b6c 100644 --- a/res/css/views/spaces/_SpaceCreateMenu.pcss +++ b/res/css/views/spaces/_SpaceCreateMenu.pcss @@ -58,8 +58,10 @@ $spacePanelWidth: 68px; .mx_SpaceCreateMenuType_public::before { mask-image: url("$(res)/img/globe.svg"); } + .mx_SpaceCreateMenuType_private::before { mask-image: url("$(res)/img/element-icons/lock.svg"); + mask-size: 18px; } .mx_SpaceCreateMenu_back { From 3869bf97a713ca804c50ef5469107e457e516de6 Mon Sep 17 00:00:00 2001 From: Michael Weimann Date: Tue, 3 Jan 2023 17:23:37 +0100 Subject: [PATCH 2/5] Take create space menu snapshot --- cypress/e2e/spaces/spaces.spec.ts | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/cypress/e2e/spaces/spaces.spec.ts b/cypress/e2e/spaces/spaces.spec.ts index 2518ffebda8..a383aa6b066 100644 --- a/cypress/e2e/spaces/spaces.spec.ts +++ b/cypress/e2e/spaces/spaces.spec.ts @@ -77,18 +77,20 @@ describe("Spaces", () => { cy.stopSynapse(synapse); }); - it("should allow user to create public space", () => { - openSpaceCreateMenu().within(() => { - cy.get(".mx_SpaceCreateMenuType_public").click(); - cy.get('.mx_SpaceBasicSettings_avatarContainer input[type="file"]').selectFile( - "cypress/fixtures/riot.png", - { force: true }, - ); - cy.get('input[label="Name"]').type("Let's have a Riot"); - cy.get('input[label="Address"]').should("have.value", "lets-have-a-riot"); - cy.get('textarea[label="Description"]').type("This is a space to reminisce Riot.im!"); - cy.contains(".mx_AccessibleButton", "Create").click(); - }); + it.only("should allow user to create public space", () => { + openSpaceCreateMenu() + .within(() => { + cy.get(".mx_SpaceCreateMenuType_public").click(); + cy.get('.mx_SpaceBasicSettings_avatarContainer input[type="file"]').selectFile( + "cypress/fixtures/riot.png", + { force: true }, + ); + cy.get('input[label="Name"]').type("Let's have a Riot"); + cy.get('input[label="Address"]').should("have.value", "lets-have-a-riot"); + cy.get('textarea[label="Description"]').type("This is a space to reminisce Riot.im!"); + cy.contains(".mx_AccessibleButton", "Create").click(); + }) + .percySnapshotElement("Space create menu"); // Create the default General & Random rooms, as well as a custom "Jokes" room cy.get('input[label="Room name"][value="General"]').should("exist"); From 9139cf95d0297129ed2143b3f0e699799a530813 Mon Sep 17 00:00:00 2001 From: Michael Weimann Date: Tue, 3 Jan 2023 18:30:39 +0100 Subject: [PATCH 3/5] Fix snapshot test --- cypress/e2e/spaces/spaces.spec.ts | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/cypress/e2e/spaces/spaces.spec.ts b/cypress/e2e/spaces/spaces.spec.ts index a383aa6b066..8844a5c2e1c 100644 --- a/cypress/e2e/spaces/spaces.spec.ts +++ b/cypress/e2e/spaces/spaces.spec.ts @@ -77,20 +77,20 @@ describe("Spaces", () => { cy.stopSynapse(synapse); }); - it.only("should allow user to create public space", () => { - openSpaceCreateMenu() - .within(() => { - cy.get(".mx_SpaceCreateMenuType_public").click(); - cy.get('.mx_SpaceBasicSettings_avatarContainer input[type="file"]').selectFile( - "cypress/fixtures/riot.png", - { force: true }, - ); - cy.get('input[label="Name"]').type("Let's have a Riot"); - cy.get('input[label="Address"]').should("have.value", "lets-have-a-riot"); - cy.get('textarea[label="Description"]').type("This is a space to reminisce Riot.im!"); - cy.contains(".mx_AccessibleButton", "Create").click(); - }) - .percySnapshotElement("Space create menu"); + it("should allow user to create public space", () => { + openSpaceCreateMenu().as("space-create-menu"); + cy.get("@space-create-menu").percySnapshotElement("Space create menu"); + cy.get("@space-create-menu").within(() => { + cy.get(".mx_SpaceCreateMenuType_public").click(); + cy.get('.mx_SpaceBasicSettings_avatarContainer input[type="file"]').selectFile( + "cypress/fixtures/riot.png", + { force: true }, + ); + cy.get('input[label="Name"]').type("Let's have a Riot"); + cy.get('input[label="Address"]').should("have.value", "lets-have-a-riot"); + cy.get('textarea[label="Description"]').type("This is a space to reminisce Riot.im!"); + cy.contains(".mx_AccessibleButton", "Create").click(); + }); // Create the default General & Random rooms, as well as a custom "Jokes" room cy.get('input[label="Room name"][value="General"]').should("exist"); From cfaed265e80c4b7e03e59dcad97d62149f57f2e1 Mon Sep 17 00:00:00 2001 From: Michael Weimann Date: Wed, 4 Jan 2023 07:46:14 +0100 Subject: [PATCH 4/5] Fix create spaces menu snapshot --- cypress/e2e/spaces/spaces.spec.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/cypress/e2e/spaces/spaces.spec.ts b/cypress/e2e/spaces/spaces.spec.ts index 8844a5c2e1c..634d70c652f 100644 --- a/cypress/e2e/spaces/spaces.spec.ts +++ b/cypress/e2e/spaces/spaces.spec.ts @@ -78,9 +78,8 @@ describe("Spaces", () => { }); it("should allow user to create public space", () => { - openSpaceCreateMenu().as("space-create-menu"); - cy.get("@space-create-menu").percySnapshotElement("Space create menu"); - cy.get("@space-create-menu").within(() => { + openSpaceCreateMenu().percySnapshotElement("Space create menu"); + cy.get(".mx_SpaceCreateMenu_wrapper .mx_ContextualMenu").within(() => { cy.get(".mx_SpaceCreateMenuType_public").click(); cy.get('.mx_SpaceBasicSettings_avatarContainer input[type="file"]').selectFile( "cypress/fixtures/riot.png", From ab9a1a7629ca9134ac62e8a8a23faedfbe969960 Mon Sep 17 00:00:00 2001 From: Michael Weimann Date: Wed, 4 Jan 2023 13:02:35 +0100 Subject: [PATCH 5/5] Tweak percy snapshot --- cypress/e2e/spaces/spaces.spec.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/cypress/e2e/spaces/spaces.spec.ts b/cypress/e2e/spaces/spaces.spec.ts index 634d70c652f..47232dc5afd 100644 --- a/cypress/e2e/spaces/spaces.spec.ts +++ b/cypress/e2e/spaces/spaces.spec.ts @@ -77,8 +77,9 @@ describe("Spaces", () => { cy.stopSynapse(synapse); }); - it("should allow user to create public space", () => { - openSpaceCreateMenu().percySnapshotElement("Space create menu"); + it.only("should allow user to create public space", () => { + openSpaceCreateMenu(); + cy.get("#mx_ContextualMenu_Container").percySnapshotElement("Space create menu"); cy.get(".mx_SpaceCreateMenu_wrapper .mx_ContextualMenu").within(() => { cy.get(".mx_SpaceCreateMenuType_public").click(); cy.get('.mx_SpaceBasicSettings_avatarContainer input[type="file"]').selectFile(