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:
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "@element-hq/element-web-playwright-common",
|
"name": "@element-hq/element-web-playwright-common",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"version": "2.2.7",
|
"version": "2.3.0",
|
||||||
"license": "SEE LICENSE IN README.md",
|
"license": "SEE LICENSE IN README.md",
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
|
|||||||
@@ -66,6 +66,16 @@ export interface TestFixtures {
|
|||||||
|
|
||||||
labsFlags: string[];
|
labsFlags: string[];
|
||||||
disablePresence: boolean;
|
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>({
|
export const test = base.extend<TestFixtures>({
|
||||||
@@ -73,8 +83,18 @@ export const test = base.extend<TestFixtures>({
|
|||||||
config: async ({}, use) => use({}),
|
config: async ({}, use) => use({}),
|
||||||
labsFlags: async ({}, use) => use([]),
|
labsFlags: async ({}, use) => use([]),
|
||||||
disablePresence: async ({}, use) => use(false),
|
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);
|
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);
|
await use(page);
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user