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

Commit 30ac950

Browse files
authored
Emulate TabbedView's actual min and max widths on user settings tabs (#10737)
Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com>
1 parent 1281c07 commit 30ac950

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

cypress/e2e/settings/general-user-settings-tab.spec.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,10 @@ describe("General user settings tab", () => {
4545

4646
cy.get(".mx_SettingsTab.mx_GeneralUserSettingsTab").percySnapshotElement("User settings tab - General", {
4747
percyCSS,
48+
// Emulate TabbedView's actual min and max widths
49+
// 580: '.mx_UserSettingsDialog .mx_TabbedView' min-width
50+
// 796: 1036 (mx_TabbedView_tabsOnLeft actual width) - 240 (mx_TabbedView_tabPanel margin-right)
51+
widths: [580, 796],
4852
});
4953

5054
cy.get(".mx_SettingsTab.mx_GeneralUserSettingsTab").within(() => {

cypress/e2e/settings/preferences-user-settings-tab.spec.ts

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,14 @@ describe("Preferences user settings tab", () => {
4040
cy.findByTestId("preferences").should("have.text", "Preferences").should("be.visible");
4141
});
4242

43-
cy.get(".mx_SettingsTab.mx_PreferencesUserSettingsTab").percySnapshotElement("User settings tab - Preferences");
43+
cy.get(".mx_SettingsTab.mx_PreferencesUserSettingsTab").percySnapshotElement(
44+
"User settings tab - Preferences",
45+
{
46+
// Emulate TabbedView's actual min and max widths
47+
// 580: '.mx_UserSettingsDialog .mx_TabbedView' min-width
48+
// 796: 1036 (mx_TabbedView_tabsOnLeft actual width) - 240 (mx_TabbedView_tabPanel margin-right)
49+
widths: [580, 796],
50+
},
51+
);
4452
});
4553
});

0 commit comments

Comments
 (0)