parent
edefe02174
commit
63e855e0c4
|
@ -8,11 +8,22 @@ Please see LICENSE files in the repository root for full details.
|
|||
|
||||
import { Locator, type Page } from "@playwright/test";
|
||||
|
||||
import { test as base, expect, Fixtures } from "../../element-web-test";
|
||||
import { test, expect } from "../../element-web-test";
|
||||
import { viewRoomSummaryByName } from "../right-panel/utils";
|
||||
import { isDendrite } from "../../plugins/homeserver/dendrite";
|
||||
|
||||
const test = base.extend<Fixtures>({
|
||||
const ROOM_NAME = "Test room";
|
||||
const NAME = "Alice";
|
||||
|
||||
function getMemberTileByName(page: Page, name: string): Locator {
|
||||
return page.locator(`.mx_EntityTile, [title="${name}"]`);
|
||||
}
|
||||
|
||||
test.describe("Dehydration", () => {
|
||||
test.skip(isDendrite, "does not yet support dehydration v2");
|
||||
|
||||
test.use({
|
||||
displayName: NAME,
|
||||
synapseConfigOptions: {
|
||||
experimental_features: {
|
||||
msc2697_enabled: false,
|
||||
|
@ -35,20 +46,6 @@ const test = base.extend<Fixtures>({
|
|||
default_server_config: wellKnown,
|
||||
});
|
||||
},
|
||||
});
|
||||
|
||||
const ROOM_NAME = "Test room";
|
||||
const NAME = "Alice";
|
||||
|
||||
function getMemberTileByName(page: Page, name: string): Locator {
|
||||
return page.locator(`.mx_EntityTile, [title="${name}"]`);
|
||||
}
|
||||
|
||||
test.describe("Dehydration", () => {
|
||||
test.skip(isDendrite, "does not yet support dehydration v2");
|
||||
|
||||
test.use({
|
||||
displayName: NAME,
|
||||
});
|
||||
|
||||
test("Create dehydrated device", async ({ page, user, app }, workerInfo) => {
|
||||
|
|
|
@ -9,9 +9,12 @@ Please see LICENSE files in the repository root for full details.
|
|||
import path from "path";
|
||||
import { readFile } from "node:fs/promises";
|
||||
|
||||
import { expect, Fixtures, test as base } from "../../element-web-test";
|
||||
import { expect, test } from "../../element-web-test";
|
||||
|
||||
test.describe("migration", { tag: "@no-webkit" }, function () {
|
||||
test.use({
|
||||
displayName: "Alice",
|
||||
|
||||
const test = base.extend<Fixtures>({
|
||||
// Replace the `user` fixture with one which populates the indexeddb data before starting the app.
|
||||
user: async ({ context, pageWithCredentials: page, credentials }, use) => {
|
||||
await page.route(`/test_indexeddb_cryptostore_dump/*`, async (route, request) => {
|
||||
|
@ -23,10 +26,7 @@ const test = base.extend<Fixtures>({
|
|||
|
||||
await use(credentials);
|
||||
},
|
||||
});
|
||||
|
||||
test.describe("migration", { tag: "@no-webkit" }, function () {
|
||||
test.use({ displayName: "Alice" });
|
||||
});
|
||||
|
||||
test("Should support migration from legacy crypto", async ({ context, user, page }, workerInfo) => {
|
||||
test.slow();
|
||||
|
|
|
@ -10,7 +10,6 @@ import { APIRequestContext } from "@playwright/test";
|
|||
import * as YAML from "yaml";
|
||||
import { set } from "lodash";
|
||||
|
||||
import { getFreePort } from "../plugins/utils/port.ts";
|
||||
import { randB64Bytes } from "../plugins/utils/rand.ts";
|
||||
import { StartedSynapseContainer } from "./synapse.ts";
|
||||
import { deepCopy } from "../plugins/utils/object.ts";
|
||||
|
@ -223,6 +222,7 @@ export class DendriteContainer extends GenericContainer {
|
|||
"-c",
|
||||
`/usr/bin/generate-keys -private-key /etc/dendrite/matrix_key.pem && ${binary} --config /etc/dendrite/dendrite.yaml --really-enable-open-registration true run`,
|
||||
])
|
||||
.withExposedPorts(8008)
|
||||
.withWaitStrategy(Wait.forHttp("/_matrix/client/versions", 8008));
|
||||
}
|
||||
|
||||
|
@ -240,22 +240,18 @@ export class DendriteContainer extends GenericContainer {
|
|||
}
|
||||
|
||||
public override async start(): Promise<StartedSynapseContainer> {
|
||||
const port = await getFreePort();
|
||||
|
||||
this.withExposedPorts({
|
||||
container: 8008,
|
||||
host: port,
|
||||
}).withCopyContentToContainer([
|
||||
this.withCopyContentToContainer([
|
||||
{
|
||||
target: "/etc/dendrite/dendrite.yaml",
|
||||
content: YAML.stringify(this.config),
|
||||
},
|
||||
]);
|
||||
|
||||
const container = await super.start();
|
||||
// Surprisingly, Dendrite implements the same register user Admin API Synapse, so we can just extend it
|
||||
return new StartedSynapseContainer(
|
||||
await super.start(),
|
||||
`http://localhost:${port}`,
|
||||
container,
|
||||
`http://${container.getHost()}:${container.getMappedPort(8008)}`,
|
||||
this.config.client_api.registration_shared_secret,
|
||||
this.request,
|
||||
);
|
||||
|
|
|
@ -194,6 +194,7 @@ export class MatrixAuthenticationServiceContainer extends GenericContainer {
|
|||
}
|
||||
|
||||
public override async start(): Promise<StartedMatrixAuthenticationServiceContainer> {
|
||||
// MAS config issuer needs to know what URL it'll be accessed from, so we have to map the port manually
|
||||
const port = await getFreePort();
|
||||
|
||||
this.config.http.public_base = `http://localhost:${port}/`;
|
||||
|
|
|
@ -199,6 +199,7 @@ export class SynapseContainer extends GenericContainer {
|
|||
}
|
||||
|
||||
public override async start(): Promise<StartedSynapseContainer> {
|
||||
// Synapse config public_baseurl needs to know what URL it'll be accessed from, so we have to map the port manually
|
||||
const port = await getFreePort();
|
||||
|
||||
this.withExposedPorts({
|
||||
|
|
Loading…
Reference in New Issue