@playwright/test 1.34.0-beta-1684420091000 → 1.34.0-beta-1684435798000
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/index.js +7 -1
- package/lib/worker/testInfo.js +1 -1
- package/package.json +2 -2
- package/types/test.d.ts +1 -1
package/lib/index.js
CHANGED
|
@@ -736,7 +736,8 @@ class ArtifactsRecorder {
|
|
|
736
736
|
const defaultTraceOptions = {
|
|
737
737
|
screenshots: true,
|
|
738
738
|
snapshots: true,
|
|
739
|
-
sources: true
|
|
739
|
+
sources: true,
|
|
740
|
+
attachments: true
|
|
740
741
|
};
|
|
741
742
|
this._traceOptions = typeof trace === 'string' ? defaultTraceOptions : {
|
|
742
743
|
...defaultTraceOptions,
|
|
@@ -820,6 +821,11 @@ class ArtifactsRecorder {
|
|
|
820
821
|
if (this._preserveTrace()) {
|
|
821
822
|
const events = this._testInfo._traceEvents;
|
|
822
823
|
if (events.length) {
|
|
824
|
+
if (!this._traceOptions.attachments) {
|
|
825
|
+
for (const event of events) {
|
|
826
|
+
if (event.type === 'after') delete event.attachments;
|
|
827
|
+
}
|
|
828
|
+
}
|
|
823
829
|
const tracePath = path.join(this._artifactsDir, (0, _utils.createGuid)() + '.zip');
|
|
824
830
|
this._temporaryTraceFiles.push(tracePath);
|
|
825
831
|
await (0, _utils.saveTraceFile)(tracePath, events, this._traceOptions.sources);
|
package/lib/worker/testInfo.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@playwright/test",
|
|
3
|
-
"version": "1.34.0-beta-
|
|
3
|
+
"version": "1.34.0-beta-1684435798000",
|
|
4
4
|
"description": "A high-level API to automate web browsers",
|
|
5
5
|
"repository": "github:Microsoft/playwright",
|
|
6
6
|
"homepage": "https://playwright.dev",
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"license": "Apache-2.0",
|
|
38
38
|
"dependencies": {
|
|
39
39
|
"@types/node": "*",
|
|
40
|
-
"playwright-core": "1.34.0-beta-
|
|
40
|
+
"playwright-core": "1.34.0-beta-1684435798000"
|
|
41
41
|
},
|
|
42
42
|
"optionalDependencies": {
|
|
43
43
|
"fsevents": "2.3.2"
|
package/types/test.d.ts
CHANGED
|
@@ -3554,7 +3554,7 @@ export interface PlaywrightWorkerOptions {
|
|
|
3554
3554
|
*
|
|
3555
3555
|
* Learn more about [recording trace](https://playwright.dev/docs/test-configuration#record-test-trace).
|
|
3556
3556
|
*/
|
|
3557
|
-
trace: TraceMode | /** deprecated */ 'retry-with-trace' | { mode: TraceMode, snapshots?: boolean, screenshots?: boolean, sources?: boolean };
|
|
3557
|
+
trace: TraceMode | /** deprecated */ 'retry-with-trace' | { mode: TraceMode, snapshots?: boolean, screenshots?: boolean, sources?: boolean, attachments?: boolean };
|
|
3558
3558
|
/**
|
|
3559
3559
|
* Whether to record video for each test. Defaults to `'off'`.
|
|
3560
3560
|
* - `'off'`: Do not record video.
|