Merge branch 'main' of github.com:/element-hq/element-web-modules into t3chguy/wat/382

# Conflicts:
#	modules/restricted-guests/element-web/e2e/snapshots/restricted-guests.spec.ts/preview-bar-linux.png
This commit is contained in:
Michael Telatynski 2026-03-31 09:26:21 +01:00
commit 2b3425f0e8
2 changed files with 22 additions and 2 deletions

View File

@ -1,7 +1,7 @@
{
"name": "@element-hq/element-web-playwright-common",
"type": "module",
"version": "2.2.7",
"version": "2.3.0",
"license": "SEE LICENSE IN README.md",
"repository": {
"type": "git",

View File

@ -66,6 +66,16 @@ export interface TestFixtures {
labsFlags: string[];
disablePresence: boolean;
/**
* Whether the left panel should have its width fixed.
* This is done because the library that we use for rendering collapsible
* panels uses math to calculate the width which can sometimes leads to +/-1px
* difference. While this does not matter to the user, it can lead to screenshot
* tests failing.
* Defaults to true, should be set to false via {@link base.use} when you want to test the collapse
* behaviour.
*/
lockLeftPanelWidth: boolean;
}
export const test = base.extend<TestFixtures>({
@ -73,8 +83,18 @@ export const test = base.extend<TestFixtures>({
config: async ({}, use) => use({}),
labsFlags: async ({}, use) => use([]),
disablePresence: async ({}, use) => use(false),
page: async ({ homeserver, context, page, config, labsFlags, disablePresence }, use) => {
lockLeftPanelWidth: true,
page: async ({ homeserver, context, page, config, labsFlags, disablePresence, lockLeftPanelWidth }, use) => {
await routeConfigJson(context, homeserver.baseUrl, config, labsFlags, disablePresence);
if (lockLeftPanelWidth) {
await page.addStyleTag({
content: `
#left-panel {
flex: 0 0 369.6875px !important;
}
`,
});
}
await use(page);
},
});