@playwright/test 1.32.2-beta-1680712603000 → 1.32.2-beta-1681174224000
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/matchers/matchers.js +0 -14
- package/lib/worker/testInfo.js +0 -12
- package/package.json +2 -2
package/lib/matchers/matchers.js
CHANGED
|
@@ -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: () => ''
|
package/lib/worker/testInfo.js
CHANGED
|
@@ -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-beta-
|
|
3
|
+
"version": "1.32.2-beta-1681174224000",
|
|
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-beta-
|
|
37
|
+
"playwright-core": "1.32.2-beta-1681174224000"
|
|
38
38
|
},
|
|
39
39
|
"optionalDependencies": {
|
|
40
40
|
"fsevents": "2.3.2"
|