mirror of
https://github.com/TheBinaryNinja/tvapp2.git
synced 2026-06-04 22:25:41 -04:00
build(deps): bump playwright from 1.49.1 to 1.50.1
This commit is contained in:
5
node_modules/playwright/lib/common/config.js
generated
vendored
5
node_modules/playwright/lib/common/config.js
generated
vendored
@@ -49,6 +49,7 @@ class FullConfigInternal {
|
||||
this.cliFailOnFlakyTests = void 0;
|
||||
this.cliLastFailed = void 0;
|
||||
this.testIdMatcher = void 0;
|
||||
this.lastFailedTestIdMatcher = void 0;
|
||||
this.defineConfigWasUsed = false;
|
||||
this.globalSetups = [];
|
||||
this.globalTeardowns = [];
|
||||
@@ -90,6 +91,7 @@ class FullConfigInternal {
|
||||
projects: [],
|
||||
shard: takeFirst(configCLIOverrides.shard, userConfig.shard, null),
|
||||
updateSnapshots: takeFirst(configCLIOverrides.updateSnapshots, userConfig.updateSnapshots, 'missing'),
|
||||
updateSourceMethod: takeFirst(configCLIOverrides.updateSourceMethod, userConfig.updateSourceMethod, 'patch'),
|
||||
version: require('../../package.json').version,
|
||||
workers: 0,
|
||||
webServer: null
|
||||
@@ -159,8 +161,7 @@ class FullProjectInternal {
|
||||
this.teardown = void 0;
|
||||
this.fullConfig = fullConfig;
|
||||
const testDir = takeFirst(pathResolve(configDir, projectConfig.testDir), pathResolve(configDir, config.testDir), fullConfig.configDir);
|
||||
const defaultSnapshotPathTemplate = '{snapshotDir}/{testFileDir}/{testFileName}-snapshots/{arg}{-projectName}{-snapshotSuffix}{ext}';
|
||||
this.snapshotPathTemplate = takeFirst(projectConfig.snapshotPathTemplate, config.snapshotPathTemplate, defaultSnapshotPathTemplate);
|
||||
this.snapshotPathTemplate = takeFirst(projectConfig.snapshotPathTemplate, config.snapshotPathTemplate);
|
||||
this.project = {
|
||||
grep: takeFirst(projectConfig.grep, config.grep, defaultGrep),
|
||||
grepInvert: takeFirst(projectConfig.grepInvert, config.grepInvert, null),
|
||||
|
||||
2
node_modules/playwright/lib/common/configLoader.js
generated
vendored
2
node_modules/playwright/lib/common/configLoader.js
generated
vendored
@@ -206,7 +206,7 @@ function validateConfig(file, config) {
|
||||
if (!('current' in config.shard) || typeof config.shard.current !== 'number' || config.shard.current < 1 || config.shard.current > config.shard.total) throw (0, _util.errorWithFile)(file, `config.shard.current must be a positive number, not greater than config.shard.total`);
|
||||
}
|
||||
if ('updateSnapshots' in config && config.updateSnapshots !== undefined) {
|
||||
if (typeof config.updateSnapshots !== 'string' || !['all', 'none', 'missing'].includes(config.updateSnapshots)) throw (0, _util.errorWithFile)(file, `config.updateSnapshots must be one of "all", "none" or "missing"`);
|
||||
if (typeof config.updateSnapshots !== 'string' || !['all', 'changed', 'missing', 'none'].includes(config.updateSnapshots)) throw (0, _util.errorWithFile)(file, `config.updateSnapshots must be one of "all", "changed", "missing" or "none"`);
|
||||
}
|
||||
if ('workers' in config && config.workers !== undefined) {
|
||||
if (typeof config.workers === 'number' && config.workers <= 0) throw (0, _util.errorWithFile)(file, `config.workers must be a positive number`);else if (typeof config.workers === 'string' && !config.workers.endsWith('%')) throw (0, _util.errorWithFile)(file, `config.workers must be a number or percentage`);
|
||||
|
||||
1
node_modules/playwright/lib/common/esmLoaderHost.js
generated
vendored
1
node_modules/playwright/lib/common/esmLoaderHost.js
generated
vendored
@@ -44,7 +44,6 @@ function registerESMLoader() {
|
||||
} = new MessageChannel();
|
||||
// register will wait until the loader is initialized.
|
||||
require('node:module').register(_url.default.pathToFileURL(require.resolve('../transform/esmLoader')), {
|
||||
parentURL: _url.default.pathToFileURL(__filename),
|
||||
data: {
|
||||
port: port2
|
||||
},
|
||||
|
||||
32
node_modules/playwright/lib/common/testType.js
generated
vendored
32
node_modules/playwright/lib/common/testType.js
generated
vendored
@@ -11,6 +11,7 @@ var _globals = require("./globals");
|
||||
var _test = require("./test");
|
||||
var _transform = require("../transform/transform");
|
||||
var _utils = require("playwright-core/lib/utils");
|
||||
var _playwrightCore = require("playwright-core");
|
||||
/**
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
*
|
||||
@@ -56,7 +57,8 @@ class TestTypeImpl {
|
||||
test.fail.only = (0, _transform.wrapFunctionWithLocation)(this._createTest.bind(this, 'fail.only'));
|
||||
test.slow = (0, _transform.wrapFunctionWithLocation)(this._modifier.bind(this, 'slow'));
|
||||
test.setTimeout = (0, _transform.wrapFunctionWithLocation)(this._setTimeout.bind(this));
|
||||
test.step = this._step.bind(this);
|
||||
test.step = this._step.bind(this, 'pass');
|
||||
test.step.skip = this._step.bind(this, 'skip');
|
||||
test.use = (0, _transform.wrapFunctionWithLocation)(this._use.bind(this));
|
||||
test.extend = (0, _transform.wrapFunctionWithLocation)(this._extend.bind(this));
|
||||
test.info = () => {
|
||||
@@ -222,9 +224,19 @@ class TestTypeImpl {
|
||||
location
|
||||
});
|
||||
}
|
||||
async _step(title, body, options = {}) {
|
||||
async _step(expectation, title, body, options = {}) {
|
||||
const testInfo = (0, _globals.currentTestInfo)();
|
||||
if (!testInfo) throw new Error(`test.step() can only be called from a test`);
|
||||
if (expectation === 'skip') {
|
||||
const step = testInfo._addStep({
|
||||
category: 'test.step.skip',
|
||||
title,
|
||||
location: options.location,
|
||||
box: options.box
|
||||
});
|
||||
step.complete({});
|
||||
return undefined;
|
||||
}
|
||||
const step = testInfo._addStep({
|
||||
category: 'test.step',
|
||||
title,
|
||||
@@ -233,9 +245,21 @@ class TestTypeImpl {
|
||||
});
|
||||
return await _utils.zones.run('stepZone', step, async () => {
|
||||
try {
|
||||
const result = await body();
|
||||
let result = undefined;
|
||||
result = await (0, _utils.raceAgainstDeadline)(async () => {
|
||||
try {
|
||||
return await body();
|
||||
} catch (e) {
|
||||
var _result;
|
||||
// If the step timed out, the test fixtures will tear down, which in turn
|
||||
// will abort unfinished actions in the step body. Record such errors here.
|
||||
if ((_result = result) !== null && _result !== void 0 && _result.timedOut) testInfo._failWithError(e);
|
||||
throw e;
|
||||
}
|
||||
}, options.timeout ? (0, _utils.monotonicTime)() + options.timeout : 0);
|
||||
if (result.timedOut) throw new _playwrightCore.errors.TimeoutError(`Step timeout of ${options.timeout}ms exceeded.`);
|
||||
step.complete({});
|
||||
return result;
|
||||
return result.result;
|
||||
} catch (error) {
|
||||
step.complete({
|
||||
error
|
||||
|
||||
Reference in New Issue
Block a user