Move a bunch of shared playwright code into @element-hq/element-web-playwright-common (#29477)

* Move a bunch of shared playwright code into @element-hq/element-web-playwright-common

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

* Remove stale devDep

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

* Iterate

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

* Update playwright-common

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

* Iterate

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

* Update screenshot

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

* Fix testcontainers version

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

---------

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
Michael Telatynski
2025-03-17 09:16:45 +00:00
committed by GitHub
parent 4af5d4ac80
commit ff1da50dd9
34 changed files with 226 additions and 1460 deletions

View File

@@ -8,12 +8,13 @@ Please see LICENSE files in the repository root for full details.
import { GenericContainer, Wait } from "testcontainers";
import * as YAML from "yaml";
import { set } from "lodash";
import { randB64Bytes } from "../plugins/utils/rand.ts";
import { StartedSynapseContainer } from "./synapse.ts";
import { deepCopy } from "../plugins/utils/object.ts";
import { type HomeserverContainer } from "./HomeserverContainer.ts";
import { type StartedMatrixAuthenticationServiceContainer } from "./mas.ts";
import { randB64Bytes } from "@element-hq/element-web-playwright-common/lib/utils/rand.js";
import { deepCopy } from "@element-hq/element-web-playwright-common/lib/utils/object.js";
import {
StartedSynapseContainer,
type HomeserverContainer,
type StartedMatrixAuthenticationServiceContainer,
} from "@element-hq/element-web-playwright-common/lib/testcontainers";
const DEFAULT_CONFIG = {
version: 2,
@@ -223,7 +224,7 @@ export class DendriteContainer extends GenericContainer implements HomeserverCon
.withWaitStrategy(Wait.forHttp("/_matrix/client/versions", 8008));
}
public withConfigField(key: string, value: any): this {
public withConfigField(key: string, value: unknown): this {
set(this.config, key, value);
return this;
}
@@ -236,6 +237,11 @@ export class DendriteContainer extends GenericContainer implements HomeserverCon
return this;
}
// Dendrite does not support SMTP at this time - https://github.com/element-hq/dendrite/issues/1298
public withSmtpServer(): this {
return this;
}
// Dendrite does not support MAS at this time
public withMatrixAuthenticationService(mas?: StartedMatrixAuthenticationServiceContainer): this {
return this;