Reference files in Playwright more reliably (#32935)
Without assuming the cwd
This commit is contained in:
@@ -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: {
|
||||
|
||||
Reference in New Issue
Block a user