@smoothdeploy/playwright 1.60.1 → 1.61.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.
@@ -1,19 +1,15 @@
1
1
  # packages/playwright/lib/worker/workerProcessEntry.js
2
- # total: 123.4 KB
2
+ # total: 74.1 KB
3
3
 
4
- ## Inlined (12)
5
- 4.7 KB packages/playwright/src/util.ts
4
+ ## Inlined (8)
5
+ 4.4 KB packages/playwright/src/util.ts
6
6
  8.6 KB packages/playwright/src/worker/fixtureRunner.ts
7
- 20.8 KB packages/playwright/src/worker/testInfo.ts
7
+ 21.0 KB packages/playwright/src/worker/testInfo.ts
8
8
  11.6 KB packages/playwright/src/worker/testTracing.ts
9
9
  5.4 KB packages/playwright/src/worker/timeoutManager.ts
10
10
  0.3 KB packages/playwright/src/worker/util.ts
11
11
  21.0 KB packages/playwright/src/worker/workerMain.ts
12
12
  0.1 KB packages/playwright/src/worker/workerProcessEntry.ts
13
- 6.0 KB packages/utils/third_party/yauzl/buffer-crc32.js
14
- 9.3 KB packages/utils/third_party/yauzl/fd-slicer.js
15
- 32.2 KB packages/utils/third_party/yauzl/index.js
16
- 1.4 KB packages/utils/third_party/yauzl/pend.js
17
13
 
18
14
  ## External (6)
19
15
  ../common
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@smoothdeploy/playwright",
3
- "version": "1.60.1",
3
+ "version": "1.61.0",
4
4
  "description": "A high-level API to automate web browsers",
5
5
  "repository": {
6
6
  "type": "git",
@@ -53,7 +53,7 @@
53
53
  },
54
54
  "license": "Apache-2.0",
55
55
  "dependencies": {
56
- "playwright-core": "npm:@smoothdeploy/playwright-core@1.60.1"
56
+ "playwright-core": "npm:@smoothdeploy/playwright-core@1.61.0"
57
57
  },
