@argos-ci/playwright 7.0.6 → 7.0.8

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  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
- //#region ../../node_modules/.pnpm/playwright@1.60.0/node_modules/playwright/types/test.d.ts
4
+ //#region ../../node_modules/.pnpm/playwright@1.61.0/node_modules/playwright/types/test.d.ts
5
5
  // --- BEGINGLOBAL ---
6
6
  declare global {
7
7
  export namespace PlaywrightTest {
@@ -1,13 +1,14 @@
1
1
  import { UploadParameters } from "@argos-ci/core";
2
2
  import { BrowserContextOptions, Geolocation, HTTPCredentials, LaunchOptions, PageScreenshotOptions, ViewportSize } from "playwright-core";
3
3
 
4
- //#region ../../node_modules/.pnpm/playwright@1.60.0/node_modules/playwright/types/test.d.ts
4
+ //#region ../../node_modules/.pnpm/playwright@1.61.0/node_modules/playwright/types/test.d.ts
5
5
  type BlobReporterOptions = {
6
6
  outputDir?: string;
7
7
  fileName?: string;
8
8
  };
9
9
  type ListReporterOptions = {
10
10
  printSteps?: boolean;
11
+ printFailuresInline?: boolean;
11
12
  };
12
13
  type JUnitReporterOptions = {
13
14
  outputFile?: string;
@@ -179,10 +180,22 @@ interface FullConfig<TestArgs = {}, WorkerArgs = {}> {
179
180
  * See [testConfig.webServer](https://playwright.dev/docs/api/class-testconfig#test-config-web-server).
180
181
  */
181
182
  webServer: TestConfigWebServer | null;
183
+ /**
184
+ * Snapshot of [`process.argv`](https://nodejs.org/api/process.html#processargv) captured in the runner process.
185
+ * Useful for reading custom command-line arguments — for example, args supplied after the `--` separator (`npx
186
+ * playwright test -- --build-path=./out`). Playwright does not parse these; consumers are responsible for slicing and
187
+ * interpreting them with any argument-parsing library.
188
+ */
189
+ argv: Array<string>;
182
190
  /**
183
191
  * Path to the configuration file used to run the tests. The value is an empty string if no config file was used.
184
192
  */
185
193
  configFile?: string;
194
+ /**
195
+ * See
196
+ * [testConfig.failOnFlakyTests](https://playwright.dev/docs/api/class-testconfig#test-config-fail-on-flaky-tests).
197
+ */
198
+ failOnFlakyTests: boolean;
186
199
  /**
187
200
  * See [testConfig.forbidOnly](https://playwright.dev/docs/api/class-testconfig#test-config-forbid-only).
188
201
  */
@@ -508,15 +521,21 @@ interface PlaywrightWorkerOptions {
508
521
  mode: ScreenshotMode;
509
522
  } & Pick<PageScreenshotOptions, 'fullPage' | 'omitBackground'>;
510
523
  /**
511
- * Whether to record trace for each test. Defaults to `'off'`.
524
+ * Whether to record trace for each test. Defaults to `'off'`. The initial run of a test is the "first run";
525
+ * subsequent runs caused by [retries](https://playwright.dev/docs/test-retries) are "retries".
512
526
  * - `'off'`: Do not record trace.
513
- * - `'on'`: Record trace for each test.
514
- * - `'on-first-retry'`: Record trace only when retrying a test for the first time.
515
- * - `'on-all-retries'`: Record trace only when retrying a test.
516
- * - `'retain-on-failure'`: Record trace for each test. When test run passes, remove the recorded trace.
517
- * - `'retain-on-first-failure'`: Record trace for the first run of each test, but not for retries. When test run
518
- * passes, remove the recorded trace.
519
- * - `'retain-on-failure-and-retries'`: Record trace for each test run. Retains all traces when an attempt fails.
527
+ * - `'on'`: Record and keep a trace for every run.
528
+ * - `'on-first-retry'`: Record and keep a trace only for the first retry of a test.
529
+ * - `'on-all-retries'`: Record and keep a trace for every retry.
530
+ * - `'retain-on-failure'`: Record a trace for every run, but keep it only for runs that failed. A failed run's
531
+ * trace is kept even when a later retry passes.
532
+ * - `'retain-on-first-failure'`: Record a trace only for the first run of a test (not for retries), and keep it
533
+ * only if that run failed.
534
+ * - `'retain-on-failure-and-retries'`: Record a trace for every run, and keep it for any run that failed or that is
535
+ * a retry.
536
+ *
537
+ * See [trace modes](https://playwright.dev/docs/test-use-options#trace-modes) for a side-by-side comparison of what each mode records and
538
+ * keeps.
520
539
  *
521
540
  * For more control, pass an object that specifies `mode` and trace features to enable.
522
541
  *
@@ -543,11 +562,21 @@ interface PlaywrightWorkerOptions {
543
562
  attachments?: boolean;
544
563
  };
545
564
  /**
546
- * Whether to record video for each test. Defaults to `'off'`.
565
+ * Whether to record video for each test. Defaults to `'off'`. The initial run of a test is the "first run";
566
+ * subsequent runs caused by [retries](https://playwright.dev/docs/test-retries) are "retries".
547
567
  * - `'off'`: Do not record video.
548
- * - `'on'`: Record video for each test.
549
- * - `'retain-on-failure'`: Record video for each test, but remove all videos from successful test runs.
550
- * - `'on-first-retry'`: Record video only when retrying a test for the first time.
568
+ * - `'on'`: Record and keep a video for every run.
569
+ * - `'on-first-retry'`: Record and keep a video only for the first retry of a test.
570
+ * - `'on-all-retries'`: Record and keep a video for every retry.
571
+ * - `'retain-on-failure'`: Record a video for every run, but keep it only for runs that failed. A failed run's
572
+ * video is kept even when a later retry passes.
573
+ * - `'retain-on-first-failure'`: Record a video only for the first run of a test (not for retries), and keep it
574
+ * only if that run failed.
575
+ * - `'retain-on-failure-and-retries'`: Record a video for every run, and keep it for any run that failed or that is
576
+ * a retry.
577
+ *
578
+ * See [video modes](https://playwright.dev/docs/test-use-options#video-modes) for a side-by-side comparison of what each mode records and
579
+ * keeps.
551
580
  *
552
581
  * To control video size, pass an object with `mode` and `size` properties. If video size is not specified, it will be
553
582
  * equal to [testOptions.viewport](https://playwright.dev/docs/api/class-testoptions#test-options-viewport) scaled
@@ -592,7 +621,7 @@ interface PlaywrightWorkerOptions {
592
621
  }
593
622
  type ScreenshotMode = 'off' | 'on' | 'only-on-failure' | 'on-first-failure';
594
623
  type TraceMode = 'off' | 'on' | 'retain-on-failure' | 'on-first-retry' | 'on-all-retries' | 'retain-on-first-failure' | 'retain-on-failure-and-retries';
595
- type VideoMode = 'off' | 'on' | 'retain-on-failure' | 'on-first-retry';
624
+ type VideoMode = 'off' | 'on' | 'retain-on-failure' | 'on-first-retry' | 'on-all-retries' | 'retain-on-first-failure' | 'retain-on-failure-and-retries';
596
625
  /**
597
626
  * Playwright Test provides many options to configure test environment,
598
627
  * [Browser](https://playwright.dev/docs/api/class-browser),
@@ -1181,7 +1210,7 @@ interface PlaywrightTestOptions {
1181
1210
  /**
1182
1211
  * Custom attribute to be used in
1183
1212
  * [page.getByTestId(testId)](https://playwright.dev/docs/api/class-page#page-get-by-test-id). `data-testid` is used
1184
- * by default.
1213
+ * by default. To match elements with any of several attributes, pass them as a comma-separated list.
1185
1214
  *
1186
1215
  * **Usage**
1187
1216
  *
@@ -1196,6 +1225,19 @@ interface PlaywrightTestOptions {
1196
1225
  * });
1197
1226
  * ```
1198
1227
  *
1228
+ * Multiple attributes:
1229
+ *
1230
+ * ```js
1231
+ * // playwright.config.ts
1232
+ * import { defineConfig } from '@playwright/test';
1233
+ *
1234
+ * export default defineConfig({
1235
+ * use: {
1236
+ * testIdAttribute: 'data-pw,data-ti',
1237
+ * },
1238
+ * });
1239
+ * ```
1240
+ *
1199
1241
  */
1200
1242
  testIdAttribute: string;
1201
1243
  }
@@ -1342,7 +1384,7 @@ interface TestConfigWebServer {
1342
1384
  url?: string;
1343
1385
  }
1344
1386
  //#endregion
1345
- //#region ../../node_modules/.pnpm/playwright@1.60.0/node_modules/playwright/types/testReporter.d.ts
1387
+ //#region ../../node_modules/.pnpm/playwright@1.61.0/node_modules/playwright/types/testReporter.d.ts
1346
1388
  /**
1347
1389
  * Result of the full test run.
1348
1390
  */
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.0.6",
4
+ "version": "7.0.8",
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.1.0",
51
- "@argos-ci/core": "6.1.1",
51
+ "@argos-ci/core": "6.2.1",
52
52
  "@argos-ci/util": "4.0.0",
53
53
  "chalk": "^5.6.2",
54
54
  "debug": "^4.4.3"
55
55
  },
56
56
  "devDependencies": {
57
- "@playwright/test": "^1.60.0",
57
+ "@playwright/test": "^1.61.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": "ee8cfb3ab17cb541f8c3456a271d32c3411077c6"
72
+ "gitHead": "b9d109dc1fa7d98c4fc2cafac2e310fc22b63c43"
73
73
  }