@argos-ci/playwright 7.5.1 → 7.6.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/dist/index.d.mts +1 -1
- package/dist/reporter.d.mts +140 -6
- package/package.json +4 -4
package/dist/index.d.mts
CHANGED
|
@@ -2,7 +2,7 @@ import { ScreenshotMetadata } from "@argos-ci/util";
|
|
|
2
2
|
import { StabilizationPluginOptions, ViewportOption } from "@argos-ci/browser";
|
|
3
3
|
import { ElementHandle, Frame, Locator, LocatorScreenshotOptions, Page, PageScreenshotOptions } from "@playwright/test";
|
|
4
4
|
import "playwright-core";
|
|
5
|
-
//#region ../../node_modules/.pnpm/playwright@1.
|
|
5
|
+
//#region ../../node_modules/.pnpm/playwright@1.63.0/node_modules/playwright/types/test.d.ts
|
|
6
6
|
// --- BEGINGLOBAL ---
|
|
7
7
|
declare global {
|
|
8
8
|
export namespace PlaywrightTest {
|
package/dist/reporter.d.mts
CHANGED
|
@@ -1,23 +1,37 @@
|
|
|
1
1
|
import { UploadParameters } from "@argos-ci/core";
|
|
2
2
|
import { BrowserContextOptions, Geolocation, HTTPCredentials, LaunchOptions, PageScreenshotOptions, ViewportSize } from "playwright-core";
|
|
3
|
-
//#region ../../node_modules/.pnpm/playwright@1.
|
|
3
|
+
//#region ../../node_modules/.pnpm/playwright@1.63.0/node_modules/playwright/types/test.d.ts
|
|
4
4
|
type BlobReporterOptions = {
|
|
5
5
|
outputDir?: string;
|
|
6
6
|
fileName?: string;
|
|
7
7
|
};
|
|
8
|
+
type DotReporterOptions = {
|
|
9
|
+
omitTags?: boolean;
|
|
10
|
+
};
|
|
11
|
+
type LineReporterOptions = {
|
|
12
|
+
omitTags?: boolean;
|
|
13
|
+
};
|
|
8
14
|
type ListReporterOptions = {
|
|
9
15
|
printSteps?: boolean;
|
|
10
16
|
printFailuresInline?: boolean;
|
|
17
|
+
omitTags?: boolean;
|
|
18
|
+
};
|
|
19
|
+
type GitHubReporterOptions = {
|
|
20
|
+
omitTags?: boolean;
|
|
11
21
|
};
|
|
12
22
|
type JUnitReporterOptions = {
|
|
13
23
|
outputFile?: string;
|
|
14
24
|
stripANSIControlSequences?: boolean;
|
|
15
25
|
includeProjectInTestName?: boolean;
|
|
16
26
|
includeRetries?: boolean;
|
|
27
|
+
omitTags?: boolean;
|
|
17
28
|
};
|
|
18
29
|
type JsonReporterOptions = {
|
|
19
30
|
outputFile?: string;
|
|
20
31
|
};
|
|
32
|
+
type PerfettoReporterOptions = {
|
|
33
|
+
outputFile?: string;
|
|
34
|
+
};
|
|
21
35
|
type HtmlReporterOptions = {
|
|
22
36
|
outputFolder?: string;
|
|
23
37
|
open?: 'always' | 'never' | 'on-failure';
|
|
@@ -30,7 +44,7 @@ type HtmlReporterOptions = {
|
|
|
30
44
|
doNotInlineAssets?: boolean;
|
|
31
45
|
mergeFiles?: boolean;
|
|
32
46
|
};
|
|
33
|
-
type ReporterDescription = Readonly<['blob'] | ['blob', BlobReporterOptions] | ['dot'] | ['line'] | ['list'] | ['list', ListReporterOptions] | ['github'] | ['junit'] | ['junit', JUnitReporterOptions] | ['json'] | ['json', JsonReporterOptions] | ['html'] | ['html', HtmlReporterOptions] | ['null'] | [string] | [string, any]>;
|
|
47
|
+
type ReporterDescription = Readonly<['blob'] | ['blob', BlobReporterOptions] | ['dot'] | ['dot', DotReporterOptions] | ['line'] | ['line', LineReporterOptions] | ['list'] | ['list', ListReporterOptions] | ['github'] | ['github', GitHubReporterOptions] | ['junit'] | ['junit', JUnitReporterOptions] | ['json'] | ['json', JsonReporterOptions] | ['perfetto'] | ['perfetto', PerfettoReporterOptions] | ['html'] | ['html', HtmlReporterOptions] | ['null'] | [string] | [string, any]>;
|
|
34
48
|
type UseOptions<TestArgs, WorkerArgs> = Partial<WorkerArgs> & Partial<TestArgs>;
|
|
35
49
|
/**
|
|
36
50
|
* Runtime representation of the test project configuration. It is accessible in the tests via
|
|
@@ -242,6 +256,9 @@ interface FullConfig<TestArgs = {}, WorkerArgs = {}> {
|
|
|
242
256
|
type BrowserName = 'chromium' | 'firefox' | 'webkit';
|
|
243
257
|
type BrowserChannel = Exclude<LaunchOptions['channel'], undefined>;
|
|
244
258
|
type ColorScheme = Exclude<BrowserContextOptions['colorScheme'], undefined>;
|
|
259
|
+
type Contrast = Exclude<BrowserContextOptions['contrast'], undefined>;
|
|
260
|
+
type ForcedColors = Exclude<BrowserContextOptions['forcedColors'], undefined>;
|
|
261
|
+
type ReducedMotion = Exclude<BrowserContextOptions['reducedMotion'], undefined>;
|
|
245
262
|
type ClientCertificate = Exclude<BrowserContextOptions['clientCertificates'], undefined>[0];
|
|
246
263
|
type ExtraHTTPHeaders = Exclude<BrowserContextOptions['extraHTTPHeaders'], undefined>;
|
|
247
264
|
type Proxy = Exclude<BrowserContextOptions['proxy'], undefined>;
|
|
@@ -558,7 +575,11 @@ interface PlaywrightWorkerOptions {
|
|
|
558
575
|
*/
|
|
559
576
|
trace: TraceMode | /** deprecated */ 'retry-with-trace' | {
|
|
560
577
|
mode: TraceMode;
|
|
561
|
-
snapshots?: boolean
|
|
578
|
+
snapshots?: boolean | {
|
|
579
|
+
dom?: boolean;
|
|
580
|
+
aria?: boolean;
|
|
581
|
+
screen?: boolean;
|
|
582
|
+
};
|
|
562
583
|
screenshots?: boolean;
|
|
563
584
|
sources?: boolean;
|
|
564
585
|
attachments?: boolean;
|
|
@@ -721,6 +742,26 @@ interface PlaywrightTestOptions {
|
|
|
721
742
|
*
|
|
722
743
|
*/
|
|
723
744
|
colorScheme: ColorScheme;
|
|
745
|
+
/**
|
|
746
|
+
* Emulates `'prefers-contrast'` media feature, supported values are `'no-preference'`, `'more'`. See
|
|
747
|
+
* [page.emulateMedia([options])](https://playwright.dev/docs/api/class-page#page-emulate-media) for more details.
|
|
748
|
+
* Passing `null` resets emulation to system defaults. Defaults to `'no-preference'`.
|
|
749
|
+
*
|
|
750
|
+
* **Usage**
|
|
751
|
+
*
|
|
752
|
+
* ```js
|
|
753
|
+
* // playwright.config.ts
|
|
754
|
+
* import { defineConfig } from '@playwright/test';
|
|
755
|
+
*
|
|
756
|
+
* export default defineConfig({
|
|
757
|
+
* use: {
|
|
758
|
+
* contrast: 'more',
|
|
759
|
+
* },
|
|
760
|
+
* });
|
|
761
|
+
* ```
|
|
762
|
+
*
|
|
763
|
+
*/
|
|
764
|
+
contrast: Contrast;
|
|
724
765
|
/**
|
|
725
766
|
* TLS Client Authentication allows the server to request a client certificate and verify it.
|
|
726
767
|
*
|
|
@@ -798,6 +839,26 @@ interface PlaywrightTestOptions {
|
|
|
798
839
|
*
|
|
799
840
|
*/
|
|
800
841
|
extraHTTPHeaders: ExtraHTTPHeaders | undefined;
|
|
842
|
+
/**
|
|
843
|
+
* Emulates `'forced-colors'` media feature, supported values are `'active'`, `'none'`. See
|
|
844
|
+
* [page.emulateMedia([options])](https://playwright.dev/docs/api/class-page#page-emulate-media) for more details.
|
|
845
|
+
* Passing `null` resets emulation to system defaults. Defaults to `'none'`.
|
|
846
|
+
*
|
|
847
|
+
* **Usage**
|
|
848
|
+
*
|
|
849
|
+
* ```js
|
|
850
|
+
* // playwright.config.ts
|
|
851
|
+
* import { defineConfig } from '@playwright/test';
|
|
852
|
+
*
|
|
853
|
+
* export default defineConfig({
|
|
854
|
+
* use: {
|
|
855
|
+
* forcedColors: 'active',
|
|
856
|
+
* },
|
|
857
|
+
* });
|
|
858
|
+
* ```
|
|
859
|
+
*
|
|
860
|
+
*/
|
|
861
|
+
forcedColors: ForcedColors;
|
|
801
862
|
/**
|
|
802
863
|
* **Usage**
|
|
803
864
|
*
|
|
@@ -838,6 +899,9 @@ interface PlaywrightTestOptions {
|
|
|
838
899
|
* Credentials for [HTTP authentication](https://developer.mozilla.org/en-US/docs/Web/HTTP/Authentication). If no
|
|
839
900
|
* origin is specified, the username and password are sent to any servers upon unauthorized responses.
|
|
840
901
|
*
|
|
902
|
+
* Pass an array to use different credentials for different origins. The first entry that matches the request origin
|
|
903
|
+
* is used, and entries with no origin match any request.
|
|
904
|
+
*
|
|
841
905
|
* **Usage**
|
|
842
906
|
*
|
|
843
907
|
* ```js
|
|
@@ -855,7 +919,7 @@ interface PlaywrightTestOptions {
|
|
|
855
919
|
* ```
|
|
856
920
|
*
|
|
857
921
|
*/
|
|
858
|
-
httpCredentials: HTTPCredentials | undefined;
|
|
922
|
+
httpCredentials: HTTPCredentials | HTTPCredentials[] | undefined;
|
|
859
923
|
/**
|
|
860
924
|
* Whether to ignore HTTPS errors when sending network requests. Defaults to `false`.
|
|
861
925
|
*
|
|
@@ -993,6 +1057,26 @@ interface PlaywrightTestOptions {
|
|
|
993
1057
|
*
|
|
994
1058
|
*/
|
|
995
1059
|
proxy: Proxy | undefined;
|
|
1060
|
+
/**
|
|
1061
|
+
* Emulates `'prefers-reduced-motion'` media feature, supported values are `'reduce'`, `'no-preference'`. See
|
|
1062
|
+
* [page.emulateMedia([options])](https://playwright.dev/docs/api/class-page#page-emulate-media) for more details.
|
|
1063
|
+
* Passing `null` resets emulation to system defaults. Defaults to `'no-preference'`.
|
|
1064
|
+
*
|
|
1065
|
+
* **Usage**
|
|
1066
|
+
*
|
|
1067
|
+
* ```js
|
|
1068
|
+
* // playwright.config.ts
|
|
1069
|
+
* import { defineConfig } from '@playwright/test';
|
|
1070
|
+
*
|
|
1071
|
+
* export default defineConfig({
|
|
1072
|
+
* use: {
|
|
1073
|
+
* reducedMotion: 'reduce',
|
|
1074
|
+
* },
|
|
1075
|
+
* });
|
|
1076
|
+
* ```
|
|
1077
|
+
*
|
|
1078
|
+
*/
|
|
1079
|
+
reducedMotion: ReducedMotion;
|
|
996
1080
|
/**
|
|
997
1081
|
* Learn more about [storage state and auth](https://playwright.dev/docs/auth).
|
|
998
1082
|
*
|
|
@@ -1383,7 +1467,7 @@ interface TestConfigWebServer {
|
|
|
1383
1467
|
url?: string;
|
|
1384
1468
|
}
|
|
1385
1469
|
//#endregion
|
|
1386
|
-
//#region ../../node_modules/.pnpm/playwright@1.
|
|
1470
|
+
//#region ../../node_modules/.pnpm/playwright@1.63.0/node_modules/playwright/types/testReporter.d.ts
|
|
1387
1471
|
/**
|
|
1388
1472
|
* Result of the full test run.
|
|
1389
1473
|
*/
|
|
@@ -2061,6 +2145,35 @@ interface TestStep {
|
|
|
2061
2145
|
* Optional location in the source where the step is defined.
|
|
2062
2146
|
*/
|
|
2063
2147
|
location?: Location;
|
|
2148
|
+
/**
|
|
2149
|
+
* Step-dependent parameters, when available. For example, steps produced by the Playwright API calls contain the
|
|
2150
|
+
* target `locator` and the call arguments such as `url`, while
|
|
2151
|
+
* [test.step(title, body[, options])](https://playwright.dev/docs/api/class-test#test-step) steps contain the
|
|
2152
|
+
* parameters passed by the test author.
|
|
2153
|
+
*
|
|
2154
|
+
* ```js
|
|
2155
|
+
* // { locator: 'getByRole(\'button\')' }
|
|
2156
|
+
* await page.getByRole('button').click();
|
|
2157
|
+
*
|
|
2158
|
+
* // { url: 'https://example.com' }
|
|
2159
|
+
* await page.goto('https://example.com');
|
|
2160
|
+
*
|
|
2161
|
+
* // { locator: 'getByLabel(\'Password\')', value: 'secret' }
|
|
2162
|
+
* await page.getByLabel('Password').fill('secret');
|
|
2163
|
+
*
|
|
2164
|
+
* // { orderId: 42 }
|
|
2165
|
+
* await test.step('checkout', async () => {
|
|
2166
|
+
* // ...
|
|
2167
|
+
* }, { params: { orderId: 42 } });
|
|
2168
|
+
* ```
|
|
2169
|
+
*
|
|
2170
|
+
* To keep the reports small, Playwright API calls only report a curated set of arguments per call, and long string
|
|
2171
|
+
* values are truncated. Unbounded arguments such as the page content, evaluated expressions or request bodies are
|
|
2172
|
+
* never reported.
|
|
2173
|
+
*/
|
|
2174
|
+
params?: {
|
|
2175
|
+
[key: string]: any;
|
|
2176
|
+
};
|
|
2064
2177
|
/**
|
|
2065
2178
|
* Parent step, if any.
|
|
2066
2179
|
*/
|
|
@@ -2074,7 +2187,28 @@ interface TestStep {
|
|
|
2074
2187
|
*/
|
|
2075
2188
|
steps: Array<TestStep>;
|
|
2076
2189
|
/**
|
|
2077
|
-
* User-friendly test step title.
|
|
2190
|
+
* User-friendly test step subtitle that complements the title, when available. For Playwright API calls, it is the
|
|
2191
|
+
* target locator or the navigation url. For example, a `Click` step has the clicked locator as a subtitle.
|
|
2192
|
+
* [test.step(title, body[, options])](https://playwright.dev/docs/api/class-test#test-step) steps carry the subtitle
|
|
2193
|
+
* passed by the test author. User interfaces typically render the subtitle next to the title or on a separate line.
|
|
2194
|
+
*
|
|
2195
|
+
* ```js
|
|
2196
|
+
* // title `Click`, subtitle `getByRole('button')`
|
|
2197
|
+
* await page.getByRole('button').click();
|
|
2198
|
+
*
|
|
2199
|
+
* // title `Navigate`, subtitle `example.com/index.html`
|
|
2200
|
+
* await page.goto('https://example.com/index.html');
|
|
2201
|
+
*
|
|
2202
|
+
* // title `Add to cart`, subtitle `SKU 42`
|
|
2203
|
+
* await test.step('Add to cart', async () => {
|
|
2204
|
+
* // ...
|
|
2205
|
+
* }, { subtitle: 'SKU 42' });
|
|
2206
|
+
* ```
|
|
2207
|
+
*
|
|
2208
|
+
*/
|
|
2209
|
+
subtitle?: string;
|
|
2210
|
+
/**
|
|
2211
|
+
* User-friendly test step title, for example `Click` or `Navigate`.
|
|
2078
2212
|
*/
|
|
2079
2213
|
title: string;
|
|
2080
2214
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@argos-ci/playwright",
|
|
3
3
|
"description": "Playwright SDK for visual testing with Argos.",
|
|
4
|
-
"version": "7.
|
|
4
|
+
"version": "7.6.0",
|
|
5
5
|
"author": "Smooth Code",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"repository": {
|
|
@@ -48,13 +48,13 @@
|
|
|
48
48
|
},
|
|
49
49
|
"dependencies": {
|
|
50
50
|
"@argos-ci/browser": "6.4.5",
|
|
51
|
-
"@argos-ci/core": "6.8.
|
|
51
|
+
"@argos-ci/core": "6.8.5",
|
|
52
52
|
"@argos-ci/util": "4.2.0",
|
|
53
53
|
"chalk": "^6.0.0",
|
|
54
54
|
"debug": "^4.4.3"
|
|
55
55
|
},
|
|
56
56
|
"devDependencies": {
|
|
57
|
-
"@playwright/test": "^1.
|
|
57
|
+
"@playwright/test": "^1.63.0",
|
|
58
58
|
"@types/debug": "^4.1.13",
|
|
59
59
|
"@types/node": "catalog:",
|
|
60
60
|
"vitest": "catalog:"
|
|
@@ -69,5 +69,5 @@
|
|
|
69
69
|
"lint": "eslint .",
|
|
70
70
|
"test": "vitest src"
|
|
71
71
|
},
|
|
72
|
-
"gitHead": "
|
|
72
|
+
"gitHead": "18b61fb04ed2502c5018eb42a521ec358bef194e"
|
|
73
73
|
}
|