playwright 1.62.0 → 1.63.0-alpha-2026-07-25

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.
@@ -2092,6 +2092,8 @@ function bindFileSuiteToProject(project, suite) {
2092
2092
  for (let parentSuite = suite2; parentSuite; parentSuite = parentSuite.parent) {
2093
2093
  if (parentSuite._staticAnnotations.length)
2094
2094
  test.annotations.unshift(...parentSuite._staticAnnotations);
2095
+ if (parentSuite._locks.length)
2096
+ test._locks.push(...parentSuite._locks);
2095
2097
  if (inheritedRetries === void 0 && parentSuite._retries !== void 0)
2096
2098
  inheritedRetries = parentSuite._retries;
2097
2099
  if (inheritedTimeout === void 0 && parentSuite._timeout !== void 0)
@@ -2196,6 +2198,12 @@ var testDetailsSchema = {
2196
2198
  testAnnotationSchema,
2197
2199
  { type: "array", items: testAnnotationSchema }
2198
2200
  ]
2201
+ },
2202
+ lock: {
2203
+ oneOf: [
2204
+ { type: "string" },
2205
+ { type: "array", items: { type: "string" } }
2206
+ ]
2199
2207
  }
2200
2208
  }
2201
2209
  };
@@ -2208,9 +2216,12 @@ function validateTestDetails(details, location) {
2208
2216
  const tags = tag === void 0 ? [] : typeof tag === "string" ? [tag] : tag;
2209
2217
  const annotation = obj.annotation;
2210
2218
  const annotations = annotation === void 0 ? [] : Array.isArray(annotation) ? annotation : [annotation];
2219
+ const lock = obj.lock;
2220
+ const locks = lock === void 0 ? [] : typeof lock === "string" ? [lock] : lock;
2211
2221
  return {
2212
2222
  annotations: annotations.map((a) => ({ ...a, location })),
2213
2223
  tags,
2224
+ locks,
2214
2225
  location
2215
2226
  };
2216
2227
  }
