This commit is contained in:
Michael Telatynski
2025-11-12 12:16:31 +00:00
parent e31efda9b4
commit c2f4535153
7 changed files with 14 additions and 14 deletions
@@ -9,10 +9,10 @@ import { mergeExpects, type Expect } from "@playwright/test";
import { import {
expect as screenshotExpectations, expect as screenshotExpectations,
Expectations as ScreenshotExpectations, type Expectations as ScreenshotExpectations,
ToMatchScreenshotOptions, type ToMatchScreenshotOptions,
} from "./screenshot.js"; } from "./screenshot.js";
import { expect as axeExpectations, Expectations as AxeExpectations } from "./axe.js"; import { expect as axeExpectations, type Expectations as AxeExpectations } from "./axe.js";
export const expect = mergeExpects(screenshotExpectations, axeExpectations) as Expect< export const expect = mergeExpects(screenshotExpectations, axeExpectations) as Expect<
ScreenshotExpectations & AxeExpectations ScreenshotExpectations & AxeExpectations
@@ -9,7 +9,7 @@ Please see LICENSE files in the repository root for full details.
import { import {
test, test,
expect as baseExpect, expect as baseExpect,
ElementHandle, type ElementHandle,
type ExpectMatcherState, type ExpectMatcherState,
type Locator, type Locator,
type Page, type Page,
@@ -10,7 +10,7 @@ import { type Page } from "@playwright/test";
import { sample, uniqueId } from "lodash-es"; import { sample, uniqueId } from "lodash-es";
import { test as base } from "./services.js"; import { test as base } from "./services.js";
import { Credentials } from "../utils/api.js"; import { type Credentials } from "../utils/api.js";
/** Adds an initScript to the given page which will populate localStorage appropriately so that Element will use the given credentials. */ /** Adds an initScript to the given page which will populate localStorage appropriately so that Element will use the given credentials. */
export async function populateLocalStorageWithCredentials(page: Page, credentials: Credentials) { export async function populateLocalStorageWithCredentials(page: Page, credentials: Credentials) {
@@ -9,8 +9,8 @@ import { type AbstractStartedContainer, type GenericContainer } from "testcontai
import { type APIRequestContext, type TestInfo } from "@playwright/test"; import { type APIRequestContext, type TestInfo } from "@playwright/test";
import { type StartedMatrixAuthenticationServiceContainer } from "./mas"; import { type StartedMatrixAuthenticationServiceContainer } from "./mas";
import { ClientServerApi, Credentials } from "../utils/api"; import { type ClientServerApi, type Credentials } from "../utils/api";
import { StartedMailpitContainer } from "./mailpit"; import { type StartedMailpitContainer } from "./mailpit";
export interface HomeserverInstance { export interface HomeserverInstance {
readonly baseUrl: string; readonly baseUrl: string;
@@ -23,7 +23,7 @@ import { deepCopy } from "../utils/object.js";
import { type HomeserverContainer, type StartedHomeserverContainer } from "./HomeserverContainer.js"; import { type HomeserverContainer, type StartedHomeserverContainer } from "./HomeserverContainer.js";
import { type StartedMatrixAuthenticationServiceContainer } from "./mas.js"; import { type StartedMatrixAuthenticationServiceContainer } from "./mas.js";
import { Api, ClientServerApi, type Verb, type Credentials } from "../utils/api.js"; import { Api, ClientServerApi, type Verb, type Credentials } from "../utils/api.js";
import { StartedMailpitContainer } from "./mailpit.js"; import { type StartedMailpitContainer } from "./mailpit.js";
const DEFAULT_CONFIG = { const DEFAULT_CONFIG = {
server_name: "localhost", server_name: "localhost",
@@ -5,9 +5,9 @@ SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial
Please see LICENSE files in the repository root for full details. Please see LICENSE files in the repository root for full details.
*/ */
import { BrowserContext, Page } from "@playwright/test"; import { type BrowserContext, type Page } from "@playwright/test";
import { Config, CONFIG_JSON } from "../index.js"; import { type Config, CONFIG_JSON } from "../index.js";
/** Construct a suitable config.json for the given homeserver /** Construct a suitable config.json for the given homeserver
* *
@@ -5,11 +5,11 @@ SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial
Please see LICENSE files in the repository root for full details. Please see LICENSE files in the repository root for full details.
*/ */
import { Browser } from "playwright-core"; import { type Browser } from "playwright-core";
import { Page } from "@playwright/test"; import { type Page } from "@playwright/test";
import { Credentials } from "./api.js"; import { type Credentials } from "./api.js";
import { Config } from "../index.js"; import { type Config } from "../index.js";
import { routeConfigJson } from "./config_json.js"; import { routeConfigJson } from "./config_json.js";
import { populateLocalStorageWithCredentials } from "../fixtures/user.js"; import { populateLocalStorageWithCredentials } from "../fixtures/user.js";