Files
ThreadNet-Web/playwright/testcontainers/HomeserverContainer.ts
T

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

25 lines
992 B
TypeScript
Raw Normal View History

/*
Copyright 2024 New Vector Ltd.
SPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only OR LicenseRef-Element-Commercial
Please see LICENSE files in the repository root for full details.
*/
import { AbstractStartedContainer, GenericContainer } from "testcontainers";
2025-01-14 11:37:39 +00:00
import { APIRequestContext, TestInfo } from "@playwright/test";
import { HomeserverInstance } from "../plugins/homeserver";
2025-01-14 11:37:39 +00:00
import { StartedMatrixAuthenticationServiceContainer } from "./mas.ts";
export interface HomeserverContainer<Config> extends GenericContainer {
withConfigField(key: string, value: any): this;
withConfig(config: Partial<Config>): this;
2025-01-14 11:37:39 +00:00
withMatrixAuthenticationService(mas?: StartedMatrixAuthenticationServiceContainer): this;
start(): Promise<StartedHomeserverContainer>;
}
export interface StartedHomeserverContainer extends AbstractStartedContainer, HomeserverInstance {
setRequest(request: APIRequestContext): void;
2025-01-14 11:37:39 +00:00
onTestFinished(testInfo: TestInfo): Promise<void>;
}