mirror of
https://github.com/TheBinaryNinja/tvapp2.git
synced 2026-06-04 20:15:41 -04:00
build(deps): bump playwright from 1.49.1 to 1.50.1
This commit is contained in:
44
node_modules/playwright/lib/index.js
generated
vendored
44
node_modules/playwright/lib/index.js
generated
vendored
@@ -437,34 +437,43 @@ const playwrightFixtures = {
|
||||
await artifactsRecorder.willStartTest(testInfo);
|
||||
const tracingGroupSteps = [];
|
||||
const csiListener = {
|
||||
onApiCallBegin: (apiName, params, frames, userData, out) => {
|
||||
userData.apiName = apiName;
|
||||
onApiCallBegin: data => {
|
||||
const testInfo = (0, _globals.currentTestInfo)();
|
||||
if (!testInfo || apiName.includes('setTestIdAttribute') || apiName === 'tracing.groupEnd') return;
|
||||
// Some special calls do not get into steps.
|
||||
if (!testInfo || data.apiName.includes('setTestIdAttribute') || data.apiName === 'tracing.groupEnd') return;
|
||||
const zone = _utils.zones.zoneData('stepZone');
|
||||
if (zone && zone.category === 'expect') {
|
||||
// Display the internal locator._expect call under the name of the enclosing expect call,
|
||||
// and connect it to the existing expect step.
|
||||
data.apiName = zone.title;
|
||||
data.stepId = zone.stepId;
|
||||
return;
|
||||
}
|
||||
// In the general case, create a step for each api call and connect them through the stepId.
|
||||
const step = testInfo._addStep({
|
||||
location: frames[0],
|
||||
location: data.frames[0],
|
||||
category: 'pw:api',
|
||||
title: renderApiCall(apiName, params),
|
||||
apiName,
|
||||
params
|
||||
title: renderApiCall(data.apiName, data.params),
|
||||
apiName: data.apiName,
|
||||
params: data.params
|
||||
}, tracingGroupSteps[tracingGroupSteps.length - 1]);
|
||||
userData.step = step;
|
||||
out.stepId = step.stepId;
|
||||
if (apiName === 'tracing.group') tracingGroupSteps.push(step);
|
||||
data.userData = step;
|
||||
data.stepId = step.stepId;
|
||||
if (data.apiName === 'tracing.group') tracingGroupSteps.push(step);
|
||||
},
|
||||
onApiCallEnd: (userData, error) => {
|
||||
onApiCallEnd: data => {
|
||||
// "tracing.group" step will end later, when "tracing.groupEnd" finishes.
|
||||
if (userData.apiName === 'tracing.group') return;
|
||||
if (userData.apiName === 'tracing.groupEnd') {
|
||||
if (data.apiName === 'tracing.group') return;
|
||||
if (data.apiName === 'tracing.groupEnd') {
|
||||
const step = tracingGroupSteps.pop();
|
||||
step === null || step === void 0 || step.complete({
|
||||
error
|
||||
error: data.error
|
||||
});
|
||||
return;
|
||||
}
|
||||
const step = userData.step;
|
||||
const step = data.userData;
|
||||
step === null || step === void 0 || step.complete({
|
||||
error
|
||||
error: data.error
|
||||
});
|
||||
},
|
||||
onWillPause: ({
|
||||
@@ -781,8 +790,9 @@ class ArtifactsRecorder {
|
||||
async didFinishTest() {
|
||||
const captureScreenshots = this._shouldCaptureScreenshotUponFinish();
|
||||
if (captureScreenshots) await this._screenshotOnTestFailure();
|
||||
const leftoverContexts = [];
|
||||
let leftoverContexts = [];
|
||||
for (const browserType of [this._playwright.chromium, this._playwright.firefox, this._playwright.webkit]) leftoverContexts.push(...browserType._contexts);
|
||||
leftoverContexts = leftoverContexts.filter(context => !this._reusedContexts.has(context));
|
||||
const leftoverApiRequests = Array.from(this._playwright.request._contexts);
|
||||
|
||||
// Collect traces/screenshots for remaining contexts.
|
||||
|
||||
Reference in New Issue
Block a user