@@ -2294,6 +2305,7 @@ var TestTypeImpl = class _TestTypeImpl {
2294
2305
  test._requireFile = suite._requireFile;
2295
2306
  test.annotations.push(...validatedDetails.annotations);
2296
2307
  test._tags.push(...validatedDetails.tags);
2308
+ test._locks.push(...validatedDetails.locks);
2297
2309
  suite._addTest(test);
2298
2310
  if (type === "only" || type === "fail.only")
2299
2311
  test._only = true;
@@ -2329,6 +2341,7 @@ var TestTypeImpl = class _TestTypeImpl {
2329
2341
  child.location = location;
2330
2342
  child._staticAnnotations.push(...validatedDetails.annotations);
2331
2343
  child._tags.push(...validatedDetails.tags);
2344
+ child._locks.push(...validatedDetails.locks);
2332
2345
  suite._addSuite(child);
2333
2346
  if (type === "only" || type === "serial.only" || type === "parallel.only")
2334
2347
  child._only = true;
@@ -2576,6 +2589,7 @@ var Suite = class _Suite extends Base {
2576
2589
  this._staticAnnotations = [];
2577
2590
  // Explicitly declared tags that are not a part of the title.
2578
2591
  this._tags = [];
2592
+ this._locks = [];
2579
2593
  this._modifiers = [];
2580
2594
  this._parallelMode = "none";
2581
2595
  this._type = type;
@@ -2718,6 +2732,7 @@ var Suite = class _Suite extends Base {
2718
2732
  retries: this._retries,
2719
2733
  staticAnnotations: this._staticAnnotations.slice(),
2720
2734
  tags: this._tags.slice(),
2735
+ locks: this._locks.slice(),
2721
2736
  modifiers: this._modifiers.slice(),
2722
2737
  parallelMode: this._parallelMode,
2723
2738
  hooks: this._hooks.map((h) => ({ type: h.type, location: h.location, title: h.title })),
@@ -2733,6 +2748,7 @@ var Suite = class _Suite extends Base {
2733
2748
  suite._retries = data.retries;
2734
2749
  suite._staticAnnotations = data.staticAnnotations;
2735
2750
  suite._tags = data.tags;
2751
+ suite._locks = data.locks;
2736
2752
  suite._modifiers = data.modifiers;
2737
2753
  suite._parallelMode = data.parallelMode;
2738
2754
  suite._hooks = data.hooks.map((h) => ({ type: h.type, location: h.location, title: h.title, fn: () => {
@@ -2768,6 +2784,7 @@ var TestCase = class _TestCase extends Base {
2768
2784
  this._projectId = "";
2769
2785
  // Explicitly declared tags that are not a part of the title.
2770
2786
  this._tags = [];
2787
+ this._locks = [];
2771
2788
  this._planAnnotations = [];
2772
2789
  this.fn = fn;
2773
2790
  this._testType = testType;
@@ -2818,6 +2835,7 @@ var TestCase = class _TestCase extends Base {
2818
2835
  workerHash: this._workerHash,
2819
2836
  annotations: this.annotations.slice(),
2820
2837
  tags: this._tags.slice(),
2838
+ locks: this._locks.slice(),
2821
2839
  projectId: this._projectId
2822
2840
  };
2823
2841
  }
@@ -2834,6 +2852,7 @@ var TestCase = class _TestCase extends Base {
2834
2852
  test._workerHash = data.workerHash;
2835
2853
  test.annotations = data.annotations;
2836
2854
  test._tags = data.tags;
2855
+ test._locks = data.locks;
2837
2856
  test._projectId = data.projectId;
2838
2857
  return test;
2839
2858
  }
@@ -1,5 +1,5 @@
1
1
  # packages/playwright/lib/common/index.js
2
- # total: 114.4 KB
2
+ # total: 115.0 KB
3
3
 
4
4
  ## Inlined (20)
5
5
  12.0 KB packages/playwright/src/common/config.ts
@@ -10,10 +10,10 @@
10
10
  2.1 KB packages/playwright/src/common/poolBuilder.ts
11
11
  3.9 KB packages/playwright/src/common/process.ts
12
12
  4.7 KB packages/playwright/src/common/suiteUtils.ts
13
- 8.5 KB packages/playwright/src/common/test.ts
13
+ 8.7 KB packages/playwright/src/common/test.ts
14
14
  2.0 KB packages/playwright/src/common/testLoader.ts
15
- 12.6 KB packages/playwright/src/common/testType.ts
16
- 1.2 KB packages/playwright/src/common/validators.ts
15
+ 12.7 KB packages/playwright/src/common/testType.ts
16
+ 1.4 KB packages/playwright/src/common/validators.ts
17
17
  1.3 KB packages/playwright/src/isomorphic/teleReceiver.ts
18
18
  9.7 KB packages/playwright/src/transform/compilationCache.ts
19
19
  1.7 KB packages/playwright/src/transform/esmLoaderSync.ts
@@ -13313,6 +13313,7 @@ function callMatcherAsStep(matcherName, info, actual, matcher, args, promise) {
13313
13313
  apiName,
13314
13314
  title: longTitle,
13315
13315
  shortTitle,
13316
+ location: stackFrames[0],
13316
13317
  params: args[0] ? { expected: args[0] } : void 0
13317
13318
  };
13318
13319
  const step = testInfo?._addStep(stepData);
@@ -51,7 +51,7 @@
51
51
  7.6 KB node_modules/stack-utils/index.js
52
52
  0.4 KB node_modules/stack-utils/node_modules/escape-string-regexp/index.js
53
53
  3.1 KB node_modules/supports-color/index.js
54
- 10.3 KB packages/playwright/src/matchers/expect.ts
54
+ 10.4 KB packages/playwright/src/matchers/expect.ts
55
55
  45.2 KB packages/playwright/src/matchers/expectLibrary.ts
56
56
  3.3 KB packages/playwright/src/matchers/matcherHint.ts
57
57
  16.8 KB packages/playwright/src/matchers/matchers.ts
package/lib/program.js CHANGED
@@ -138,9 +138,7 @@ function addTestMCPServerCommand(program2) {
138
138
  nameInConfig: "playwright-test-runner",
139
139
  version: import_package.packageJSON.version,
140
140
  toolSchemas: import_testBackend.testServerBackendTools.map((tool) => tool.schema),
141
- create: async () => new import_testBackend.TestServerBackend(options.config, { muteConsole: options.port === void 0, headless: options.headless }),
142
- disposed: async () => {
143
- }
141
+ create: async () => new import_testBackend.TestServerBackend(options.config, { muteConsole: options.port === void 0, headless: options.headless })
144
142
  };
145
143
  await import_coreBundle.tools.start(factory, { port: options.port === void 0 ? void 0 : +options.port, host: options.host });
146
144
  });
@@ -1285,7 +1285,7 @@ var TerminalReporter = class {
1285
1285
  return formatTestTitle(this.screen, this.config, test, step, this._options);
1286
1286
  }
1287
1287
  formatTestHeader(test, options = {}) {
1288
- return formatTestHeader(this.screen, this.config, test, { ...options, includeTestId: this._options.includeTestId });
1288
+ return formatTestHeader(this.screen, this.config, test, { ...options, includeTestId: this._options.includeTestId, omitTags: this._options.omitTags });
1289
1289
  }
1290
1290
  formatFailure(test, index) {
1291
1291
  return formatFailure(this.screen, this.config, test, index, this._options);
@@ -1320,7 +1320,7 @@ function formatFailure(screen, config2, test, index, options) {
1320
1320
  if (!errors.length)
1321
1321
  continue;
1322
1322
  if (!printedHeader) {
1323
- const header = formatTestHeader(screen, config2, test, { indent: " ", index, mode: "error", includeTestId: options?.includeTestId });
1323
+ const header = formatTestHeader(screen, config2, test, { indent: " ", index, mode: "error", includeTestId: options?.includeTestId, omitTags: options?.omitTags });
1324
1324
  lines.push(screen.colors.red(header));
1325
1325
  printedHeader = true;
1326
1326
  }
@@ -1443,7 +1443,7 @@ function formatTestTitle(screen, config2, test, step, options = {}) {
1443
1443
  const projectLabel = options.includeTestId ? `project=` : "";
1444
1444
  const projectTitle = projectName ? `[${projectLabel}${projectName}] \u203A ` : "";
1445
1445
  const testTitle = `${testId}${projectTitle}${location} \u203A ${titles.join(" \u203A ")}`;
1446
- const extraTags = test.tags.filter((t2) => !testTitle.includes(t2) && !config2.tags.includes(t2));
1446
+ const extraTags = options.omitTags ? [] : test.tags.filter((t2) => !testTitle.includes(t2) && !config2.tags.includes(t2));
1447
1447
  return `${testTitle}${stepSuffix(step)}${extraTags.length ? " " + extraTags.join(" ") : ""}`;
1448
1448
  }
1449
1449
  function formatTestHeader(screen, config2, test, options = {}) {
@@ -2361,7 +2361,8 @@ function createTestGroups(projectSuite, expectedParallelism) {
2361
2361
  requireFile: test._requireFile,
2362
2362
  repeatEachIndex: test.repeatEachIndex,
2363
2363
  projectId: test._projectId,
2364
- tests: []
2364
+ tests: [],
2365
+ locks: []
2365
2366
  };
2366
2367
  };
2367
2368
  for (const test of projectSuite.allTests()) {
@@ -2421,6 +2422,14 @@ function createTestGroups(projectSuite, expectedParallelism) {
2421
2422
  }
2422
2423
  }
2423
2424
  }
2425
+ for (const group of result) {
2426
+ const locks = /* @__PURE__ */ new Set();
2427
+ for (const test of group.tests) {
2428
+ for (const lock of test._locks)
2429
+ locks.add(lock);
2430
+ }
2431
+ group.locks = [...locks];
2432
+ }
2424
2433
  return result;
2425
2434
  }
2426
2435
  function filterForShard(shard, weights, testGroups) {
@@ -3136,9 +3145,10 @@ var BlobReporter = class extends TeleReporterEmitter {
3136
3145
  };
3137
3146
 
3138
3147
  // packages/playwright/src/reporters/dot.ts
3148
+ var { getAsBooleanFromENV } = require("playwright-core/lib/coreBundle").utils;
3139
3149
  var DotReporter = class extends TerminalReporter {
3140
- constructor() {
3141
- super(...arguments);
3150
+ constructor(options) {
3151
+ super({ ...options, omitTags: getAsBooleanFromENV("PLAYWRIGHT_DOT_OMIT_TAGS", options?.omitTags) });
3142
3152
  this._counter = 0;
3143
3153
  }
3144
3154
  onBegin(suite) {
@@ -3228,6 +3238,7 @@ var import_path7 = __toESM(require("path"));
3228
3238
  var import_util7 = require("../util");
3229
3239
  var { noColors: noColors2 } = require("playwright-core/lib/coreBundle").iso;
3230
3240
  var { msToString: msToString2 } = require("playwright-core/lib/coreBundle").iso;
3241
+ var { getAsBooleanFromENV: getAsBooleanFromENV2 } = require("playwright-core/lib/coreBundle").utils;
3231
3242
  var GitHubLogger = class {
3232
3243
  newLine() {
3233
3244
  process.stdout.write("\n");
@@ -3253,7 +3264,7 @@ var GitHubLogger = class {
3253
3264
  };
3254
3265
  var GitHubReporter = class extends TerminalReporter {
3255
3266
  constructor(options = {}) {
3256
- super(options);
3267
+ super({ ...options, omitTags: getAsBooleanFromENV2("PLAYWRIGHT_GITHUB_OMIT_TAGS", options.omitTags) });
3257
3268
  this.githubLogger = new GitHubLogger();
3258
3269
  this._failedTestCount = 0;
3259
3270
  this.screen = { ...this.screen, colors: noColors2 };
@@ -4215,7 +4226,7 @@ var json_default = JSONReporter;
4215
4226
  var import_fs7 = __toESM(require("fs"));
4216
4227
  var import_path10 = __toESM(require("path"));
4217
4228
  var import_util9 = require("../util");
4218
- var { getAsBooleanFromENV } = require("playwright-core/lib/coreBundle").utils;
4229
+ var { getAsBooleanFromENV: getAsBooleanFromENV3 } = require("playwright-core/lib/coreBundle").utils;
4219
4230
  var JUnitReporter = class {
4220
4231
  constructor(options) {
4221
4232
  this.totalTests = 0;
@@ -4225,9 +4236,11 @@ var JUnitReporter = class {
4225
4236
  this.stripANSIControlSequences = false;
4226
4237
  this.includeProjectInTestName = false;
4227
4238
  this.includeRetries = false;
4228
- this.stripANSIControlSequences = getAsBooleanFromENV("PLAYWRIGHT_JUNIT_STRIP_ANSI", !!options.stripANSIControlSequences);
4229
- this.includeProjectInTestName = getAsBooleanFromENV("PLAYWRIGHT_JUNIT_INCLUDE_PROJECT_IN_TEST_NAME", !!options.includeProjectInTestName);
4230
- this.includeRetries = getAsBooleanFromENV("PLAYWRIGHT_JUNIT_INCLUDE_RETRIES", !!options.includeRetries);
4239
+ this.omitTags = false;
4240
+ this.stripANSIControlSequences = getAsBooleanFromENV3("PLAYWRIGHT_JUNIT_STRIP_ANSI", !!options.stripANSIControlSequences);
4241
+ this.includeProjectInTestName = getAsBooleanFromENV3("PLAYWRIGHT_JUNIT_INCLUDE_PROJECT_IN_TEST_NAME", !!options.includeProjectInTestName);
4242
+ this.includeRetries = getAsBooleanFromENV3("PLAYWRIGHT_JUNIT_INCLUDE_RETRIES", !!options.includeRetries);
4243
+ this.omitTags = getAsBooleanFromENV3("PLAYWRIGHT_JUNIT_OMIT_TAGS", !!options.omitTags);
4231
4244
  this.configDir = options.configDir;
4232
4245
  this.resolvedOutputFile = resolveOutputFile("JUNIT", options)?.outputFile;
4233
4246
  }
@@ -4380,7 +4393,7 @@ var JUnitReporter = class {
4380
4393
  entry.children.push({
4381
4394
  name: errorInfo.elementName,
4382
4395
  attributes: { message: errorInfo.message, type: errorInfo.type },
4383
- text: (0, import_util9.stripAnsiEscapes)(formatFailure(nonTerminalScreen, this.config, test))
4396
+ text: (0, import_util9.stripAnsiEscapes)(formatFailure(nonTerminalScreen, this.config, test, void 0, { omitTags: this.omitTags }))
4384
4397
  });
4385
4398
  return errorInfo.elementName;
4386
4399
  }
@@ -4390,7 +4403,7 @@ var JUnitReporter = class {
4390
4403
  message: `${import_path10.default.basename(test.location.file)}:${test.location.line}:${test.location.column} ${test.title}`,
4391
4404
  type: "FAILURE"
4392
4405
  },
4393
- text: (0, import_util9.stripAnsiEscapes)(formatFailure(nonTerminalScreen, this.config, test))
4406
+ text: (0, import_util9.stripAnsiEscapes)(formatFailure(nonTerminalScreen, this.config, test, void 0, { omitTags: this.omitTags }))
4394
4407
  });
4395
4408
  return "failure";
4396
4409
  }
@@ -4501,9 +4514,10 @@ function escape(text, stripANSIControlSequences, isCharacterData) {
4501
4514
  var junit_default = JUnitReporter;
4502
4515
 
4503
4516
  // packages/playwright/src/reporters/line.ts
4517
+ var { getAsBooleanFromENV: getAsBooleanFromENV4 } = require("playwright-core/lib/coreBundle").utils;
4504
4518
  var LineReporter = class extends TerminalReporter {
4505
- constructor() {
4506
- super(...arguments);
4519
+ constructor(options) {
4520
+ super({ ...options, omitTags: getAsBooleanFromENV4("PLAYWRIGHT_LINE_OMIT_TAGS", options?.omitTags) });
4507
4521
  this._current = 0;
4508
4522
  this._failures = 0;
4509
4523
  this._didBegin = false;
@@ -4612,13 +4626,13 @@ var line_default = LineReporter;
4612
4626
  // packages/playwright/src/reporters/list.ts
4613
4627
  var import_util10 = require("../util");
4614
4628
  var { msToString: msToString3 } = require("playwright-core/lib/coreBundle").iso;
4615
- var { getAsBooleanFromENV: getAsBooleanFromENV2 } = require("playwright-core/lib/coreBundle").utils;
4629
+ var { getAsBooleanFromENV: getAsBooleanFromENV5 } = require("playwright-core/lib/coreBundle").utils;
4616
4630
  var DOES_NOT_SUPPORT_UTF8_IN_TERMINAL = process.platform === "win32" && process.env.TERM_PROGRAM !== "vscode" && !process.env.WT_SESSION;
4617
4631
  var POSITIVE_STATUS_MARK = DOES_NOT_SUPPORT_UTF8_IN_TERMINAL ? "ok" : "\u2713";
4618
4632
  var NEGATIVE_STATUS_MARK = DOES_NOT_SUPPORT_UTF8_IN_TERMINAL ? "x" : "\u2718";
4619
4633
  var ListReporter = class extends TerminalReporter {
4620
4634
  constructor(options) {
4621
- super(options);
4635
+ super({ ...options, omitTags: getAsBooleanFromENV5("PLAYWRIGHT_LIST_OMIT_TAGS", options?.omitTags) });
4622
4636
  this._lastRow = 0;
4623
4637
  this._lastColumn = 0;
4624
4638
  this._testRows = /* @__PURE__ */ new Map();
@@ -4628,8 +4642,8 @@ var ListReporter = class extends TerminalReporter {
4628
4642
  this._needNewLine = false;
4629
4643
  this._failureIndex = 0;
4630
4644
  this._paused = /* @__PURE__ */ new Set();
4631
- this._printSteps = getAsBooleanFromENV2("PLAYWRIGHT_LIST_PRINT_STEPS", options?.printSteps);
4632
- this._printFailuresInline = getAsBooleanFromENV2("PLAYWRIGHT_LIST_PRINT_FAILURES_INLINE", options?.printFailuresInline);
4645
+ this._printSteps = getAsBooleanFromENV5("PLAYWRIGHT_LIST_PRINT_STEPS", options?.printSteps);
4646
+ this._printFailuresInline = getAsBooleanFromENV5("PLAYWRIGHT_LIST_PRINT_FAILURES_INLINE", options?.printFailuresInline);
4633
4647
  }
4634
4648
  onBegin(suite) {
4635
4649
  super.onBegin(suite);
@@ -5227,11 +5241,22 @@ var Dispatcher = class {
5227
5241
  this._workerLimitPerProjectId.set(project.id, project.workers);
5228
5242
  }
5229
5243
  }
5244
+ _heldLocks() {
5245
+ const heldLocks = /* @__PURE__ */ new Set();
5246
+ for (const slot of this._workerSlots) {
5247
+ for (const lock of slot.jobDispatcher?.job.locks || [])
5248
+ heldLocks.add(lock);
5249
+ }
5250
+ return heldLocks;
5251
+ }
5230
5252
  _findFirstJobToRun() {
5253
+ const heldLocks = this._heldLocks();
5231
5254
  for (let index = 0; index < this._queue.length; index++) {
5232
5255
  const job = this._queue[index];
5233
5256
  if (this._isolatedJobs.has(job) && this._workerSlots.some((w) => !!w.jobDispatcher))
5234
5257
  continue;
5258
+ if (job.locks.some((lock) => heldLocks.has(lock)))
5259
+ continue;
5235
5260
  const projectIdWorkerLimit = this._workerLimitPerProjectId.get(job.projectId);
5236
5261
  if (!projectIdWorkerLimit)
5237
5262
  return index;
@@ -5241,18 +5266,22 @@ var Dispatcher = class {
5241
5266
  }
5242
5267
  return -1;
5243
5268
  }
5269
+ _scheduleJobs() {
5270
+ while (this._scheduleJob()) {
5271
+ }
5272
+ }
5244
5273
  _scheduleJob() {
5245
- if (this._isStopped)
5246
- return;
5274
+ if (this._isStopped || !this._workerSlots.some((w) => !w.jobDispatcher))
5275
+ return false;
5247
5276
  const jobIndex = this._findFirstJobToRun();
5248
5277
  if (jobIndex === -1)
5249
- return;
5278
+ return false;
5250
5279
  const job = this._queue[jobIndex];
5251
5280
  let workerIndex = this._workerSlots.findIndex((w) => !w.jobDispatcher && w.worker && w.worker.hash() === job.workerHash && !w.worker.didSendStop());
5252
5281
  if (workerIndex === -1)
5253
5282
  workerIndex = this._workerSlots.findIndex((w) => !w.jobDispatcher);
5254
5283
  if (workerIndex === -1) {
5255
- return;
5284
+ return false;
5256
5285
  }
5257
5286
  this._queue.splice(jobIndex, 1);
5258
5287
  const jobDispatcher = new JobDispatcher(job, this._testRun, this._ignoreMaxFailures ? void 0 : () => this.stop().catch(() => {
@@ -5261,8 +5290,9 @@ var Dispatcher = class {
5261
5290
  void this._runJobInWorker(workerIndex, jobDispatcher).then(() => {
5262
5291
  this._workerSlots[workerIndex].jobDispatcher = void 0;
5263
5292
  this._checkFinished();
5264
- this._scheduleJob();
5293
+ this._scheduleJobs();
5265
5294
  });
5295
+ return true;
5266
5296
  }
5267
5297
  async _runJobInWorker(index, jobDispatcher) {
5268
5298
  const job = jobDispatcher.job;
@@ -5340,8 +5370,7 @@ var Dispatcher = class {
5340
5370
  void this.stop();
5341
5371
  for (let i = 0; i < this._testRun.config.config.workers; i++)
5342
5372
  this._workerSlots.push({});
5343
- for (let i = 0; i < this._workerSlots.length; i++)
5344
- this._scheduleJob();
5373
+ this._scheduleJobs();
5345
5374
  this._checkFinished();
5346
5375
  await this._finished;
5347
5376
  }
@@ -1,5 +1,5 @@
1
1
  # packages/playwright/lib/runner/index.js
2
- # total: 297.6 KB
2
+ # total: 299.1 KB
3
3
 
4
4
  ## Inlined (46)
5
5
  1.3 KB packages/playwright/src/isomorphic/events.ts
@@ -11,23 +11,23 @@
11
11
  0.0 KB packages/playwright/src/isomorphic/testTree.ts
12
12
  5.1 KB packages/playwright/src/plugins/gitCommitInfoPlugin.ts
13
13
  8.6 KB packages/playwright/src/plugins/webServerPlugin.ts
14
- 21.3 KB packages/playwright/src/reporters/base.ts
14
+ 21.4 KB packages/playwright/src/reporters/base.ts
15
15
  4.0 KB packages/playwright/src/reporters/blob.ts
16
- 2.3 KB packages/playwright/src/reporters/dot.ts
16
+ 2.5 KB packages/playwright/src/reporters/dot.ts
17
17
  0.1 KB packages/playwright/src/reporters/empty.ts
18
- 3.6 KB packages/playwright/src/reporters/github.ts
18
+ 3.7 KB packages/playwright/src/reporters/github.ts
19
19
  26.4 KB packages/playwright/src/reporters/html.ts
20
20
  3.2 KB packages/playwright/src/reporters/internalReporter.ts
21
21
  7.1 KB packages/playwright/src/reporters/json.ts
22
- 10.3 KB packages/playwright/src/reporters/junit.ts
23
- 3.8 KB packages/playwright/src/reporters/line.ts
24
- 9.2 KB packages/playwright/src/reporters/list.ts
22
+ 10.5 KB packages/playwright/src/reporters/junit.ts
23
+ 4.0 KB packages/playwright/src/reporters/line.ts
24
+ 9.3 KB packages/playwright/src/reporters/list.ts
25
25
  1.4 KB packages/playwright/src/reporters/listModeReporter.ts
26
26
  18.5 KB packages/playwright/src/reporters/merge.ts
27
27
  3.0 KB packages/playwright/src/reporters/multiplexer.ts
28
28
  2.1 KB packages/playwright/src/reporters/reporterV2.ts
29
29
  8.8 KB packages/playwright/src/reporters/teleEmitter.ts
30
- 20.0 KB packages/playwright/src/runner/dispatcher.ts
30
+ 20.4 KB packages/playwright/src/runner/dispatcher.ts
31
31
  1.5 KB packages/playwright/src/runner/fsWatcher.ts
32
32
  0.5 KB packages/playwright/src/runner/index.ts
33
33
  1.4 KB packages/playwright/src/runner/lastRun.ts
@@ -41,7 +41,7 @@
41
41
  1.6 KB packages/playwright/src/runner/sigIntWatcher.ts
42
42
  3.5 KB packages/playwright/src/runner/taskRunner.ts
43
43
  14.9 KB packages/playwright/src/runner/tasks.ts
44
- 3.6 KB packages/playwright/src/runner/testGroups.ts
44
+ 3.8 KB packages/playwright/src/runner/testGroups.ts
45
45
  14.1 KB packages/playwright/src/runner/testRunner.ts
46
46
  9.3 KB packages/playwright/src/runner/testServer.ts
47
47
  0.2 KB packages/playwright/src/runner/uiModeReporter.ts
@@ -992,14 +992,13 @@ var TestInfoImpl = class {
992
992
  if (!parentStep)
993
993
  parentStep = this._parentStep();
994
994
  }
995
- const filteredStack = filteredStackTrace3(captureRawStack());
996
995
  let boxedStack = parentStep?.boxedStack;
997
996
  let location = data.location;
998
997
  if (!boxedStack && data.box) {
999
- boxedStack = filteredStack.slice(1);
1000
- location = location || boxedStack[0];
998
+ boxedStack = filteredStackTrace3(captureRawStack()).slice(1);
999
+ location ??= boxedStack[0];
1001
1000
  }
1002
- location = location || filteredStack[0];
1001
+ location ??= filteredStackTrace3(captureRawStack())[0];
1003
1002
  const step = {
1004
1003
  ...data,
1005
1004
  stepId,
@@ -1,5 +1,5 @@
1
1
  # packages/playwright/lib/worker/workerProcessEntry.js
2
- # total: 73.9 KB
2
+ # total: 73.8 KB
3
3
 
4
4
  ## Inlined (8)
5
5
  3.7 KB packages/playwright/src/util.ts
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "playwright",
3
- "version": "1.62.0",
3
+ "version": "1.63.0-alpha-2026-07-25",
4
4
  "description": "A high-level API to automate web browsers",
5
5
  "repository": {
6
6
  "type": "git",
@@ -50,7 +50,7 @@
50
50
  },
51
51
  "license": "Apache-2.0",
52
52
  "dependencies": {
53
- "playwright-core": "1.62.0"
53
+ "playwright-core": "1.63.0-alpha-2026-07-25"
54
54
  },
55
55
  "optionalDependencies": {
56
56
  "fsevents": "2.3.2"
package/types/test.d.ts CHANGED
@@ -19,8 +19,11 @@ 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, printFailuresInline?: boolean };
23
- export type JUnitReporterOptions = { outputFile?: string, stripANSIControlSequences?: boolean, includeProjectInTestName?: boolean, includeRetries?: boolean };
22
+ export type DotReporterOptions = { omitTags?: boolean };
23
+ export type LineReporterOptions = { omitTags?: boolean };
24
+ export type ListReporterOptions = { printSteps?: boolean, printFailuresInline?: boolean, omitTags?: boolean };
25
+ export type GitHubReporterOptions = { omitTags?: boolean };
26
+ export type JUnitReporterOptions = { outputFile?: string, stripANSIControlSequences?: boolean, includeProjectInTestName?: boolean, includeRetries?: boolean, omitTags?: boolean };
24
27
  export type JsonReporterOptions = { outputFile?: string };
25
28
  export type HtmlReporterOptions = {
26
29
  outputFolder?: string;
@@ -37,10 +40,10 @@ export type HtmlReporterOptions = {
37
40
 
38
41
  export type ReporterDescription = Readonly<
39
42
  ['blob'] | ['blob', BlobReporterOptions] |
40
- ['dot'] |
41
- ['line'] |
43
+ ['dot'] | ['dot', DotReporterOptions] |
44
+ ['line'] | ['line', LineReporterOptions] |
42
45
  ['list'] | ['list', ListReporterOptions] |
43
- ['github'] |
46
+ ['github'] | ['github', GitHubReporterOptions] |
44
47
  ['junit'] | ['junit', JUnitReporterOptions] |
45
48
  ['json'] | ['json', JsonReporterOptions] |
46
49
  ['html'] | ['html', HtmlReporterOptions] |
@@ -2719,6 +2722,7 @@ export type TestAnnotation = TestDetailsAnnotation & {
2719
2722
  export type TestDetails = {
2720
2723
  tag?: string | string[];
2721
2724
  annotation?: TestDetailsAnnotation | TestDetailsAnnotation[];
2725
+ lock?: string | string[];
2722
2726
  }
2723
2727
 
2724
2728
  type TestBody<TestArgs> = (args: TestArgs, testInfo: TestInfo) => Promise<unknown> | unknown;
@@ -2810,6 +2814,26 @@ export interface TestType<TestArgs extends {}, WorkerArgs extends {}> {
2810
2814
  * [testInfo.annotations](https://playwright.dev/docs/api/class-testinfo#test-info-annotations).
2811
2815
  *
2812
2816
  * Learn more about [test annotations](https://playwright.dev/docs/test-annotations).
2817
+ *
2818
+ * **Locks**
2819
+ *
2820
+ * You can declare named locks to prevent specific tests from running at the same time, while all other tests continue
2821
+ * to run in parallel. Tests that share a lock name never run concurrently, even when they are declared in different
2822
+ * files or belong to different [projects](https://playwright.dev/docs/test-projects). This is useful when a few tests access a shared
2823
+ * resource that does not support concurrent access.
2824
+ *
2825
+ * ```js
2826
+ * import { test, expect } from '@playwright/test';
2827
+ *
2828
+ * test('update user settings', {
2829
+ * lock: 'user-settings',
2830
+ * }, async ({ page }) => {
2831
+ * // This test never runs concurrently with other tests
2832
+ * // that declare the 'user-settings' lock.
2833
+ * });
2834
+ * ```
2835
+ *
2836
+ * Learn more about [test locks](https://playwright.dev/docs/test-parallel#test-locks).
2813
2837
  * @param title Test title.
2814
2838
  * @param details Additional test details.
2815
2839
  * @param body Test body that takes one or two arguments: an object with fixtures and optional
@@ -2887,6 +2911,26 @@ export interface TestType<TestArgs extends {}, WorkerArgs extends {}> {
2887
2911
  * [testInfo.annotations](https://playwright.dev/docs/api/class-testinfo#test-info-annotations).
2888
2912
  *
2889
2913
  * Learn more about [test annotations](https://playwright.dev/docs/test-annotations).
2914
+ *
2915
+ * **Locks**
2916
+ *
2917
+ * You can declare named locks to prevent specific tests from running at the same time, while all other tests continue
2918
+ * to run in parallel. Tests that share a lock name never run concurrently, even when they are declared in different
2919
+ * files or belong to different [projects](https://playwright.dev/docs/test-projects). This is useful when a few tests access a shared
2920
+ * resource that does not support concurrent access.
2921
+ *
2922
+ * ```js
2923
+ * import { test, expect } from '@playwright/test';
2924
+ *
2925
+ * test('update user settings', {
2926
+ * lock: 'user-settings',
2927
+ * }, async ({ page }) => {
2928
+ * // This test never runs concurrently with other tests
2929
+ * // that declare the 'user-settings' lock.
2930
+ * });
2931
+ * ```
2932
+ *
2933
+ * Learn more about [test locks](https://playwright.dev/docs/test-parallel#test-locks).
2890
2934
  * @param title Test title.
2891
2935
  * @param details Additional test details.
2892
2936
  * @param body Test body that takes one or two arguments: an object with fixtures and optional
@@ -3023,6 +3067,28 @@ export interface TestType<TestArgs extends {}, WorkerArgs extends {}> {
3023
3067
  * ```
3024
3068
  *
3025
3069
  * Learn more about [test annotations](https://playwright.dev/docs/test-annotations).
3070
+ *
3071
+ * **Locks**
3072
+ *
3073
+ * You can declare named locks for all tests in a group by providing additional details. Tests that share a lock name
3074
+ * never run concurrently. Learn more about [test locks](https://playwright.dev/docs/test-parallel#test-locks).
3075
+ *
3076
+ * ```js
3077
+ * import { test, expect } from '@playwright/test';
3078
+ *
3079
+ * test.describe('two tests with a lock', {
3080
+ * lock: 'user-settings',
3081
+ * }, () => {
3082
+ * test('one', async ({ page }) => {
3083
+ * // ...
3084
+ * });
3085
+ *
3086
+ * test('two', async ({ page }) => {
3087
+ * // ...
3088
+ * });
3089
+ * });
3090
+ * ```
3091
+ *
3026
3092
  * @param title Group title.
3027
3093
  * @param details Additional details for all tests in the group.
3028
3094
  * @param callback A callback that is run immediately when calling
@@ -3118,6 +3184,28 @@ export interface TestType<TestArgs extends {}, WorkerArgs extends {}> {
3118
3184
  * ```
3119
3185
  *
3120
3186
  * Learn more about [test annotations](https://playwright.dev/docs/test-annotations).
3187
+ *
3188
+ * **Locks**
3189
+ *
3190
+ * You can declare named locks for all tests in a group by providing additional details. Tests that share a lock name
3191
+ * never run concurrently. Learn more about [test locks](https://playwright.dev/docs/test-parallel#test-locks).
3192
+ *
3193
+ * ```js
3194
+ * import { test, expect } from '@playwright/test';
3195
+ *
3196
+ * test.describe('two tests with a lock', {
3197
+ * lock: 'user-settings',
3198
+ * }, () => {
3199
+ * test('one', async ({ page }) => {
3200
+ * // ...
3201
+ * });
3202
+ *
3203
+ * test('two', async ({ page }) => {
3204
+ * // ...
3205
+ * });
3206
+ * });
3207
+ * ```
3208
+ *
3121
3209
  * @param title Group title.
3122
3210
  * @param details Additional details for all tests in the group.
3123
3211
  * @param callback A callback that is run immediately when calling
@@ -3213,6 +3301,28 @@ export interface TestType<TestArgs extends {}, WorkerArgs extends {}> {
3213
3301
  * ```
3214
3302
  *
3215
3303
  * Learn more about [test annotations](https://playwright.dev/docs/test-annotations).
3304
+ *
3305
+ * **Locks**
3306
+ *
3307
+ * You can declare named locks for all tests in a group by providing additional details. Tests that share a lock name
3308
+ * never run concurrently. Learn more about [test locks](https://playwright.dev/docs/test-parallel#test-locks).
3309
+ *
3310
+ * ```js
3311
+ * import { test, expect } from '@playwright/test';
3312
+ *
3313
+ * test.describe('two tests with a lock', {
3314
+ * lock: 'user-settings',
3315
+ * }, () => {
3316
+ * test('one', async ({ page }) => {
3317
+ * // ...
3318
+ * });
3319
+ *
3320
+ * test('two', async ({ page }) => {
3321
+ * // ...
3322
+ * });
3323
+ * });
3324
+ * ```
3325
+ *
3216
3326
  * @param title Group title.
3217
3327
  * @param details Additional details for all tests in the group.
3218
3328
  * @param callback A callback that is run immediately when calling
@@ -3308,6 +3418,28 @@ export interface TestType<TestArgs extends {}, WorkerArgs extends {}> {
3308
3418
  * ```
3309
3419
  *
3310
3420
  * Learn more about [test annotations](https://playwright.dev/docs/test-annotations).
3421
+ *
3422
+ * **Locks**
3423
+ *
3424
+ * You can declare named locks for all tests in a group by providing additional details. Tests that share a lock name
3425
+ * never run concurrently. Learn more about [test locks](https://playwright.dev/docs/test-parallel#test-locks).
3426
+ *
3427
+ * ```js
3428
+ * import { test, expect } from '@playwright/test';
3429
+ *
3430
+ * test.describe('two tests with a lock', {
3431
+ * lock: 'user-settings',
3432
+ * }, () => {
3433
+ * test('one', async ({ page }) => {
3434
+ * // ...
3435
+ * });
3436
+ *
3437
+ * test('two', async ({ page }) => {
3438
+ * // ...
3439
+ * });
3440
+ * });
3441
+ * ```
3442
+ *
3311
3443
  * @param title Group title.
3312
3444
  * @param details Additional details for all tests in the group.
3313
3445
  * @param callback A callback that is run immediately when calling
@@ -7317,6 +7449,9 @@ export interface PlaywrightTestOptions {
7317
7449
  * Credentials for [HTTP authentication](https://developer.mozilla.org/en-US/docs/Web/HTTP/Authentication). If no
7318
7450
  * origin is specified, the username and password are sent to any servers upon unauthorized responses.
7319
7451
  *
7452
+ * Pass an array to use different credentials for different origins. The first entry that matches the request origin
7453
+ * is used, and entries with no origin match any request.
7454
+ *
7320
7455
  * **Usage**
7321
7456
  *
7322
7457
  * ```js
@@ -7334,7 +7469,7 @@ export interface PlaywrightTestOptions {
7334
7469
  * ```
7335
7470
  *
7336
7471
  */
7337
- httpCredentials: HTTPCredentials | undefined;
7472
+ httpCredentials: HTTPCredentials | HTTPCredentials[] | undefined;
7338
7473
  /**
7339
7474
  * Whether to ignore HTTPS errors when sending network requests. Defaults to `false`.
7340
7475
  *