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

Commit 7503bf6

Browse files
authored
Fix spacing of headings of integration manager on General settings tab (#10232)
* Fix spacing of headings of integration manager on General settings tab Signed-off-by: Suguru Hirahara <[email protected]> * lint Signed-off-by: Suguru Hirahara <[email protected]> * Check the column gap Signed-off-by: Suguru Hirahara <[email protected]> * Iterate Signed-off-by: Suguru Hirahara <[email protected]> * Scroll to 'mx_SetIntegrationManager' and take a snapshot of the dialog Signed-off-by: Suguru Hirahara <[email protected]> * Revert "Scroll to 'mx_SetIntegrationManager' and take a snapshot of the dialog" This reverts commit 9151d6a. * Specify actual width of mx_SetIntegrationManager Signed-off-by: Suguru Hirahara <[email protected]> --------- Signed-off-by: Suguru Hirahara <[email protected]>
1 parent 2434749 commit 7503bf6

File tree

2 files changed

+61
-0
lines changed

2 files changed

+61
-0
lines changed

Diff for: cypress/e2e/settings/set-integration-manager.spec.ts

+60
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+
});

Diff for: res/css/views/settings/_SetIntegrationManager.pcss

+1
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ limitations under the License.
2929
.mx_SettingsTab_subheading {
3030
margin-top: 0;
3131
margin-bottom: 0;
32+
margin-inline-end: 0; /* Cancel the default right (inline-end) margin */
3233
}
3334
}
3435

0 commit comments

Comments
 (0)