Iterate
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>t3chguy/playwright-homeservers
parent
757a22a829
commit
048563a0a4
|
@ -27,7 +27,6 @@ async function expectBackupVersionToBe(page: Page, version: string) {
|
||||||
// which is faster but leaves us without crypto set up.
|
// which is faster but leaves us without crypto set up.
|
||||||
test.describe("Encryption state after registration", () => {
|
test.describe("Encryption state after registration", () => {
|
||||||
test.use(masHomeserver);
|
test.use(masHomeserver);
|
||||||
test.skip(isDendrite, "does not yet support MAS");
|
|
||||||
|
|
||||||
test("Key backup is enabled by default", async ({ page, mailhogClient, app }) => {
|
test("Key backup is enabled by default", async ({ page, mailhogClient, app }) => {
|
||||||
await page.goto("/#/login");
|
await page.goto("/#/login");
|
||||||
|
@ -54,7 +53,6 @@ test.describe("Encryption state after registration", () => {
|
||||||
|
|
||||||
test.describe("Key backup reset from elsewhere", () => {
|
test.describe("Key backup reset from elsewhere", () => {
|
||||||
test.use(masHomeserver);
|
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 }) => {
|
test("Key backup is disabled when reset from elsewhere", async ({ page, mailhogClient, request, homeserver }) => {
|
||||||
const testUsername = "alice";
|
const testUsername = "alice";
|
||||||
|
|
|
@ -28,6 +28,8 @@ test.describe("Cryptography", function () {
|
||||||
});
|
});
|
||||||
|
|
||||||
test.describe("decryption failure messages", () => {
|
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 ({
|
test("should handle device-relative historical messages", async ({
|
||||||
homeserver,
|
homeserver,
|
||||||
page,
|
page,
|
||||||
|
|
|
@ -9,12 +9,10 @@ Please see LICENSE files in the repository root for full details.
|
||||||
import { test, expect } from "../../element-web-test.ts";
|
import { test, expect } from "../../element-web-test.ts";
|
||||||
import { registerAccountMas } from ".";
|
import { registerAccountMas } from ".";
|
||||||
import { ElementAppPage } from "../../pages/ElementAppPage.ts";
|
import { ElementAppPage } from "../../pages/ElementAppPage.ts";
|
||||||
import { isDendrite } from "../../plugins/homeserver/dendrite";
|
|
||||||
import { masHomeserver } from "../../plugins/homeserver/synapse/masHomeserver.ts";
|
import { masHomeserver } from "../../plugins/homeserver/synapse/masHomeserver.ts";
|
||||||
|
|
||||||
test.describe("OIDC Native", { tag: ["@no-firefox", "@no-webkit"] }, () => {
|
test.describe("OIDC Native", { tag: ["@no-firefox", "@no-webkit"] }, () => {
|
||||||
test.use(masHomeserver);
|
test.use(masHomeserver);
|
||||||
test.skip(isDendrite, "does not yet support MAS");
|
|
||||||
test.slow(); // trace recording takes a while here
|
test.slow(); // trace recording takes a while here
|
||||||
|
|
||||||
test("can register the oauth2 client and an account", async ({ context, page, homeserver, mailhogClient, mas }) => {
|
test("can register the oauth2 client and an account", async ({ context, page, homeserver, mailhogClient, mas }) => {
|
||||||
|
|
|
@ -8,10 +8,12 @@ Please see LICENSE files in the repository root for full details.
|
||||||
|
|
||||||
import { Fixtures } from "@playwright/test";
|
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
|
container
|
||||||
.withCopyDirectoriesToContainer([
|
.withCopyDirectoriesToContainer([
|
||||||
{ source: "playwright/plugins/homeserver/synapse/res", target: "/data/res" },
|
{ source: "playwright/plugins/homeserver/synapse/res", target: "/data/res" },
|
||||||
|
|
|
@ -8,10 +8,11 @@ Please see LICENSE files in the repository root for full details.
|
||||||
|
|
||||||
import { Fixtures } from "@playwright/test";
|
import { Fixtures } from "@playwright/test";
|
||||||
|
|
||||||
import { Services } from "../../../services.ts";
|
import { Options, Services } from "../../../services.ts";
|
||||||
|
|
||||||
export const emailHomeserver: Fixtures<Services, {}, Services> = {
|
export const emailHomeserver: Fixtures<Services & Options, {}, Services & Options> = {
|
||||||
_homeserver: async ({ _homeserver: container, mailhog }, use) => {
|
_homeserver: async ({ homeserverType, _homeserver: container, mailhog }, use, testInfo) => {
|
||||||
|
testInfo.skip(homeserverType !== "synapse", "does not yet support MAS");
|
||||||
container.withConfig({
|
container.withConfig({
|
||||||
enable_registration_without_verification: undefined,
|
enable_registration_without_verification: undefined,
|
||||||
disable_msisdn_registration: undefined,
|
disable_msisdn_registration: undefined,
|
||||||
|
|
|
@ -9,11 +9,12 @@ Please see LICENSE files in the repository root for full details.
|
||||||
import { Fixtures } from "@playwright/test";
|
import { Fixtures } from "@playwright/test";
|
||||||
import { TestContainers } from "testcontainers";
|
import { TestContainers } from "testcontainers";
|
||||||
|
|
||||||
import { Services } from "../../../services.ts";
|
import { Options, Services } from "../../../services.ts";
|
||||||
import { OAuthServer } from "../../oauth_server";
|
import { OAuthServer } from "../../oauth_server";
|
||||||
|
|
||||||
export const legacyOAuthHomeserver: Fixtures<Services, {}, Services> = {
|
export const legacyOAuthHomeserver: Fixtures<Services & Options, {}, Services & Options> = {
|
||||||
_homeserver: async ({ _homeserver: container }, use) => {
|
_homeserver: async ({ homeserverType, _homeserver: container }, use, testInfo) => {
|
||||||
|
testInfo.skip(homeserverType !== "synapse", "does not yet support MAS");
|
||||||
const server = new OAuthServer();
|
const server = new OAuthServer();
|
||||||
const port = server.start();
|
const port = server.start();
|
||||||
|
|
||||||
|
|
|
@ -8,13 +8,15 @@ Please see LICENSE files in the repository root for full details.
|
||||||
|
|
||||||
import { Fixtures, PlaywrightTestArgs } from "@playwright/test";
|
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 { Fixtures as BaseFixtures } from "../../../element-web-test.ts";
|
||||||
import { MatrixAuthenticationServiceContainer } from "../../../testcontainers/mas.ts";
|
import { MatrixAuthenticationServiceContainer } from "../../../testcontainers/mas.ts";
|
||||||
|
|
||||||
type Fixture = PlaywrightTestArgs & Services & BaseFixtures;
|
type Fixture = PlaywrightTestArgs & Services & BaseFixtures & Options;
|
||||||
export const masHomeserver: Fixtures<Fixture, {}, Fixture> = {
|
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 = {
|
const config = {
|
||||||
clients: [
|
clients: [
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue