@element-hq/element-web-playwright-common 2.2.2 → 2.2.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/expect/axe.d.ts +1 -1
- package/lib/expect/axe.d.ts.map +1 -1
- package/lib/expect/screenshot.d.ts +1 -1
- package/lib/expect/screenshot.d.ts.map +1 -1
- package/lib/fixtures/axe.d.ts +2 -7
- package/lib/fixtures/axe.d.ts.map +1 -1
- package/lib/fixtures/axe.js +3 -3
- package/lib/fixtures/index.d.ts +1 -1
- package/lib/fixtures/index.d.ts.map +1 -1
- package/lib/fixtures/index.js +2 -2
- package/lib/fixtures/services.d.ts +3 -1
- package/lib/fixtures/services.d.ts.map +1 -1
- package/lib/fixtures/services.js +3 -1
- package/lib/fixtures/user.d.ts +4 -2
- package/lib/fixtures/user.d.ts.map +1 -1
- package/lib/index.d.ts +3 -3
- package/lib/testcontainers/HomeserverContainer.d.ts +3 -3
- package/lib/testcontainers/HomeserverContainer.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/fixtures/axe.ts +3 -4
- package/src/fixtures/index.ts +2 -2
- package/src/fixtures/services.ts +3 -1
- package/src/testcontainers/HomeserverContainer.ts +3 -3
- package/tsconfig.json +2 -0
package/lib/expect/axe.d.ts
CHANGED
|
@@ -7,5 +7,5 @@ export type Expectations = {
|
|
|
7
7
|
*/
|
|
8
8
|
toHaveNoViolations: (this: ExpectMatcherState, receiver: AxeBuilder) => Promise<MatcherReturnType>;
|
|
9
9
|
};
|
|
10
|
-
export declare const expect: import("playwright/test").Expect<Expectations>;
|
|
10
|
+
export declare const expect: import("@playwright/test").Expect<Expectations>;
|
|
11
11
|
//# sourceMappingURL=axe.d.ts.map
|
package/lib/expect/axe.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"axe.d.ts","sourceRoot":"","sources":["../../src/expect/axe.ts"],"names":[],"mappings":"AAQA,OAAO,EAA8B,KAAK,kBAAkB,EAAE,KAAK,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAE/G,OAAO,KAAK,UAAU,MAAM,sBAAsB,CAAC;AAEnD,MAAM,MAAM,YAAY,GAAG;IACvB;;;OAGG;IACH,kBAAkB,EAAE,CAAC,IAAI,EAAE,kBAAkB,EAAE,QAAQ,EAAE,UAAU,KAAK,OAAO,CAAC,iBAAiB,CAAC,CAAC;CACtG,CAAC;AAEF,eAAO,MAAM,MAAM,
|
|
1
|
+
{"version":3,"file":"axe.d.ts","sourceRoot":"","sources":["../../src/expect/axe.ts"],"names":[],"mappings":"AAQA,OAAO,EAA8B,KAAK,kBAAkB,EAAE,KAAK,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAE/G,OAAO,KAAK,UAAU,MAAM,sBAAsB,CAAC;AAEnD,MAAM,MAAM,YAAY,GAAG;IACvB;;;OAGG;IACH,kBAAkB,EAAE,CAAC,IAAI,EAAE,kBAAkB,EAAE,QAAQ,EAAE,UAAU,KAAK,OAAO,CAAC,iBAAiB,CAAC,CAAC;CACtG,CAAC;AAEF,eAAO,MAAM,MAAM,iDAgBjB,CAAC"}
|
|
@@ -9,5 +9,5 @@ export type Expectations = {
|
|
|
9
9
|
* Provides an upgrade to the `toHaveScreenshot` expectation.
|
|
10
10
|
* Unfortunately, we can't just extend the existing `toHaveScreenshot` expectation
|
|
11
11
|
*/
|
|
12
|
-
export declare const expect: import("playwright/test").Expect<Expectations>;
|
|
12
|
+
export declare const expect: import("@playwright/test").Expect<Expectations>;
|
|
13
13
|
//# sourceMappingURL=screenshot.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"screenshot.d.ts","sourceRoot":"","sources":["../../src/expect/screenshot.ts"],"names":[],"mappings":"AAQA,OAAO,EAIH,KAAK,kBAAkB,EACvB,KAAK,OAAO,EACZ,KAAK,IAAI,EACT,KAAK,qCAAqC,EAC1C,KAAK,iBAAiB,EACzB,MAAM,kBAAkB,CAAC;AAa1B,MAAM,WAAW,wBAAyB,SAAQ,qCAAqC;IACnF,GAAG,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,MAAM,YAAY,GAAG;IACvB,iBAAiB,EAAE,CACf,IAAI,EAAE,kBAAkB,EACxB,QAAQ,EAAE,IAAI,GAAG,OAAO,EACxB,IAAI,EAAE,GAAG,MAAM,MAAM,EACrB,OAAO,CAAC,EAAE,wBAAwB,KACjC,OAAO,CAAC,iBAAiB,CAAC,CAAC;CACnC,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,MAAM,
|
|
1
|
+
{"version":3,"file":"screenshot.d.ts","sourceRoot":"","sources":["../../src/expect/screenshot.ts"],"names":[],"mappings":"AAQA,OAAO,EAIH,KAAK,kBAAkB,EACvB,KAAK,OAAO,EACZ,KAAK,IAAI,EACT,KAAK,qCAAqC,EAC1C,KAAK,iBAAiB,EACzB,MAAM,kBAAkB,CAAC;AAa1B,MAAM,WAAW,wBAAyB,SAAQ,qCAAqC;IACnF,GAAG,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,MAAM,YAAY,GAAG;IACvB,iBAAiB,EAAE,CACf,IAAI,EAAE,kBAAkB,EACxB,QAAQ,EAAE,IAAI,GAAG,OAAO,EACxB,IAAI,EAAE,GAAG,MAAM,MAAM,EACrB,OAAO,CAAC,EAAE,wBAAwB,KACjC,OAAO,CAAC,iBAAiB,CAAC,CAAC;CACnC,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,MAAM,iDA+BjB,CAAC"}
|
package/lib/fixtures/axe.d.ts
CHANGED
|
@@ -1,13 +1,8 @@
|
|
|
1
1
|
import AxeBuilder from "@axe-core/playwright";
|
|
2
|
-
export declare const test: import("playwright/test").TestType<import("playwright/test").PlaywrightTestArgs & import("playwright/test").PlaywrightTestOptions &
|
|
3
|
-
displayName?: string;
|
|
4
|
-
credentials: import("../utils/api").Credentials;
|
|
5
|
-
pageWithCredentials: import("playwright-core").Page;
|
|
6
|
-
user: import("../utils/api").Credentials;
|
|
7
|
-
} & {
|
|
2
|
+
export declare const test: import("@playwright/test").TestType<import("@playwright/test").PlaywrightTestArgs & import("@playwright/test").PlaywrightTestOptions & {
|
|
8
3
|
/**
|
|
9
4
|
* AxeBuilder instance for the current page
|
|
10
5
|
*/
|
|
11
6
|
axe: AxeBuilder;
|
|
12
|
-
}, import("playwright/test").PlaywrightWorkerArgs & import("playwright/test").PlaywrightWorkerOptions
|
|
7
|
+
}, import("@playwright/test").PlaywrightWorkerArgs & import("@playwright/test").PlaywrightWorkerOptions>;
|
|
13
8
|
//# sourceMappingURL=axe.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"axe.d.ts","sourceRoot":"","sources":["../../src/fixtures/axe.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"axe.d.ts","sourceRoot":"","sources":["../../src/fixtures/axe.ts"],"names":[],"mappings":"AASA,OAAO,UAAU,MAAM,sBAAsB,CAAC;AAI9C,eAAO,MAAM,IAAI;IACb;;OAEG;SACE,UAAU;wGAMjB,CAAC"}
|
package/lib/fixtures/axe.js
CHANGED
|
@@ -5,10 +5,10 @@ Copyright 2023 The Matrix.org Foundation C.I.C.
|
|
|
5
5
|
SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial
|
|
6
6
|
Please see LICENSE files in the repository root for full details.
|
|
7
7
|
*/
|
|
8
|
+
import { test as base } from "@playwright/test";
|
|
8
9
|
import AxeBuilder from "@axe-core/playwright";
|
|
9
|
-
|
|
10
|
-
//
|
|
11
|
-
// the definition of `test` from `user.ts`, so that there is a linear hierarchy.
|
|
10
|
+
// This fixture is useful for simple component library tests that won't want any extra services like a homeserver, so we
|
|
11
|
+
// explicitly avoid pulling anything more than playwright's base fixtures in.
|
|
12
12
|
export const test = base.extend({
|
|
13
13
|
axe: async ({ page }, use) => {
|
|
14
14
|
const builder = new AxeBuilder({ page });
|
package/lib/fixtures/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/fixtures/index.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,KAAK,QAAQ,EAAE,KAAK,aAAa,EAAE,MAAM,eAAe,CAAC;AAIlE,OAAO,EAAE,IAAI,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/fixtures/index.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,KAAK,QAAQ,EAAE,KAAK,aAAa,EAAE,MAAM,eAAe,CAAC;AAIlE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC"}
|
package/lib/fixtures/index.js
CHANGED
|
@@ -5,5 +5,5 @@ SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial
|
|
|
5
5
|
Please see LICENSE files in the repository root for full details.
|
|
6
6
|
*/
|
|
7
7
|
// We avoid using `mergeTests` because it drops useful type information about the fixtures.
|
|
8
|
-
// `
|
|
9
|
-
export { test } from "./
|
|
8
|
+
// `user` is the top of our stack of extensions (it extends services, axe, etc), so it includes everything.
|
|
9
|
+
export { test } from "./user.js";
|
|
@@ -53,5 +53,7 @@ export interface Services {
|
|
|
53
53
|
*/
|
|
54
54
|
mas?: StartedMatrixAuthenticationServiceContainer;
|
|
55
55
|
}
|
|
56
|
-
export declare const test: import("playwright/test").TestType<import("playwright/test").PlaywrightTestArgs & import("playwright/test").PlaywrightTestOptions &
|
|
56
|
+
export declare const test: import("playwright/test").TestType<import("playwright/test").PlaywrightTestArgs & import("playwright/test").PlaywrightTestOptions & {
|
|
57
|
+
axe: import("@axe-core/playwright").AxeBuilder;
|
|
58
|
+
} & TestFixtures, import("playwright/test").PlaywrightWorkerArgs & import("playwright/test").PlaywrightWorkerOptions & WorkerOptions & Services>;
|
|
57
59
|
//# sourceMappingURL=services.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"services.d.ts","sourceRoot":"","sources":["../../src/fixtures/services.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"services.d.ts","sourceRoot":"","sources":["../../src/fixtures/services.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,KAAK,aAAa,EAAE,MAAM,aAAa,CAAC;AACjD,OAAO,EAAW,KAAK,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAC9D,OAAO,EAAuB,KAAK,0BAA0B,EAAE,MAAM,4BAA4B,CAAC;AAElG,OAAO,EACH,KAAK,aAAa,EAElB,KAAK,2CAA2C,EAChD,KAAK,mBAAmB,EACxB,KAAK,0BAA0B,EAE/B,KAAK,uBAAuB,EAC/B,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAK5C;;GAEG;AACH,MAAM,WAAW,YAAY;IACzB;;;OAGG;IACH,aAAa,EAAE,aAAa,CAAC;CAChC;AAED,MAAM,WAAW,aAAa;IAC1B;;OAEG;IACH,aAAa,EAAE,OAAO,CAAC,aAAa,CAAC,CAAC;CACzC;AAED;;GAEG;AACH,MAAM,WAAW,QAAQ;IACrB;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;IAEf;;OAEG;IACH,OAAO,EAAE,cAAc,CAAC;IAExB;;OAEG;IACH,QAAQ,EAAE,0BAA0B,CAAC;IAErC;;OAEG;IACH,OAAO,EAAE,uBAAuB,CAAC;IAEjC;;OAEG;IACH,WAAW,EAAE,mBAAmB,CAAC,OAAO,CAAC,CAAC;IAC1C;;OAEG;IACH,UAAU,EAAE,0BAA0B,CAAC;IAEvC;;;OAGG;IACH,GAAG,CAAC,EAAE,2CAA2C,CAAC;CACrD;AAED,eAAO,MAAM,IAAI;;gJA0Gf,CAAC"}
|
package/lib/fixtures/services.js
CHANGED
|
@@ -4,11 +4,13 @@ Copyright 2024-2025 New Vector Ltd.
|
|
|
4
4
|
SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial
|
|
5
5
|
Please see LICENSE files in the repository root for full details.
|
|
6
6
|
*/
|
|
7
|
-
import { test as base } from "@playwright/test";
|
|
8
7
|
import { Network } from "testcontainers";
|
|
9
8
|
import { PostgreSqlContainer } from "@testcontainers/postgresql";
|
|
10
9
|
import { SynapseContainer, MailpitContainer, } from "../testcontainers/index.js";
|
|
11
10
|
import { Logger } from "../utils/logger.js";
|
|
11
|
+
// We want to avoid using `mergeTests` in index.ts because it drops useful type information about the fixtures. Instead,
|
|
12
|
+
// we add `axe` into our fixture suite by using its `test` as a base, so that there is a linear hierarchy.
|
|
13
|
+
import { test as base } from "./axe.js";
|
|
12
14
|
export const test = base.extend({
|
|
13
15
|
logger: [
|
|
14
16
|
// eslint-disable-next-line no-empty-pattern
|
package/lib/fixtures/user.d.ts
CHANGED
|
@@ -2,7 +2,9 @@ import { type Page } from "@playwright/test";
|
|
|
2
2
|
import { type Credentials } from "../utils/api.js";
|
|
3
3
|
/** Adds an initScript to the given page which will populate localStorage appropriately so that Element will use the given credentials. */
|
|
4
4
|
export declare function populateLocalStorageWithCredentials(page: Page, credentials: Credentials): Promise<void>;
|
|
5
|
-
export declare const test: import("playwright/test").TestType<import("playwright/test").PlaywrightTestArgs & import("playwright/test").PlaywrightTestOptions &
|
|
5
|
+
export declare const test: import("@playwright/test").TestType<import("@playwright/test").PlaywrightTestArgs & import("@playwright/test").PlaywrightTestOptions & {
|
|
6
|
+
axe: import("@axe-core/playwright").AxeBuilder;
|
|
7
|
+
} & import("./services.js").TestFixtures & {
|
|
6
8
|
/**
|
|
7
9
|
* The displayname to use for the user registered in {@link #credentials}.
|
|
8
10
|
*
|
|
@@ -29,5 +31,5 @@ export declare const test: import("playwright/test").TestType<import("playwright
|
|
|
29
31
|
* app.
|
|
30
32
|
*/
|
|
31
33
|
user: Credentials;
|
|
32
|
-
}, import("playwright/test").PlaywrightWorkerArgs & import("playwright/test").PlaywrightWorkerOptions & import("./services.js").WorkerOptions & import("./services.js").Services>;
|
|
34
|
+
}, import("@playwright/test").PlaywrightWorkerArgs & import("@playwright/test").PlaywrightWorkerOptions & import("./services.js").WorkerOptions & import("./services.js").Services>;
|
|
33
35
|
//# sourceMappingURL=user.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"user.d.ts","sourceRoot":"","sources":["../../src/fixtures/user.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,KAAK,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAI7C,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAEnD,0IAA0I;AAC1I,wBAAsB,mCAAmC,CAAC,IAAI,EAAE,IAAI,EAAE,WAAW,EAAE,WAAW,iBAuB7F;AAED,eAAO,MAAM,IAAI
|
|
1
|
+
{"version":3,"file":"user.d.ts","sourceRoot":"","sources":["../../src/fixtures/user.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,KAAK,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAI7C,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAEnD,0IAA0I;AAC1I,wBAAsB,mCAAmC,CAAC,IAAI,EAAE,IAAI,EAAE,WAAW,EAAE,WAAW,iBAuB7F;AAED,eAAO,MAAM,IAAI;;;IACb;;;;;OAKG;kBACW,MAAM;IAEpB;;;OAGG;iBACU,WAAW;IAExB;;;;;;OAMG;yBACkB,IAAI;IAEzB;;;;OAIG;UACG,WAAW;mLA+BnB,CAAC"}
|
package/lib/index.d.ts
CHANGED
|
@@ -28,13 +28,13 @@ export interface TestFixtures {
|
|
|
28
28
|
labsFlags: string[];
|
|
29
29
|
disablePresence: boolean;
|
|
30
30
|
}
|
|
31
|
-
export declare const test: import("playwright/test").TestType<import("playwright/test").PlaywrightTestArgs & import("playwright/test").PlaywrightTestOptions &
|
|
31
|
+
export declare const test: import("playwright/test").TestType<import("playwright/test").PlaywrightTestArgs & import("playwright/test").PlaywrightTestOptions & {
|
|
32
|
+
axe: import("@axe-core/playwright").AxeBuilder;
|
|
33
|
+
} & import("./fixtures/services.js").TestFixtures & {
|
|
32
34
|
displayName?: string;
|
|
33
35
|
credentials: import("./utils/api.js").Credentials;
|
|
34
36
|
pageWithCredentials: import("playwright-core").Page;
|
|
35
37
|
user: import("./utils/api.js").Credentials;
|
|
36
|
-
} & {
|
|
37
|
-
axe: import("@axe-core/playwright").AxeBuilder;
|
|
38
38
|
} & TestFixtures, import("playwright/test").PlaywrightWorkerArgs & import("playwright/test").PlaywrightWorkerOptions & import("./fixtures/services.js").WorkerOptions & import("./fixtures/services.js").Services>;
|
|
39
39
|
export { expect, type ToMatchScreenshotOptions } from "./expect/index.js";
|
|
40
40
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { type AbstractStartedContainer, type GenericContainer } from "testcontainers";
|
|
2
2
|
import { type APIRequestContext, type TestInfo } from "@playwright/test";
|
|
3
|
-
import { type StartedMatrixAuthenticationServiceContainer } from "./mas";
|
|
4
|
-
import { type ClientServerApi, type Credentials } from "../utils/api";
|
|
5
|
-
import { type StartedMailpitContainer } from "./mailpit";
|
|
3
|
+
import { type StartedMatrixAuthenticationServiceContainer } from "./mas.js";
|
|
4
|
+
import { type ClientServerApi, type Credentials } from "../utils/api.js";
|
|
5
|
+
import { type StartedMailpitContainer } from "./mailpit.js";
|
|
6
6
|
export interface HomeserverInstance {
|
|
7
7
|
readonly baseUrl: string;
|
|
8
8
|
readonly csApi: ClientServerApi;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HomeserverContainer.d.ts","sourceRoot":"","sources":["../../src/testcontainers/HomeserverContainer.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,KAAK,wBAAwB,EAAE,KAAK,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AACtF,OAAO,EAAE,KAAK,iBAAiB,EAAE,KAAK,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAEzE,OAAO,EAAE,KAAK,2CAA2C,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"HomeserverContainer.d.ts","sourceRoot":"","sources":["../../src/testcontainers/HomeserverContainer.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,KAAK,wBAAwB,EAAE,KAAK,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AACtF,OAAO,EAAE,KAAK,iBAAiB,EAAE,KAAK,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAEzE,OAAO,EAAE,KAAK,2CAA2C,EAAE,MAAM,UAAU,CAAC;AAC5E,OAAO,EAAE,KAAK,eAAe,EAAE,KAAK,WAAW,EAAE,MAAM,iBAAiB,CAAC;AACzE,OAAO,EAAE,KAAK,uBAAuB,EAAE,MAAM,cAAc,CAAC;AAE5D,MAAM,WAAW,kBAAkB;IAC/B,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,KAAK,EAAE,eAAe,CAAC;IAEhC;;;;;OAKG;IACH,YAAY,CAAC,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,WAAW,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC,CAAC;IAE7F;;;;OAIG;IACH,SAAS,CAAC,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC,CAAC;IAElE;;;;;;OAMG;IACH,WAAW,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CAC/E;AAED,MAAM,WAAW,mBAAmB,CAAC,MAAM,CAAE,SAAQ,gBAAgB;IACjE;;;;OAIG;IACH,eAAe,CAAC,GAAG,SAAS,MAAM,MAAM,EAAE,GAAG,EAAE,GAAG,EAAE,KAAK,EAAE,MAAM,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC;IAE9E;;;OAGG;IACH,UAAU,CAAC,MAAM,EAAE,OAAO,CAAC,MAAM,CAAC,GAAG,IAAI,CAAC;IAE1C;;;OAGG;IACH,cAAc,CAAC,OAAO,EAAE,uBAAuB,GAAG,IAAI,CAAC;IACvD;;;OAGG;IACH,+BAA+B,CAAC,GAAG,CAAC,EAAE,2CAA2C,GAAG,IAAI,CAAC;IAEzF;;OAEG;IACH,KAAK,IAAI,OAAO,CAAC,0BAA0B,CAAC,CAAC;CAChD;AAED,MAAM,WAAW,0BAA2B,SAAQ,wBAAwB,EAAE,kBAAkB;IAC5F;;;OAGG;IACH,UAAU,CAAC,OAAO,EAAE,iBAAiB,GAAG,IAAI,CAAC;IAE7C;;;OAGG;IACH,cAAc,CAAC,QAAQ,EAAE,QAAQ,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CACrD"}
|
package/package.json
CHANGED
package/src/fixtures/axe.ts
CHANGED
|
@@ -6,12 +6,11 @@ SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial
|
|
|
6
6
|
Please see LICENSE files in the repository root for full details.
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
|
+
import { test as base } from "@playwright/test";
|
|
9
10
|
import AxeBuilder from "@axe-core/playwright";
|
|
10
11
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
// We want to avoid using `mergeTests` because it drops useful type information about the fixtures. Instead, we extend
|
|
14
|
-
// the definition of `test` from `user.ts`, so that there is a linear hierarchy.
|
|
12
|
+
// This fixture is useful for simple component library tests that won't want any extra services like a homeserver, so we
|
|
13
|
+
// explicitly avoid pulling anything more than playwright's base fixtures in.
|
|
15
14
|
export const test = base.extend<{
|
|
16
15
|
/**
|
|
17
16
|
* AxeBuilder instance for the current page
|
package/src/fixtures/index.ts
CHANGED
|
@@ -8,5 +8,5 @@ Please see LICENSE files in the repository root for full details.
|
|
|
8
8
|
export { type Services, type WorkerOptions } from "./services.js";
|
|
9
9
|
|
|
10
10
|
// We avoid using `mergeTests` because it drops useful type information about the fixtures.
|
|
11
|
-
// `
|
|
12
|
-
export { test } from "./
|
|
11
|
+
// `user` is the top of our stack of extensions (it extends services, axe, etc), so it includes everything.
|
|
12
|
+
export { test } from "./user.js";
|
package/src/fixtures/services.ts
CHANGED
|
@@ -5,7 +5,6 @@ SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial
|
|
|
5
5
|
Please see LICENSE files in the repository root for full details.
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
|
-
import { test as base } from "@playwright/test";
|
|
9
8
|
import { type MailpitClient } from "mailpit-api";
|
|
10
9
|
import { Network, type StartedNetwork } from "testcontainers";
|
|
11
10
|
import { PostgreSqlContainer, type StartedPostgreSqlContainer } from "@testcontainers/postgresql";
|
|
@@ -20,6 +19,9 @@ import {
|
|
|
20
19
|
type StartedMailpitContainer,
|
|
21
20
|
} from "../testcontainers/index.js";
|
|
22
21
|
import { Logger } from "../utils/logger.js";
|
|
22
|
+
// We want to avoid using `mergeTests` in index.ts because it drops useful type information about the fixtures. Instead,
|
|
23
|
+
// we add `axe` into our fixture suite by using its `test` as a base, so that there is a linear hierarchy.
|
|
24
|
+
import { test as base } from "./axe.js";
|
|
23
25
|
|
|
24
26
|
/**
|
|
25
27
|
* Test-scoped fixtures available in the test
|
|
@@ -8,9 +8,9 @@ Please see LICENSE files in the repository root for full details.
|
|
|
8
8
|
import { type AbstractStartedContainer, type GenericContainer } from "testcontainers";
|
|
9
9
|
import { type APIRequestContext, type TestInfo } from "@playwright/test";
|
|
10
10
|
|
|
11
|
-
import { type StartedMatrixAuthenticationServiceContainer } from "./mas";
|
|
12
|
-
import { type ClientServerApi, type Credentials } from "../utils/api";
|
|
13
|
-
import { type StartedMailpitContainer } from "./mailpit";
|
|
11
|
+
import { type StartedMatrixAuthenticationServiceContainer } from "./mas.js";
|
|
12
|
+
import { type ClientServerApi, type Credentials } from "../utils/api.js";
|
|
13
|
+
import { type StartedMailpitContainer } from "./mailpit.js";
|
|
14
14
|
|
|
15
15
|
export interface HomeserverInstance {
|
|
16
16
|
readonly baseUrl: string;
|