@playwright/test 1.32.2 → 1.32.3

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.
@@ -28,7 +28,6 @@ exports.toHaveValues = toHaveValues;
28
28
  exports.toPass = toPass;
29
29
  var _utilsBundle = require("playwright-core/lib/utilsBundle");
30
30
  var _util = require("../util");
31
- var _globals = require("../common/globals");
32
31
  var _toBeTruthy = require("./toBeTruthy");
33
32
  var _toEqual = require("./toEqual");
34
33
  var _toMatchText = require("./toMatchText");
@@ -323,22 +322,10 @@ async function toBeOK(response) {
323
322
  };
324
323
  }
325
324
  async function toPass(callback, options = {}) {
326
- const testInfo = (0, _globals.currentTestInfo)();
327
325
  const timeout = options.timeout !== undefined ? options.timeout : 0;
328
-
329
- // Soft expects might mark test as failing.
330
- // We want to revert this later if the matcher is actually passing.
331
- // See https://github.com/microsoft/playwright/issues/20437
332
- let testStateBeforeToPassMatcher;
333
326
  const result = await (0, _utils.pollAgainstTimeout)(async () => {
334
327
  try {
335
- if (testStateBeforeToPassMatcher && testInfo) testInfo._restoreErrorState(testStateBeforeToPassMatcher);
336
- testStateBeforeToPassMatcher = testInfo === null || testInfo === void 0 ? void 0 : testInfo._saveErrorState();
337
328
  await callback();
338
- if (testInfo && testStateBeforeToPassMatcher && testInfo.errors.length > testStateBeforeToPassMatcher.errors.length) return {
339
- continuePolling: !this.isNot,
340
- result: testInfo.errors[testInfo.errors.length - 1]
341
- };
342
329
  return {
343
330
  continuePolling: this.isNot,
344
331
  result: undefined
@@ -358,7 +345,6 @@ async function toPass(callback, options = {}) {
358
345
  pass: this.isNot
359
346
  };
360
347
  }
361
- if (testStateBeforeToPassMatcher && testInfo) testInfo._restoreErrorState(testStateBeforeToPassMatcher);
362
348
  return {
363
349
  pass: !this.isNot,
364
350
  message: () => ''
@@ -217,18 +217,6 @@ class TestInfoImpl {
217
217
  if (this.status === 'passed' || this.status === 'skipped') this.status = 'failed';
218
218
  this.errors.push(error);
219
219
  }
220
- _saveErrorState() {
221
- return {
222
- hasHardError: this._hasHardError,
223
- status: this.status,
224
- errors: this.errors.slice()
225
- };
226
- }
227
- _restoreErrorState(state) {
228
- this.status = state.status;
229
- this.errors = state.errors.slice();
230
- this._hasHardError = state.hasHardError;
231
- }
232
220
  async _runAsStep(cb, stepInfo) {
233
221
  const step = this._addStep({
234
222
  ...stepInfo,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@playwright/test",
3
- "version": "1.32.2",
3
+ "version": "1.32.3",
4
4
  "description": "A high-level API to automate web browsers",
5
5
  "repository": "github:Microsoft/playwright",
6
6
  "homepage": "https://playwright.dev",
@@ -34,7 +34,7 @@
34
34
  "license": "Apache-2.0",
35
35
  "dependencies": {
36
36
  "@types/node": "*",
37
- "playwright-core": "1.32.2"
37
+ "playwright-core": "1.32.3"
38
38
  },
39
39
  "optionalDependencies": {
40
40
  "fsevents": "2.3.2"
package/types/test.d.ts CHANGED
@@ -5887,7 +5887,8 @@ interface TestConfigWebServer {
5887
5887
 
5888
5888
  /**
5889
5889
  * The url on your http server that is expected to return a 2xx, 3xx, 400, 401, 402, or 403 status code when the
5890
- * server is ready to accept connections. Exactly one of `port` or `url` is required.
5890
+ * server is ready to accept connections. Redirects (3xx status codes) are being followed and the new location is
5891
+ * checked. Exactly one of `port` or `url` is required.
5891
5892
  */
5892
5893
  url?: string;
5893
5894