58
58
  "optionalDependencies": {
59
59
  "fsevents": "2.3.2"
package/types/test.d.ts CHANGED
@@ -19,7 +19,7 @@ import type { APIRequestContext, Browser, BrowserContext, BrowserContextOptions,
19
19
  export * from 'playwright-core';
20
20
 
21
21
  export type BlobReporterOptions = { outputDir?: string, fileName?: string };
22
- export type ListReporterOptions = { printSteps?: boolean };
22
+ export type ListReporterOptions = { printSteps?: boolean, printFailuresInline?: boolean };
23
23
  export type JUnitReporterOptions = { outputFile?: string, stripANSIControlSequences?: boolean, includeProjectInTestName?: boolean, includeRetries?: boolean };
24
24
  export type JsonReporterOptions = { outputFile?: string };
25
25
  export type HtmlReporterOptions = {
@@ -237,6 +237,13 @@ interface TestProject<TestArgs = {}, WorkerArgs = {}> {
237
237
  * for details.
238
238
  */
239
239
  pathTemplate?: string;
240
+
241
+ /**
242
+ * Default timeout for
243
+ * [expect(page).toHaveScreenshot(name[, options])](https://playwright.dev/docs/api/class-pageassertions#page-assertions-to-have-screenshot-1)
244
+ * in milliseconds, defaults to the global expect timeout. Setting to `0` disables the timeout.
245
+ */
246
+ timeout?: number;
240
247
  };
241
248
 
242
249
  /**
@@ -2011,11 +2018,25 @@ export interface FullConfig<TestArgs = {}, WorkerArgs = {}> {
2011
2018
  * See [testConfig.webServer](https://playwright.dev/docs/api/class-testconfig#test-config-web-server).
2012
2019
  */
2013
2020
  webServer: TestConfigWebServer | null;
2021
+ /**
2022
+ * Snapshot of [`process.argv`](https://nodejs.org/api/process.html#processargv) captured in the runner process.
2023
+ * Useful for reading custom command-line arguments — for example, args supplied after the `--` separator (`npx
2024
+ * playwright test -- --build-path=./out`). Playwright does not parse these; consumers are responsible for slicing and
2025
+ * interpreting them with any argument-parsing library.
2026
+ */
2027
+ argv: Array<string>;
2028
+
2014
2029
  /**
2015
2030
  * Path to the configuration file used to run the tests. The value is an empty string if no config file was used.
2016
2031
  */
2017
2032
  configFile?: string;
2018
2033
 
2034
+ /**
2035
+ * See
2036
+ * [testConfig.failOnFlakyTests](https://playwright.dev/docs/api/class-testconfig#test-config-fail-on-flaky-tests).
2037
+ */
2038
+ failOnFlakyTests: boolean;
2039
+
2019
2040
  /**
2020
2041
  * See [testConfig.forbidOnly](https://playwright.dev/docs/api/class-testconfig#test-config-forbid-only).
2021
2042
  */
@@ -2674,7 +2695,7 @@ export type TestDetails = {
2674
2695
  annotation?: TestDetailsAnnotation | TestDetailsAnnotation[];
2675
2696
  }
2676
2697
 
2677
- type TestBody<TestArgs> = (args: TestArgs, testInfo: TestInfo) => Promise<void> | void;
2698
+ type TestBody<TestArgs> = (args: TestArgs, testInfo: TestInfo) => Promise<unknown> | unknown;
2678
2699
  type ConditionBody<TestArgs> = (args: TestArgs) => boolean;
2679
2700
 
2680
2701
  /**
@@ -6944,15 +6965,21 @@ export interface PlaywrightWorkerOptions {
6944
6965
  resultScreenshots: boolean;
6945
6966
  pauseOnFailure: boolean;
6946
6967
  /**
6947
- * Whether to record trace for each test. Defaults to `'off'`.
6968
+ * Whether to record trace for each test. Defaults to `'off'`. The initial run of a test is the "first run";
6969
+ * subsequent runs caused by [retries](https://playwright.dev/docs/test-retries) are "retries".
6948
6970
  * - `'off'`: Do not record trace.
6949
- * - `'on'`: Record trace for each test.
6950
- * - `'on-first-retry'`: Record trace only when retrying a test for the first time.
6951
- * - `'on-all-retries'`: Record trace only when retrying a test.
6952
- * - `'retain-on-failure'`: Record trace for each test. When test run passes, remove the recorded trace.
6953
- * - `'retain-on-first-failure'`: Record trace for the first run of each test, but not for retries. When test run
6954
- * passes, remove the recorded trace.
6955
- * - `'retain-on-failure-and-retries'`: Record trace for each test run. Retains all traces when an attempt fails.
6971
+ * - `'on'`: Record and keep a trace for every run.
6972
+ * - `'on-first-retry'`: Record and keep a trace only for the first retry of a test.
6973
+ * - `'on-all-retries'`: Record and keep a trace for every retry.
6974
+ * - `'retain-on-failure'`: Record a trace for every run, but keep it only for runs that failed. A failed run's
6975
+ * trace is kept even when a later retry passes.
6976
+ * - `'retain-on-first-failure'`: Record a trace only for the first run of a test (not for retries), and keep it
6977
+ * only if that run failed.
6978
+ * - `'retain-on-failure-and-retries'`: Record a trace for every run, and keep it for any run that failed or that is
6979
+ * a retry.
6980
+ *
6981
+ * See [trace modes](https://playwright.dev/docs/test-use-options#trace-modes) for a side-by-side comparison of what each mode records and
6982
+ * keeps.
6956
6983
  *
6957
6984
  * For more control, pass an object that specifies `mode` and trace features to enable.
6958
6985
  *
@@ -6973,11 +7000,21 @@ export interface PlaywrightWorkerOptions {
6973
7000
  */
6974
7001
  trace: TraceMode | /** deprecated */ 'retry-with-trace' | { mode: TraceMode, snapshots?: boolean, screenshots?: boolean, sources?: boolean, attachments?: boolean };
6975
7002
  /**
6976
- * Whether to record video for each test. Defaults to `'off'`.
7003
+ * Whether to record video for each test. Defaults to `'off'`. The initial run of a test is the "first run";
7004
+ * subsequent runs caused by [retries](https://playwright.dev/docs/test-retries) are "retries".
6977
7005
  * - `'off'`: Do not record video.
6978
- * - `'on'`: Record video for each test.
6979
- * - `'retain-on-failure'`: Record video for each test, but remove all videos from successful test runs.
6980
- * - `'on-first-retry'`: Record video only when retrying a test for the first time.
7006
+ * - `'on'`: Record and keep a video for every run.
7007
+ * - `'on-first-retry'`: Record and keep a video only for the first retry of a test.
7008
+ * - `'on-all-retries'`: Record and keep a video for every retry.
7009
+ * - `'retain-on-failure'`: Record a video for every run, but keep it only for runs that failed. A failed run's
7010
+ * video is kept even when a later retry passes.
7011
+ * - `'retain-on-first-failure'`: Record a video only for the first run of a test (not for retries), and keep it
7012
+ * only if that run failed.
7013
+ * - `'retain-on-failure-and-retries'`: Record a video for every run, and keep it for any run that failed or that is
7014
+ * a retry.
7015
+ *
7016
+ * See [video modes](https://playwright.dev/docs/test-use-options#video-modes) for a side-by-side comparison of what each mode records and
7017
+ * keeps.
6981
7018
  *
6982
7019
  * To control video size, pass an object with `mode` and `size` properties. If video size is not specified, it will be
6983
7020
  * equal to [testOptions.viewport](https://playwright.dev/docs/api/class-testoptions#test-options-viewport) scaled
@@ -7008,7 +7045,7 @@ export interface PlaywrightWorkerOptions {
7008
7045
 
7009
7046
  export type ScreenshotMode = 'off' | 'on' | 'only-on-failure' | 'on-first-failure';
7010
7047
  export type TraceMode = 'off' | 'on' | 'retain-on-failure' | 'on-first-retry' | 'on-all-retries' | 'retain-on-first-failure' | 'retain-on-failure-and-retries';
7011
- export type VideoMode = 'off' | 'on' | 'retain-on-failure' | 'on-first-retry';
7048
+ export type VideoMode = 'off' | 'on' | 'retain-on-failure' | 'on-first-retry' | 'on-all-retries' | 'retain-on-first-failure' | 'retain-on-failure-and-retries';
7012
7049
  /**
7013
7050
  * Playwright Test provides many options to configure test environment,
7014
7051
  * [Browser](https://playwright.dev/docs/api/class-browser),
@@ -7597,7 +7634,7 @@ export interface PlaywrightTestOptions {
7597
7634
  /**
7598
7635
  * Custom attribute to be used in
7599
7636
  * [page.getByTestId(testId)](https://playwright.dev/docs/api/class-page#page-get-by-test-id). `data-testid` is used
7600
- * by default.
7637
+ * by default. To match elements with any of several attributes, pass them as a comma-separated list.
7601
7638
  *
7602
7639
  * **Usage**
7603
7640
  *
@@ -7612,6 +7649,19 @@ export interface PlaywrightTestOptions {
7612
7649
  * });
7613
7650
  * ```
7614
7651
  *
7652
+ * Multiple attributes:
7653
+ *
7654
+ * ```js
7655
+ * // playwright.config.ts
7656
+ * import { defineConfig } from '@playwright/test';
7657
+ *
7658
+ * export default defineConfig({
7659
+ * use: {
7660
+ * testIdAttribute: 'data-pw,data-ti',
7661
+ * },
7662
+ * });
7663
+ * ```
7664
+ *
7615
7665
  */
7616
7666
  testIdAttribute: string;
7617
7667
  }
@@ -8558,7 +8608,7 @@ type PollMatchers<R, T, ExtendedMatchers> = {
8558
8608
 
8559
8609
  export type Expect<ExtendedMatchers = {}> = {
8560
8610
  <T = unknown>(actual: T, messageOrOptions?: string | { message?: string }): MakeMatchers<void, T, ExtendedMatchers>;
8561
- soft: <T = unknown>(actual: T, messageOrOptions?: string | { message?: string }) => MakeMatchers<void, T, ExtendedMatchers>;
8611
+ soft: Expect<ExtendedMatchers>;
8562
8612
  poll: <T = unknown>(actual: () => T | Promise<T>, messageOrOptions?: string | { message?: string, timeout?: number, intervals?: number[] }) => PollMatchers<Promise<void>, T, ExtendedMatchers>;
8563
8613
  extend<MoreMatchers extends Record<string, (this: ExpectMatcherState, receiver: any, ...args: any[]) => MatcherReturnType | Promise<MatcherReturnType>>>(matchers: MoreMatchers): Expect<ExtendedMatchers & MoreMatchers>;
8564
8614
  configure: (configuration: {