Reference files in Playwright more reliably (#32935)

Without assuming the cwd
This commit is contained in:
Michael Telatynski
2026-03-26 11:30:54 +00:00
committed by GitHub
parent 5a074e637a
commit cd429874db
14 changed files with 93 additions and 57 deletions
@@ -7,16 +7,18 @@ Please see LICENSE files in the repository root for full details.
*/
import { type SynapseContainer } from "@element-hq/element-web-playwright-common/lib/testcontainers/index.js";
import { dirname, join } from "node:path";
import { fileURLToPath } from "node:url";
import { type Fixtures } from "../../../element-web-test.ts";
const __dirname = dirname(fileURLToPath(import.meta.url));
export const consentHomeserver: Fixtures = {
_homeserver: [
async ({ _homeserver: container, mailpit }, use) => {
(container as SynapseContainer)
.withCopyDirectoriesToContainer([
{ source: "playwright/plugins/homeserver/synapse/res", target: "/data/res" },
])
.withCopyDirectoriesToContainer([{ source: join(__dirname, "res"), target: "/data/res" }])
.withSmtpServer(mailpit)
.withConfig({
user_consent: {