Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
t3chguy/playwright-homeservers
Michael Telatynski 2025-01-07 17:22:48 +00:00
parent 757a22a829
commit 048563a0a4
No known key found for this signature in database
GPG Key ID: A2B008A5F49F5D0D
7 changed files with 20 additions and 16 deletions

View File

@ -27,7 +27,6 @@ async function expectBackupVersionToBe(page: Page, version: string) {
// which is faster but leaves us without crypto set up.
test.describe("Encryption state after registration", () => {
test.use(masHomeserver);
test.skip(isDendrite, "does not yet support MAS");
test("Key backup is enabled by default", async ({ page, mailhogClient, app }) => {
await page.goto("/#/login");
@ -54,7 +53,6 @@ test.describe("Encryption state after registration", () => {
test.describe("Key backup reset from elsewhere", () => {
test.use(masHomeserver);
test.skip(isDendrite, "does not yet support MAS");
test("Key backup is disabled when reset from elsewhere", async ({ page, mailhogClient, request, homeserver }) => {
const testUsername = "alice";

View File

@ -28,6 +28,8 @@ test.describe("Cryptography", function () {
});
test.describe("decryption failure messages", () => {
test.skip(isDendrite, "Dendrite lacks support for MSC3967 so requires additional auth here");
test("should handle device-relative historical messages", async ({
homeserver,
page,

View File

@ -9,12 +9,10 @@ Please see LICENSE files in the repository root for full details.
import { test, expect } from "../../element-web-test.ts";
import { registerAccountMas } from ".";
import { ElementAppPage } from "../../pages/ElementAppPage.ts";
import { isDendrite } from "../../plugins/homeserver/dendrite";
import { masHomeserver } from "../../plugins/homeserver/synapse/masHomeserver.ts";
test.describe("OIDC Native", { tag: ["@no-firefox", "@no-webkit"] }, () => {
test.use(masHomeserver);
test.skip(isDendrite, "does not yet support MAS");
test.slow(); // trace recording takes a while here
test("can register the oauth2 client and an account", async ({ context, page, homeserver, mailhogClient, mas }) => {

View File

@ -8,10 +8,12 @@ Please see LICENSE files in the repository root for full details.
import { Fixtures } from "@playwright/test";
import { Services } from "../../../services.ts";
import { Options, Services } from "../../../services.ts";
export const consentHomeserver: Fixtures<Services & Options, {}, Services & Options> = {
_homeserver: async ({ homeserverType, _homeserver: container, mailhog }, use, testInfo) => {
testInfo.skip(homeserverType !== "synapse", "does not yet support MAS");
export const consentHomeserver: Fixtures<Services, {}, Services> = {
_homeserver: async ({ _homeserver: container, mailhog }, use) => {
container
.withCopyDirectoriesToContainer([
{ source: "playwright/plugins/homeserver/synapse/res", target: "/data/res" },

View File

@ -8,10 +8,11 @@ Please see LICENSE files in the repository root for full details.
import { Fixtures } from "@playwright/test";
import { Services } from "../../../services.ts";
import { Options, Services } from "../../../services.ts";
export const emailHomeserver: Fixtures<Services, {}, Services> = {
_homeserver: async ({ _homeserver: container, mailhog }, use) => {
export const emailHomeserver: Fixtures<Services & Options, {}, Services & Options> = {
_homeserver: async ({ homeserverType, _homeserver: container, mailhog }, use, testInfo) => {
testInfo.skip(homeserverType !== "synapse", "does not yet support MAS");
container.withConfig({
enable_registration_without_verification: undefined,
disable_msisdn_registration: undefined,

View File

@ -9,11 +9,12 @@ Please see LICENSE files in the repository root for full details.
import { Fixtures } from "@playwright/test";
import { TestContainers } from "testcontainers";
import { Services } from "../../../services.ts";
import { Options, Services } from "../../../services.ts";
import { OAuthServer } from "../../oauth_server";
export const legacyOAuthHomeserver: Fixtures<Services, {}, Services> = {
_homeserver: async ({ _homeserver: container }, use) => {
export const legacyOAuthHomeserver: Fixtures<Services & Options, {}, Services & Options> = {
_homeserver: async ({ homeserverType, _homeserver: container }, use, testInfo) => {
testInfo.skip(homeserverType !== "synapse", "does not yet support MAS");
const server = new OAuthServer();
const port = server.start();

View File

@ -8,13 +8,15 @@ Please see LICENSE files in the repository root for full details.
import { Fixtures, PlaywrightTestArgs } from "@playwright/test";
import { Services } from "../../../services.ts";
import { Options, Services } from "../../../services.ts";
import { Fixtures as BaseFixtures } from "../../../element-web-test.ts";
import { MatrixAuthenticationServiceContainer } from "../../../testcontainers/mas.ts";
type Fixture = PlaywrightTestArgs & Services & BaseFixtures;
type Fixture = PlaywrightTestArgs & Services & BaseFixtures & Options;
export const masHomeserver: Fixtures<Fixture, {}, Fixture> = {
mas: async ({ _homeserver: homeserver, logger, network, postgres, mailhog }, use) => {
mas: async ({ homeserverType, _homeserver: homeserver, logger, network, postgres, mailhog }, use, testInfo) => {
testInfo.skip(homeserverType !== "synapse", "does not yet support MAS");
const config = {
clients: [
{