@argos-ci/playwright 7.0.1 → 7.0.2

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.59.1/node_modules/playwright/types/test.d.ts
4
+ //#region ../../node_modules/.pnpm/playwright@1.60.0/node_modules/playwright/types/test.d.ts
5
5
  // --- BEGINGLOBAL ---
6
6
  declare global {
7
7
  export namespace PlaywrightTest {
@@ -1,7 +1,7 @@
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.59.1/node_modules/playwright/types/test.d.ts
4
+ //#region ../../node_modules/.pnpm/playwright@1.60.0/node_modules/playwright/types/test.d.ts
5
5
  type BlobReporterOptions = {
6
6
  outputDir?: string;
7
7
  fileName?: string;
@@ -1226,6 +1226,38 @@ interface Location {
1226
1226
  */
1227
1227
  line: number;
1228
1228
  }
1229
+ /**
1230
+ * `WorkerInfo` contains information about the worker that is running tests and is available to worker-scoped
1231
+ * fixtures. `WorkerInfo` is a subset of [TestInfo](https://playwright.dev/docs/api/class-testinfo) that is available
1232
+ * in many other places.
1233
+ */
1234
+ interface WorkerInfo {
1235
+ /**
1236
+ * Processed configuration from the [configuration file](https://playwright.dev/docs/test-configuration).
1237
+ */
1238
+ config: FullConfig;
1239
+ /**
1240
+ * The index of the worker between `0` and `workers - 1`. It is guaranteed that workers running at the same time have
1241
+ * a different `parallelIndex`. When a worker is restarted, for example after a failure, the new worker process has
1242
+ * the same `parallelIndex`.
1243
+ *
1244
+ * Also available as `process.env.TEST_PARALLEL_INDEX`. Learn more about
1245
+ * [parallelism and sharding](https://playwright.dev/docs/test-parallel) with Playwright Test.
1246
+ */
1247
+ parallelIndex: number;
1248
+ /**
1249
+ * Processed project configuration from the [configuration file](https://playwright.dev/docs/test-configuration).
1250
+ */
1251
+ project: FullProject;
1252
+ /**
1253
+ * The unique index of the worker process that is running the test. When a worker is restarted, for example after a
1254
+ * failure, the new worker process gets a new unique `workerIndex`.
1255
+ *
1256
+ * Also available as `process.env.TEST_WORKER_INDEX`. Learn more about [parallelism and sharding](https://playwright.dev/docs/test-parallel)
1257
+ * with Playwright Test.
1258
+ */
1259
+ workerIndex: number;
1260
+ }
1229
1261
  interface TestConfigWebServer {
1230
1262
  /**
1231
1263
  * Shell command to start. For example `npm run start`..
@@ -1310,7 +1342,7 @@ interface TestConfigWebServer {
1310
1342
  url?: string;
1311
1343
  }
1312
1344
  //#endregion
1313
- //#region ../../node_modules/.pnpm/playwright@1.59.1/node_modules/playwright/types/testReporter.d.ts
1345
+ //#region ../../node_modules/.pnpm/playwright@1.60.0/node_modules/playwright/types/testReporter.d.ts
1314
1346
  /**
1315
1347
  * Result of the full test run.
1316
1348
  */
@@ -1409,8 +1441,8 @@ interface FullResult {
1409
1441
  * [reporter.onStdOut(chunk, test, result)](https://playwright.dev/docs/api/class-reporter#reporter-on-std-out) and
1410
1442
  * [reporter.onStdErr(chunk, test, result)](https://playwright.dev/docs/api/class-reporter#reporter-on-std-err) are
1411
1443
  * called when standard output is produced in the worker process, possibly during a test execution, and
1412
- * [reporter.onError(error)](https://playwright.dev/docs/api/class-reporter#reporter-on-error) is called when
1413
- * something went wrong outside of the test execution.
1444
+ * [reporter.onError(error[, workerInfo])](https://playwright.dev/docs/api/class-reporter#reporter-on-error) is called
1445
+ * when something went wrong outside of the test execution.
1414
1446
  *
1415
1447
  * If your custom reporter does not print anything to the terminal, implement
1416
1448
  * [reporter.printsToStdio()](https://playwright.dev/docs/api/class-reporter#reporter-prints-to-stdio) and return
@@ -1460,8 +1492,10 @@ interface Reporter {
1460
1492
  /**
1461
1493
  * Called on some global error, for example unhandled exception in the worker process.
1462
1494
  * @param error The error.
1495
+ * @param workerInfo Contains information about the worker that produced this error. `undefined` for errors that are not associated with
1496
+ * a specific worker.
1463
1497
  */
1464
- onError?(error: TestError): void;
1498
+ onError?(error: TestError, workerInfo?: WorkerInfo): void;
1465
1499
  /**
1466
1500
  * Called immediately before test runner exists. At this point all the reporters have received the
1467
1501
  * [reporter.onEnd(result)](https://playwright.dev/docs/api/class-reporter#reporter-on-end) signal, so all the reports
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.1",
4
+ "version": "7.0.2",
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.0.0",
51
- "@argos-ci/core": "6.0.1",
51
+ "@argos-ci/core": "6.0.2",
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.59.1",
57
+ "@playwright/test": "^1.60.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": "75892460d881beaf87ae6a6c62c2c82d5df8fba4"
72
+ "gitHead": "9c0f1aa0c2ca4bd1255f95f2dc1a9ad7c4cf36e9"
73
73
  }