@@ -20,7 +20,7 @@ import { HomeserverInstance } from "../../plugins/utils/homeserver";
2020
2121const USER_NAME = "Alice" ;
2222
23- describe ( "Set integration manager on General settings tab " , ( ) => {
23+ describe ( "Set integration manager" , ( ) => {
2424 let homeserver : HomeserverInstance ;
2525
2626 beforeEach ( ( ) => {
@@ -34,31 +34,25 @@ describe("Set integration manager on General settings tab", () => {
3434 cy . stopHomeserver ( homeserver ) ;
3535 } ) ;
3636
37- it ( "should set integration manager " , ( ) => {
37+ it ( "should be correctly rendered " , ( ) => {
3838 cy . openUserSettings ( "General" ) ;
39- cy . contains ( "Manage integrations" ) . should ( "exist" ) ;
4039
41- // Make sure integration manager's toggle switch is enabled
42- cy . get ( ".mx_SetIntegrationManager .mx_ToggleSwitch_enabled" ) . should ( "exist" ) ;
40+ cy . get ( ".mx_SetIntegrationManager" ) . within ( ( ) => {
41+ // Assert the toggle switch is enabled by default
42+ cy . get ( ".mx_ToggleSwitch_enabled" ) . should ( "exist" ) ;
4343
44- // Check the default margin set to mx_SettingsTab_heading on the settings tab
45- cy . get ( ".mx_SettingsTab > .mx_SettingsTab_heading " ) . should ( "have.css" , "margin-right " , "100px " ) ;
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 " ) ;
4646
47- // Make sure the space between "Manage integrations" and the integration server address is set to 4px;
48- cy . get ( ".mx_SettingsTab .mx_SetIntegrationManager_heading_manager > .mx_SettingsTab_heading" ) . should (
49- "have.css" ,
50- "margin-inline-end" ,
51- "0px" ,
52- ) ;
53- cy . get ( ".mx_SettingsTab .mx_SetIntegrationManager_heading_manager > .mx_SettingsTab_subheading" ) . should (
54- "have.css" ,
55- "margin-inline-end" ,
56- "0px" ,
57- ) ;
58- cy . get ( ".mx_SettingsTab .mx_SetIntegrationManager_heading_manager" ) . should ( "have.css" , "column-gap" , "4px" ) ;
47+ cy . get ( ".mx_SetIntegrationManager_heading_manager" ) . within ( ( ) => {
48+ cy . get ( ".mx_SettingsTab_heading" ) . should ( "have.text" , "Manage integrations" ) ;
5949
60- cy . get ( ".mx_SettingsTab .mx_SetIntegrationManager_heading_manager" ) . percySnapshotElement (
61- "'Manage integrations' on General settings tab" ,
62- ) ;
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" ) ;
6357 } ) ;
6458} ) ;
0 commit comments