@element-hq/element-web-playwright-common 2.1.0 → 2.2.0
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/fixtures/axe.d.ts +7 -2
- package/lib/fixtures/axe.d.ts.map +1 -1
- package/lib/fixtures/axe.js +3 -1
- package/lib/fixtures/index.d.ts +1 -8
- package/lib/fixtures/index.d.ts.map +1 -1
- package/lib/fixtures/index.js +3 -4
- package/lib/fixtures/user.d.ts.map +1 -1
- package/lib/fixtures/user.js +4 -1
- package/lib/index.d.ts +3 -3
- package/lib/testcontainers/index.d.ts +1 -1
- package/lib/testcontainers/index.d.ts.map +1 -1
- package/lib/testcontainers/synapse.d.ts +42 -1
- package/lib/testcontainers/synapse.d.ts.map +1 -1
- package/lib/testcontainers/synapse.js +9 -1
- package/package.json +2 -2
- package/src/fixtures/axe.ts +4 -1
- package/src/fixtures/index.ts +3 -6
- package/src/fixtures/user.ts +5 -1
- package/src/testcontainers/index.ts +1 -1
- package/src/testcontainers/synapse.ts +9 -1
package/lib/fixtures/axe.d.ts
CHANGED
|
@@ -1,8 +1,13 @@
|
|
|
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 & {
|
|
2
|
+
export declare const test: import("playwright/test").TestType<import("playwright/test").PlaywrightTestArgs & import("playwright/test").PlaywrightTestOptions & import("./services").TestFixtures & {
|
|
3
|
+
displayName?: string;
|
|
4
|
+
credentials: import("../utils/api").Credentials;
|
|
5
|
+
pageWithCredentials: import("playwright-core").Page;
|
|
6
|
+
user: import("../utils/api").Credentials;
|
|
7
|
+
} & {
|
|
3
8
|
/**
|
|
4
9
|
* AxeBuilder instance for the current page
|
|
5
10
|
*/
|
|
6
11
|
axe: AxeBuilder;
|
|
7
|
-
}, import("playwright/test").PlaywrightWorkerArgs & import("playwright/test").PlaywrightWorkerOptions>;
|
|
12
|
+
}, import("playwright/test").PlaywrightWorkerArgs & import("playwright/test").PlaywrightWorkerOptions & import("./services").WorkerOptions & import("./services").Services>;
|
|
8
13
|
//# 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":"AAQA,OAAO,UAAU,MAAM,sBAAsB,CAAC;AAM9C,eAAO,MAAM,IAAI;;;;;;IACb;;OAEG;SACE,UAAU;2KAMjB,CAAC"}
|
package/lib/fixtures/axe.js
CHANGED
|
@@ -5,8 +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";
|
|
9
8
|
import AxeBuilder from "@axe-core/playwright";
|
|
9
|
+
import { test as base } from "./user";
|
|
10
|
+
// We want to avoid using `mergeTests` because it drops useful type information about the fixtures. Instead, we extend
|
|
11
|
+
// the definition of `test` from `user.ts`, so that there is a linear hierarchy.
|
|
10
12
|
export const test = base.extend({
|
|
11
13
|
axe: async ({ page }, use) => {
|
|
12
14
|
const builder = new AxeBuilder({ page });
|
package/lib/fixtures/index.d.ts
CHANGED
|
@@ -1,10 +1,3 @@
|
|
|
1
1
|
export { type Services, type WorkerOptions } from "./services.js";
|
|
2
|
-
export
|
|
3
|
-
axe: import("@axe-core/playwright").AxeBuilder;
|
|
4
|
-
} & import("./services.js").TestFixtures & {
|
|
5
|
-
displayName?: string;
|
|
6
|
-
credentials: import("../utils/api.js").Credentials;
|
|
7
|
-
pageWithCredentials: import("playwright-core").Page;
|
|
8
|
-
user: import("../utils/api.js").Credentials;
|
|
9
|
-
}, import("playwright/test").PlaywrightWorkerArgs & import("playwright/test").PlaywrightWorkerOptions & import("./services.js").WorkerOptions & import("./services.js").Services>;
|
|
2
|
+
export { test } from "./axe";
|
|
10
3
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/fixtures/index.ts"],"names":[],"mappings":"
|
|
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,OAAO,CAAC"}
|
package/lib/fixtures/index.js
CHANGED
|
@@ -4,7 +4,6 @@ Copyright 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
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
export const test = mergeTests(axe, user);
|
|
7
|
+
// We avoid using `mergeTests` because it drops useful type information about the fixtures.
|
|
8
|
+
// `axe` is the top of our stack of extensions (it extends `user`, etc), so it's the one we want to use.
|
|
9
|
+
export { test } from "./axe";
|
|
@@ -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;IACb;;;;;OAKG;kBACW,MAAM;IAEpB;;;OAGG;iBACU,WAAW;IAExB;;;;;;OAMG;yBACkB,IAAI;IAEzB;;;;OAIG;UACG,WAAW;
|
|
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;iLA+BnB,CAAC"}
|
package/lib/fixtures/user.js
CHANGED
|
@@ -27,7 +27,10 @@ export async function populateLocalStorageWithCredentials(page, credentials) {
|
|
|
27
27
|
}
|
|
28
28
|
export const test = base.extend({
|
|
29
29
|
displayName: undefined,
|
|
30
|
-
|
|
30
|
+
// We don't directly depend upon the `context` fixture, but we do need to make sure that it has been run
|
|
31
|
+
// before this fixture, since it is responsible for configuring the APIRequestContext on the homeserver, so
|
|
32
|
+
// without it we cannot register the user.
|
|
33
|
+
credentials: async ({ context, homeserver, displayName: testDisplayName }, use, testInfo) => {
|
|
31
34
|
const names = ["Alice", "Bob", "Charlie", "Daniel", "Eve", "Frank", "Grace", "Hannah", "Isaac", "Judy"];
|
|
32
35
|
const password = uniqueId("password_");
|
|
33
36
|
const displayName = testDisplayName ?? sample(names);
|
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 & {
|
|
32
|
-
axe: import("@axe-core/playwright").AxeBuilder;
|
|
33
|
-
} & import("./fixtures/services.js").TestFixtures & {
|
|
31
|
+
export declare const test: import("playwright/test").TestType<import("playwright/test").PlaywrightTestArgs & import("playwright/test").PlaywrightTestOptions & import("./fixtures/services.js").TestFixtures & {
|
|
34
32
|
displayName?: string;
|
|
35
33
|
credentials: import("./utils/api.js").Credentials;
|
|
36
34
|
pageWithCredentials: import("playwright-core").Page;
|
|
37
35
|
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
|
|
@@ -2,5 +2,5 @@ export { PostgreSqlContainer, StartedPostgreSqlContainer } from "@testcontainers
|
|
|
2
2
|
export type { HomeserverInstance, HomeserverContainer, StartedHomeserverContainer } from "./HomeserverContainer.js";
|
|
3
3
|
export { type SynapseConfig, SynapseContainer, StartedSynapseContainer } from "./synapse.js";
|
|
4
4
|
export { type MasConfig, MatrixAuthenticationServiceContainer, StartedMatrixAuthenticationServiceContainer, } from "./mas.js";
|
|
5
|
-
export { MailpitClient, MailpitContainer, StartedMailpitContainer } from "./mailpit.js";
|
|
5
|
+
export { type MailpitClient, MailpitContainer, StartedMailpitContainer } from "./mailpit.js";
|
|
6
6
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/testcontainers/index.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,mBAAmB,EAAE,0BAA0B,EAAE,MAAM,4BAA4B,CAAC;AAC7F,YAAY,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,0BAA0B,EAAE,MAAM,0BAA0B,CAAC;AACpH,OAAO,EAAE,KAAK,aAAa,EAAE,gBAAgB,EAAE,uBAAuB,EAAE,MAAM,cAAc,CAAC;AAC7F,OAAO,EACH,KAAK,SAAS,EACd,oCAAoC,EACpC,2CAA2C,GAC9C,MAAM,UAAU,CAAC;AAClB,OAAO,EAAE,aAAa,EAAE,gBAAgB,EAAE,uBAAuB,EAAE,MAAM,cAAc,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/testcontainers/index.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,mBAAmB,EAAE,0BAA0B,EAAE,MAAM,4BAA4B,CAAC;AAC7F,YAAY,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,0BAA0B,EAAE,MAAM,0BAA0B,CAAC;AACpH,OAAO,EAAE,KAAK,aAAa,EAAE,gBAAgB,EAAE,uBAAuB,EAAE,MAAM,cAAc,CAAC;AAC7F,OAAO,EACH,KAAK,SAAS,EACd,oCAAoC,EACpC,2CAA2C,GAC9C,MAAM,UAAU,CAAC;AAClB,OAAO,EAAE,KAAK,aAAa,EAAE,gBAAgB,EAAE,uBAAuB,EAAE,MAAM,cAAc,CAAC"}
|
|
@@ -133,7 +133,48 @@ declare const DEFAULT_CONFIG: {
|
|
|
133
133
|
room_name: string;
|
|
134
134
|
};
|
|
135
135
|
allow_guest_access: boolean;
|
|
136
|
-
experimental_features: {
|
|
136
|
+
experimental_features: {
|
|
137
|
+
/**
|
|
138
|
+
* MSC4143 Matrix RTC: Required for `matrix_rtc` configuration.
|
|
139
|
+
*/
|
|
140
|
+
msc4143_enabled: boolean;
|
|
141
|
+
};
|
|
142
|
+
matrix_rtc: {
|
|
143
|
+
transports: {
|
|
144
|
+
(arrayLength: number): {
|
|
145
|
+
[field: string]: string;
|
|
146
|
+
type: string;
|
|
147
|
+
}[];
|
|
148
|
+
(...items: {
|
|
149
|
+
[field: string]: string;
|
|
150
|
+
type: string;
|
|
151
|
+
}[]): {
|
|
152
|
+
[field: string]: string;
|
|
153
|
+
type: string;
|
|
154
|
+
}[];
|
|
155
|
+
new (arrayLength: number): {
|
|
156
|
+
[field: string]: string;
|
|
157
|
+
type: string;
|
|
158
|
+
}[];
|
|
159
|
+
new (...items: {
|
|
160
|
+
[field: string]: string;
|
|
161
|
+
type: string;
|
|
162
|
+
}[]): {
|
|
163
|
+
[field: string]: string;
|
|
164
|
+
type: string;
|
|
165
|
+
}[];
|
|
166
|
+
isArray(arg: any): arg is any[];
|
|
167
|
+
readonly prototype: any[];
|
|
168
|
+
from<T>(arrayLike: ArrayLike<T>): T[];
|
|
169
|
+
from<T, U>(arrayLike: ArrayLike<T>, mapfn: (v: T, k: number) => U, thisArg?: any): U[];
|
|
170
|
+
from<T>(iterable: Iterable<T> | ArrayLike<T>): T[];
|
|
171
|
+
from<T, U>(iterable: Iterable<T> | ArrayLike<T>, mapfn: (v: T, k: number) => U, thisArg?: any): U[];
|
|
172
|
+
of<T>(...items: T[]): T[];
|
|
173
|
+
fromAsync<T>(iterableOrArrayLike: AsyncIterable<T> | Iterable<T | PromiseLike<T>> | ArrayLike<T | PromiseLike<T>>): Promise<T[]>;
|
|
174
|
+
fromAsync<T, U>(iterableOrArrayLike: AsyncIterable<T> | Iterable<T> | ArrayLike<T>, mapFn: (value: Awaited<T>, index: number) => U, thisArg?: any): Promise<Awaited<U>[]>;
|
|
175
|
+
readonly [Symbol.species]: ArrayConstructor;
|
|
176
|
+
};
|
|
177
|
+
};
|
|
137
178
|
oidc_providers: never[];
|
|
138
179
|
serve_server_wellknown: boolean;
|
|
139
180
|
presence: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"synapse.d.ts","sourceRoot":"","sources":["../../src/testcontainers/synapse.ts"],"names":[],"mappings":"AAOA,OAAO,EACH,wBAAwB,EACxB,gBAAgB,EAChB,KAAK,cAAc,EACnB,KAAK,oBAAoB,EAE5B,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,KAAK,iBAAiB,EAAE,KAAK,QAA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;OAKG;IACU,YAAY,CAAC,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,WAAW,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC;IAKzG;;;;;OAKG;IACU,WAAW,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;CAG3F"}
|
|
@@ -126,7 +126,15 @@ const DEFAULT_CONFIG = {
|
|
|
126
126
|
user_consent: undefined,
|
|
127
127
|
server_notices: undefined,
|
|
128
128
|
allow_guest_access: false,
|
|
129
|
-
experimental_features: {
|
|
129
|
+
experimental_features: {
|
|
130
|
+
/**
|
|
131
|
+
* MSC4143 Matrix RTC: Required for `matrix_rtc` configuration.
|
|
132
|
+
*/
|
|
133
|
+
msc4143_enabled: false,
|
|
134
|
+
},
|
|
135
|
+
matrix_rtc: {
|
|
136
|
+
transports: (Array),
|
|
137
|
+
},
|
|
130
138
|
oidc_providers: [],
|
|
131
139
|
serve_server_wellknown: true,
|
|
132
140
|
presence: {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@element-hq/element-web-playwright-common",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "2.
|
|
4
|
+
"version": "2.2.0",
|
|
5
5
|
"license": "SEE LICENSE IN README.md",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"dependencies": {
|
|
32
32
|
"@axe-core/playwright": "^4.10.1",
|
|
33
33
|
"@testcontainers/postgresql": "^11.0.0",
|
|
34
|
-
"glob": "^
|
|
34
|
+
"glob": "^13.0.0",
|
|
35
35
|
"lodash-es": "^4.17.21",
|
|
36
36
|
"mailpit-api": "^1.2.0",
|
|
37
37
|
"strip-ansi": "^7.1.0",
|
package/src/fixtures/axe.ts
CHANGED
|
@@ -6,9 +6,12 @@ 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";
|
|
10
9
|
import AxeBuilder from "@axe-core/playwright";
|
|
11
10
|
|
|
11
|
+
import { test as base } from "./user";
|
|
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
15
|
export const test = base.extend<{
|
|
13
16
|
/**
|
|
14
17
|
* AxeBuilder instance for the current page
|
package/src/fixtures/index.ts
CHANGED
|
@@ -5,11 +5,8 @@ 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 { mergeTests } from "@playwright/test";
|
|
9
|
-
|
|
10
|
-
import { test as axe } from "./axe.js";
|
|
11
|
-
import { test as user } from "./user.js";
|
|
12
|
-
|
|
13
8
|
export { type Services, type WorkerOptions } from "./services.js";
|
|
14
9
|
|
|
15
|
-
|
|
10
|
+
// We avoid using `mergeTests` because it drops useful type information about the fixtures.
|
|
11
|
+
// `axe` is the top of our stack of extensions (it extends `user`, etc), so it's the one we want to use.
|
|
12
|
+
export { test } from "./axe";
|
package/src/fixtures/user.ts
CHANGED
|
@@ -70,7 +70,11 @@ export const test = base.extend<{
|
|
|
70
70
|
user: Credentials;
|
|
71
71
|
}>({
|
|
72
72
|
displayName: undefined,
|
|
73
|
-
|
|
73
|
+
|
|
74
|
+
// We don't directly depend upon the `context` fixture, but we do need to make sure that it has been run
|
|
75
|
+
// before this fixture, since it is responsible for configuring the APIRequestContext on the homeserver, so
|
|
76
|
+
// without it we cannot register the user.
|
|
77
|
+
credentials: async ({ context, homeserver, displayName: testDisplayName }, use, testInfo) => {
|
|
74
78
|
const names = ["Alice", "Bob", "Charlie", "Daniel", "Eve", "Frank", "Grace", "Hannah", "Isaac", "Judy"];
|
|
75
79
|
const password = uniqueId("password_");
|
|
76
80
|
const displayName = testDisplayName ?? sample(names)!;
|
|
@@ -13,4 +13,4 @@ export {
|
|
|
13
13
|
MatrixAuthenticationServiceContainer,
|
|
14
14
|
StartedMatrixAuthenticationServiceContainer,
|
|
15
15
|
} from "./mas.js";
|
|
16
|
-
export { MailpitClient, MailpitContainer, StartedMailpitContainer } from "./mailpit.js";
|
|
16
|
+
export { type MailpitClient, MailpitContainer, StartedMailpitContainer } from "./mailpit.js";
|
|
@@ -170,7 +170,15 @@ const DEFAULT_CONFIG = {
|
|
|
170
170
|
room_name: string;
|
|
171
171
|
},
|
|
172
172
|
allow_guest_access: false,
|
|
173
|
-
experimental_features: {
|
|
173
|
+
experimental_features: {
|
|
174
|
+
/**
|
|
175
|
+
* MSC4143 Matrix RTC: Required for `matrix_rtc` configuration.
|
|
176
|
+
*/
|
|
177
|
+
msc4143_enabled: false,
|
|
178
|
+
},
|
|
179
|
+
matrix_rtc: {
|
|
180
|
+
transports: Array<{ type: string; [field: string]: string }>,
|
|
181
|
+
},
|
|
174
182
|
oidc_providers: [],
|
|
175
183
|
serve_server_wellknown: true,
|
|
176
184
|
presence: {
|