playwright 1.54.0-alpha-2025-07-03 → 1.54.0-alpha-2025-07-04

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.

Potentially problematic release.


This version of playwright might be problematic. Click here for more details.

@@ -107,7 +107,7 @@ class HtmlReporter {
107
107
  async onEnd(result) {
108
108
  const projectSuites = this.suite.suites;
109
109
  await (0, import_utils.removeFolders)([this._outputFolder]);
110
- const builder = new HtmlBuilder(this.config, this._outputFolder, this._attachmentsBaseURL, process.env.PLAYWRIGHT_HTML_TITLE || this._options.title);
110
+ const builder = new HtmlBuilder(this.config, this._outputFolder, this._attachmentsBaseURL, process.env.PLAYWRIGHT_HTML_TITLE || this._options.title, this._options.snippets);
111
111
  this._buildResult = await builder.build(this.config.metadata, projectSuites, result, this._topLevelErrors);
112
112
  }
113
113
  async onExit() {
@@ -191,11 +191,12 @@ function startHtmlReportServer(folder) {
191
191
  return server;
192
192
  }
193
193
  class HtmlBuilder {
194
- constructor(config, outputDir, attachmentsBaseURL, title) {
194
+ constructor(config, outputDir, attachmentsBaseURL, title, snippets = true) {
195
195
  this._stepsInFile = new import_utils.MultiMap();
196
196
  this._hasTraces = false;
197
197
  this._config = config;
198
198
  this._reportFolder = outputDir;
199
+ this._snippets = snippets;
199
200
  import_fs.default.mkdirSync(this._reportFolder, { recursive: true });
200
201
  this._dataZipFile = new import_zipBundle.yazl.ZipFile();
201
202
  this._attachmentsBaseURL = attachmentsBaseURL;
@@ -224,7 +225,8 @@ class HtmlBuilder {
224
225
  }
225
226
  }
226
227
  }
227
- createSnippets(this._stepsInFile);
228
+ if (this._snippets)
229
+ createSnippets(this._stepsInFile);
228
230
  let ok = true;
229
231
  for (const [fileId, { testFile, testFileSummary }] of data) {
230
232
  const stats = testFileSummary.stats;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "playwright",
3
- "version": "1.54.0-alpha-2025-07-03",
3
+ "version": "1.54.0-alpha-2025-07-04",
4
4
  "description": "A high-level API to automate web browsers",
5
5
  "repository": {
6
6
  "type": "git",
@@ -56,7 +56,7 @@
56
56
  },
57
57
  "license": "Apache-2.0",
58
58
  "dependencies": {
59
- "playwright-core": "1.54.0-alpha-2025-07-03"
59
+ "playwright-core": "1.54.0-alpha-2025-07-04"
60
60
  },
61
61
  "optionalDependencies": {
62
62
  "fsevents": "2.3.2"
package/types/test.d.ts CHANGED
@@ -22,7 +22,7 @@ export type BlobReporterOptions = { outputDir?: string, fileName?: string };
22
22
  export type ListReporterOptions = { printSteps?: boolean };
23
23
  export type JUnitReporterOptions = { outputFile?: string, stripANSIControlSequences?: boolean, includeProjectInTestName?: boolean };
24
24
  export type JsonReporterOptions = { outputFile?: string };
25
- export type HtmlReporterOptions = { outputFolder?: string, open?: 'always' | 'never' | 'on-failure', host?: string, port?: number, attachmentsBaseURL?: string, title?: string };
25
+ export type HtmlReporterOptions = { outputFolder?: string, open?: 'always' | 'never' | 'on-failure', host?: string, port?: number, attachmentsBaseURL?: string, title?: string, snippets?: boolean };
26
26
 
27
27
  export type ReporterDescription = Readonly<
28
28
  ['blob'] | ['blob', BlobReporterOptions] |