@one2x/playwright 1.57.0-alpha.1 → 1.57.0-alpha.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.
- package/lib/mcp/sdk/http.js +12 -12
- package/package.json +2 -2
- package/lib/agents/generateAgents.js.map +0 -7
- package/lib/common/config.js.map +0 -7
- package/lib/common/configLoader.js.map +0 -7
- package/lib/common/esmLoaderHost.js.map +0 -7
- package/lib/common/expectBundle.js.map +0 -7
- package/lib/common/expectBundleImpl.js.map +0 -7
- package/lib/common/fixtures.js.map +0 -7
- package/lib/common/globals.js.map +0 -7
- package/lib/common/ipc.js.map +0 -7
- package/lib/common/poolBuilder.js.map +0 -7
- package/lib/common/process.js.map +0 -7
- package/lib/common/suiteUtils.js.map +0 -7
- package/lib/common/test.js.map +0 -7
- package/lib/common/testLoader.js.map +0 -7
- package/lib/common/testType.js.map +0 -7
- package/lib/common/validators.js.map +0 -7
- package/lib/fsWatcher.js.map +0 -7
- package/lib/index.js.map +0 -7
- package/lib/internalsForTest.js.map +0 -7
- package/lib/isomorphic/events.js.map +0 -7
- package/lib/isomorphic/folders.js.map +0 -7
- package/lib/isomorphic/stringInternPool.js.map +0 -7
- package/lib/isomorphic/teleReceiver.js.map +0 -7
- package/lib/isomorphic/teleSuiteUpdater.js.map +0 -7
- package/lib/isomorphic/testServerConnection.js.map +0 -7
- package/lib/isomorphic/testServerInterface.js.map +0 -7
- package/lib/isomorphic/testTree.js.map +0 -7
- package/lib/isomorphic/types.d.js.map +0 -7
- package/lib/loader/loaderMain.js.map +0 -7
- package/lib/matchers/expect.js.map +0 -7
- package/lib/matchers/matcherHint.js.map +0 -7
- package/lib/matchers/matchers.js.map +0 -7
- package/lib/matchers/toBeTruthy.js.map +0 -7
- package/lib/matchers/toEqual.js.map +0 -7
- package/lib/matchers/toHaveURL.js.map +0 -7
- package/lib/matchers/toMatchAriaSnapshot.js.map +0 -7
- package/lib/matchers/toMatchSnapshot.js.map +0 -7
- package/lib/matchers/toMatchText.js.map +0 -7
- package/lib/mcp/browser/actions.d.js.map +0 -7
- package/lib/mcp/browser/browserContextFactory.js.map +0 -7
- package/lib/mcp/browser/browserServerBackend.js.map +0 -7
- package/lib/mcp/browser/codegen.js.map +0 -7
- package/lib/mcp/browser/config.js.map +0 -7
- package/lib/mcp/browser/context.js.map +0 -7
- package/lib/mcp/browser/response.js.map +0 -7
- package/lib/mcp/browser/sessionLog.js.map +0 -7
- package/lib/mcp/browser/tab.js.map +0 -7
- package/lib/mcp/browser/tools/actionRetry.js.map +0 -7
- package/lib/mcp/browser/tools/common.js.map +0 -7
- package/lib/mcp/browser/tools/console.js.map +0 -7
- package/lib/mcp/browser/tools/dialogs.js.map +0 -7
- package/lib/mcp/browser/tools/evaluate.js.map +0 -7
- package/lib/mcp/browser/tools/files.js.map +0 -7
- package/lib/mcp/browser/tools/form.js.map +0 -7
- package/lib/mcp/browser/tools/install.js.map +0 -7
- package/lib/mcp/browser/tools/keyboard.js.map +0 -7
- package/lib/mcp/browser/tools/mouse.js.map +0 -7
- package/lib/mcp/browser/tools/navigate.js.map +0 -7
- package/lib/mcp/browser/tools/network.js.map +0 -7
- package/lib/mcp/browser/tools/pdf.js.map +0 -7
- package/lib/mcp/browser/tools/screenshot.js.map +0 -7
- package/lib/mcp/browser/tools/snapshot.js.map +0 -7
- package/lib/mcp/browser/tools/tabs.js.map +0 -7
- package/lib/mcp/browser/tools/tool.js.map +0 -7
- package/lib/mcp/browser/tools/tracing.js.map +0 -7
- package/lib/mcp/browser/tools/utils.js.map +0 -7
- package/lib/mcp/browser/tools/verify.js.map +0 -7
- package/lib/mcp/browser/tools/wait.js.map +0 -7
- package/lib/mcp/browser/tools.js.map +0 -7
- package/lib/mcp/browser/watchdog.js.map +0 -7
- package/lib/mcp/config.d.js.map +0 -7
- package/lib/mcp/extension/cdpRelay.js.map +0 -7
- package/lib/mcp/extension/extensionContextFactory.js.map +0 -7
- package/lib/mcp/extension/protocol.js.map +0 -7
- package/lib/mcp/index.js.map +0 -7
- package/lib/mcp/log.js.map +0 -7
- package/lib/mcp/program.js.map +0 -7
- package/lib/mcp/sdk/bundle.js.map +0 -7
- package/lib/mcp/sdk/exports.js.map +0 -7
- package/lib/mcp/sdk/http.js.map +0 -7
- package/lib/mcp/sdk/inProcessTransport.js.map +0 -7
- package/lib/mcp/sdk/mdb.js.map +0 -7
- package/lib/mcp/sdk/proxyBackend.js.map +0 -7
- package/lib/mcp/sdk/server.js.map +0 -7
- package/lib/mcp/sdk/tool.js.map +0 -7
- package/lib/mcp/test/browserBackend.js.map +0 -7
- package/lib/mcp/test/generatorTools.js.map +0 -7
- package/lib/mcp/test/plannerTools.js.map +0 -7
- package/lib/mcp/test/seed.js.map +0 -7
- package/lib/mcp/test/streams.js.map +0 -7
- package/lib/mcp/test/testBackend.js.map +0 -7
- package/lib/mcp/test/testContext.js.map +0 -7
- package/lib/mcp/test/testTool.js.map +0 -7
- package/lib/mcp/test/testTools.js.map +0 -7
- package/lib/mcpBundleImpl.js.map +0 -7
- package/lib/plugins/gitCommitInfoPlugin.js.map +0 -7
- package/lib/plugins/index.js.map +0 -7
- package/lib/plugins/webServerPlugin.js.map +0 -7
- package/lib/program.js.map +0 -7
- package/lib/reporters/base.js.map +0 -7
- package/lib/reporters/blob.js.map +0 -7
- package/lib/reporters/dot.js.map +0 -7
- package/lib/reporters/empty.js.map +0 -7
- package/lib/reporters/github.js.map +0 -7
- package/lib/reporters/html.js.map +0 -7
- package/lib/reporters/internalReporter.js.map +0 -7
- package/lib/reporters/json.js.map +0 -7
- package/lib/reporters/junit.js.map +0 -7
- package/lib/reporters/line.js.map +0 -7
- package/lib/reporters/list.js.map +0 -7
- package/lib/reporters/listModeReporter.js.map +0 -7
- package/lib/reporters/markdown.js.map +0 -7
- package/lib/reporters/merge.js.map +0 -7
- package/lib/reporters/multiplexer.js.map +0 -7
- package/lib/reporters/reporterV2.js.map +0 -7
- package/lib/reporters/teleEmitter.js.map +0 -7
- package/lib/reporters/versions/blobV1.js.map +0 -7
- package/lib/runner/dispatcher.js.map +0 -7
- package/lib/runner/failureTracker.js.map +0 -7
- package/lib/runner/lastRun.js.map +0 -7
- package/lib/runner/loadUtils.js.map +0 -7
- package/lib/runner/loaderHost.js.map +0 -7
- package/lib/runner/processHost.js.map +0 -7
- package/lib/runner/projectUtils.js.map +0 -7
- package/lib/runner/rebase.js.map +0 -7
- package/lib/runner/reporters.js.map +0 -7
- package/lib/runner/runner.js +0 -110
- package/lib/runner/sigIntWatcher.js.map +0 -7
- package/lib/runner/taskRunner.js.map +0 -7
- package/lib/runner/tasks.js.map +0 -7
- package/lib/runner/testGroups.js.map +0 -7
- package/lib/runner/testRunner.js.map +0 -7
- package/lib/runner/testServer.js.map +0 -7
- package/lib/runner/uiModeReporter.js.map +0 -7
- package/lib/runner/vcs.js.map +0 -7
- package/lib/runner/watchMode.js.map +0 -7
- package/lib/runner/workerHost.js.map +0 -7
- package/lib/third_party/pirates.js.map +0 -7
- package/lib/third_party/tsconfig-loader.js.map +0 -7
- package/lib/transform/babelBundle.js.map +0 -7
- package/lib/transform/babelBundleImpl.js.map +0 -7
- package/lib/transform/compilationCache.js.map +0 -7
- package/lib/transform/esmLoader.js.map +0 -7
- package/lib/transform/portTransport.js.map +0 -7
- package/lib/transform/transform.js.map +0 -7
- package/lib/util.js.map +0 -7
- package/lib/utilsBundle.js.map +0 -7
- package/lib/utilsBundleImpl.js.map +0 -7
- package/lib/worker/fixtureRunner.js.map +0 -7
- package/lib/worker/testInfo.js.map +0 -7
- package/lib/worker/testTracing.js.map +0 -7
- package/lib/worker/timeoutManager.js.map +0 -7
- package/lib/worker/util.js.map +0 -7
- package/lib/worker/workerMain.js.map +0 -7
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../src/common/fixtures.ts"],
|
|
4
|
-
"sourcesContent": ["/**\n * Copyright Microsoft Corporation. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport crypto from 'crypto';\n\nimport { filterStackFile, formatLocation } from '../util';\n\nimport type { FixturesWithLocation } from './config';\nimport type { Fixtures } from '../../types/test';\nimport type { Location } from '../../types/testReporter';\n\nexport type FixtureScope = 'test' | 'worker';\ntype FixtureAuto = boolean | 'all-hooks-included';\nconst kScopeOrder: FixtureScope[] = ['test', 'worker'];\ntype FixtureOptions = { auto?: FixtureAuto, scope?: FixtureScope, option?: boolean, timeout?: number | undefined, title?: string, box?: boolean | 'self' };\ntype FixtureTuple = [ value: any, options: FixtureOptions ];\nexport type FixtureRegistration = {\n // Fixture registration location.\n location: Location;\n // Fixture name comes from test.extend() call.\n name: string;\n scope: FixtureScope;\n // Either a fixture function, or a fixture value.\n fn: Function | any;\n // Auto fixtures always run without user explicitly mentioning them.\n auto: FixtureAuto;\n // An \"option\" fixture can have a value set in the config.\n option: boolean;\n // Custom title to be used instead of the name, internal-only.\n customTitle?: string;\n // Fixture with a separate timeout does not count towards the test time.\n timeout?: number;\n // Names of the dependencies, comes from the declaration \"({ foo, bar }) => {...}\"\n deps: string[];\n // Unique id, to differentiate between fixtures with the same name.\n id: string;\n // A fixture override can use the previous version of the fixture.\n super?: FixtureRegistration;\n // Whether this fixture is an option override value set from the config.\n optionOverride?: boolean;\n // Do not generate the step for this fixture, consider it internal.\n box?: boolean | 'self';\n};\nexport type LoadError = {\n message: string;\n location: Location;\n};\ntype LoadErrorSink = (error: LoadError) => void;\ntype OptionOverrides = {\n overrides: Fixtures,\n location: Location,\n};\n\nfunction isFixtureTuple(value: any): value is FixtureTuple {\n return Array.isArray(value) && typeof value[1] === 'object';\n}\n\nfunction isFixtureOption(value: any): value is FixtureTuple {\n return isFixtureTuple(value) && !!value[1].option;\n}\n\nexport class FixturePool {\n readonly digest: string;\n private readonly _registrations: Map<string, FixtureRegistration>;\n private _onLoadError: LoadErrorSink;\n\n constructor(fixturesList: FixturesWithLocation[], onLoadError: LoadErrorSink, parentPool?: FixturePool, disallowWorkerFixtures?: boolean, optionOverrides?: OptionOverrides) {\n this._registrations = new Map(parentPool ? parentPool._registrations : []);\n this._onLoadError = onLoadError;\n\n const allOverrides = optionOverrides?.overrides ?? {};\n const overrideKeys = new Set(Object.keys(allOverrides));\n for (const list of fixturesList) {\n this._appendFixtureList(list, !!disallowWorkerFixtures, false);\n\n // Process option overrides immediately after original option definitions,\n // so that any test.use() override it.\n const selectedOverrides: Fixtures = {};\n for (const [key, value] of Object.entries(list.fixtures)) {\n if (isFixtureOption(value) && overrideKeys.has(key))\n (selectedOverrides as any)[key] = [(allOverrides as any)[key], value[1]];\n }\n if (Object.entries(selectedOverrides).length)\n this._appendFixtureList({ fixtures: selectedOverrides, location: optionOverrides!.location }, !!disallowWorkerFixtures, true);\n }\n\n this.digest = this.validate();\n }\n\n private _appendFixtureList(list: FixturesWithLocation, disallowWorkerFixtures: boolean, isOptionsOverride: boolean) {\n const { fixtures, location } = list;\n for (const entry of Object.entries(fixtures)) {\n const name = entry[0];\n let value = entry[1];\n let options: { auto: FixtureAuto, scope: FixtureScope, option: boolean, timeout: number | undefined, customTitle?: string, box?: boolean | 'self' } | undefined;\n if (isFixtureTuple(value)) {\n options = {\n auto: value[1].auto ?? false,\n scope: value[1].scope || 'test',\n option: !!value[1].option,\n timeout: value[1].timeout,\n customTitle: value[1].title,\n box: value[1].box,\n };\n value = value[0];\n }\n let fn = value as (Function | any);\n\n const previous = this._registrations.get(name);\n if (previous && options) {\n if (previous.scope !== options.scope) {\n this._addLoadError(`Fixture \"${name}\" has already been registered as a { scope: '${previous.scope}' } fixture defined in ${formatLocation(previous.location)}.`, location);\n continue;\n }\n if (previous.auto !== options.auto) {\n this._addLoadError(`Fixture \"${name}\" has already been registered as a { auto: '${previous.scope}' } fixture defined in ${formatLocation(previous.location)}.`, location);\n continue;\n }\n } else if (previous) {\n // Note: deliberately not inheriting \"options.box\" so that fixture override is visible by default.\n options = { auto: previous.auto, scope: previous.scope, option: previous.option, timeout: previous.timeout, customTitle: previous.customTitle };\n } else if (!options) {\n options = { auto: false, scope: 'test', option: false, timeout: undefined };\n }\n\n if (!kScopeOrder.includes(options.scope)) {\n this._addLoadError(`Fixture \"${name}\" has unknown { scope: '${options.scope}' }.`, location);\n continue;\n }\n if (options.scope === 'worker' && disallowWorkerFixtures) {\n this._addLoadError(`Cannot use({ ${name} }) in a describe group, because it forces a new worker.\\nMake it top-level in the test file or put in the configuration file.`, location);\n continue;\n }\n\n // Overriding option with \"undefined\" value means setting it to the default value\n // from the config or from the original declaration of the option.\n if (fn === undefined && options.option && previous) {\n let original = previous;\n while (!original.optionOverride && original.super)\n original = original.super;\n fn = original.fn;\n }\n\n const deps = fixtureParameterNames(fn, location, e => this._onLoadError(e));\n const registration: FixtureRegistration = { id: '', name, location, scope: options.scope, fn, auto: options.auto, option: options.option, timeout: options.timeout, customTitle: options.customTitle, box: options.box, deps, super: previous, optionOverride: isOptionsOverride };\n registrationId(registration);\n this._registrations.set(name, registration);\n }\n }\n\n private validate() {\n const markers = new Map<FixtureRegistration, 'visiting' | 'visited'>();\n const stack: FixtureRegistration[] = [];\n let hasDependencyErrors = false;\n const addDependencyError = (message: string, location: Location) => {\n hasDependencyErrors = true;\n this._addLoadError(message, location);\n };\n const visit = (registration: FixtureRegistration, boxedOnly: boolean) => {\n markers.set(registration, 'visiting');\n stack.push(registration);\n for (const name of registration.deps) {\n const dep = this.resolve(name, registration);\n if (!dep) {\n if (name === registration.name)\n addDependencyError(`Fixture \"${registration.name}\" references itself, but does not have a base implementation.`, registration.location);\n else\n addDependencyError(`Fixture \"${registration.name}\" has unknown parameter \"${name}\".`, registration.location);\n continue;\n }\n if (kScopeOrder.indexOf(registration.scope) > kScopeOrder.indexOf(dep.scope)) {\n addDependencyError(`${registration.scope} fixture \"${registration.name}\" cannot depend on a ${dep.scope} fixture \"${name}\" defined in ${formatPotentiallyInternalLocation(dep.location)}.`, registration.location);\n continue;\n }\n if (!markers.has(dep)) {\n visit(dep, boxedOnly);\n } else if (markers.get(dep) === 'visiting') {\n const index = stack.indexOf(dep);\n const allRegs = stack.slice(index, stack.length);\n const filteredRegs = allRegs.filter(r => !r.box);\n const regs = boxedOnly ? filteredRegs : allRegs;\n const names = regs.map(r => `\"${r.name}\"`);\n addDependencyError(`Fixtures ${names.join(' -> ')} -> \"${dep.name}\" form a dependency cycle: ${regs.map(r => formatPotentiallyInternalLocation(r.location)).join(' -> ')} -> ${formatPotentiallyInternalLocation(dep.location)}`, dep.location);\n continue;\n }\n }\n markers.set(registration, 'visited');\n stack.pop();\n };\n\n const names = Array.from(this._registrations.keys()).sort();\n\n // First iterate over non-boxed fixtures to provide clear error messages.\n for (const name of names) {\n const registration = this._registrations.get(name)!;\n if (!registration.box)\n visit(registration, true);\n }\n\n // If no errors found, iterate over boxed fixtures\n if (!hasDependencyErrors) {\n for (const name of names) {\n const registration = this._registrations.get(name)!;\n if (registration.box)\n visit(registration, false);\n }\n }\n\n const hash = crypto.createHash('sha1');\n for (const name of names) {\n const registration = this._registrations.get(name)!;\n if (registration.scope === 'worker')\n hash.update(registration.id + ';');\n }\n return hash.digest('hex');\n }\n\n validateFunction(fn: Function, prefix: string, location: Location) {\n for (const name of fixtureParameterNames(fn, location, e => this._onLoadError(e))) {\n const registration = this._registrations.get(name);\n if (!registration)\n this._addLoadError(`${prefix} has unknown parameter \"${name}\".`, location);\n }\n }\n\n resolve(name: string, forFixture?: FixtureRegistration): FixtureRegistration | undefined {\n if (name === forFixture?.name)\n return forFixture.super;\n return this._registrations.get(name);\n }\n\n autoFixtures() {\n return [...this._registrations.values()].filter(r => r.auto !== false);\n }\n\n private _addLoadError(message: string, location: Location) {\n this._onLoadError({ message, location });\n }\n}\n\nconst signatureSymbol = Symbol('signature');\n\nexport function formatPotentiallyInternalLocation(location: Location): string {\n const isUserFixture = location && filterStackFile(location.file);\n return isUserFixture ? formatLocation(location) : '<builtin>';\n}\n\nexport function fixtureParameterNames(fn: Function | any, location: Location, onError: LoadErrorSink): string[] {\n if (typeof fn !== 'function')\n return [];\n if (!fn[signatureSymbol])\n fn[signatureSymbol] = innerFixtureParameterNames(fn, location, onError);\n return fn[signatureSymbol];\n}\n\nexport function inheritFixtureNames(from: Function, to: Function) {\n (to as any)[signatureSymbol] = (from as any)[signatureSymbol];\n}\n\nfunction innerFixtureParameterNames(fn: Function, location: Location, onError: LoadErrorSink): string[] {\n const text = filterOutComments(fn.toString());\n const match = text.match(/(?:async)?(?:\\s+function)?[^(]*\\(([^)]*)/);\n if (!match)\n return [];\n const trimmedParams = match[1].trim();\n if (!trimmedParams)\n return [];\n const [firstParam] = splitByComma(trimmedParams);\n if (firstParam[0] !== '{' || firstParam[firstParam.length - 1] !== '}') {\n onError({ message: 'First argument must use the object destructuring pattern: ' + firstParam, location });\n return [];\n }\n const props = splitByComma(firstParam.substring(1, firstParam.length - 1)).map(prop => {\n const colon = prop.indexOf(':');\n return colon === -1 ? prop.trim() : prop.substring(0, colon).trim();\n });\n const restProperty = props.find(prop => prop.startsWith('...'));\n if (restProperty) {\n onError({ message: `Rest property \"${restProperty}\" is not supported. List all used fixtures explicitly, separated by comma.`, location });\n return [];\n }\n return props;\n}\n\nfunction filterOutComments(s: string): string {\n const result: string[] = [];\n let commentState: 'none'|'singleline'|'multiline' = 'none';\n for (let i = 0; i < s.length; ++i) {\n if (commentState === 'singleline') {\n if (s[i] === '\\n')\n commentState = 'none';\n } else if (commentState === 'multiline') {\n if (s[i - 1] === '*' && s[i] === '/')\n commentState = 'none';\n } else if (commentState === 'none') {\n if (s[i] === '/' && s[i + 1] === '/') {\n commentState = 'singleline';\n } else if (s[i] === '/' && s[i + 1] === '*') {\n commentState = 'multiline';\n i += 2;\n } else {\n result.push(s[i]);\n }\n }\n }\n return result.join('');\n}\n\nfunction splitByComma(s: string) {\n const result: string[] = [];\n const stack: string[] = [];\n let start = 0;\n for (let i = 0; i < s.length; i++) {\n if (s[i] === '{' || s[i] === '[') {\n stack.push(s[i] === '{' ? '}' : ']');\n } else if (s[i] === stack[stack.length - 1]) {\n stack.pop();\n } else if (!stack.length && s[i] === ',') {\n const token = s.substring(start, i).trim();\n if (token)\n result.push(token);\n start = i + 1;\n }\n }\n const lastToken = s.substring(start).trim();\n if (lastToken)\n result.push(lastToken);\n return result;\n}\n\n// name + superId, fn -> id\nconst registrationIdMap = new Map<string, Map<Function | any, string>>();\nlet lastId = 0;\n\nfunction registrationId(registration: FixtureRegistration): string {\n if (registration.id)\n return registration.id;\n const key = registration.name + '@@@' + (registration.super ? registrationId(registration.super) : '');\n let map = registrationIdMap.get(key);\n if (!map) {\n map = new Map();\n registrationIdMap.set(key, map);\n }\n if (!map.has(registration.fn))\n map.set(registration.fn, String(lastId++));\n registration.id = map.get(registration.fn)!;\n return registration.id;\n}\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAgBA,oBAAmB;AAEnB,kBAAgD;AAQhD,MAAM,cAA8B,CAAC,QAAQ,QAAQ;AAwCrD,SAAS,eAAe,OAAmC;AACzD,SAAO,MAAM,QAAQ,KAAK,KAAK,OAAO,MAAM,CAAC,MAAM;AACrD;AAEA,SAAS,gBAAgB,OAAmC;AAC1D,SAAO,eAAe,KAAK,KAAK,CAAC,CAAC,MAAM,CAAC,EAAE;AAC7C;AAEO,MAAM,YAAY;AAAA,EAKvB,YAAY,cAAsC,aAA4B,YAA0B,wBAAkC,iBAAmC;AAC3K,SAAK,iBAAiB,IAAI,IAAI,aAAa,WAAW,iBAAiB,CAAC,CAAC;AACzE,SAAK,eAAe;AAEpB,UAAM,eAAe,iBAAi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M,UAAU,EAAE,CAAC,MAAM,KAAK;AACxC,YAAM,QAAQ,EAAE,UAAU,OAAO,CAAC,EAAE,KAAK;AACzC,UAAI;AACF,eAAO,KAAK,KAAK;AACnB,cAAQ,IAAI;AAAA,IACd;AAAA,EACF;AACA,QAAM,YAAY,EAAE,UAAU,KAAK,EAAE,KAAK;AAC1C,MAAI;AACF,WAAO,KAAK,SAAS;AACvB,SAAO;AACT;AAGA,MAAM,oBAAoB,oBAAI,IAAyC;AACvE,IAAI,SAAS;AAEb,SAAS,eAAe,cAA2C;AACjE,MAAI,aAAa;AACf,WAAO,aAAa;AACtB,QAAM,MAAM,aAAa,OAAO,SAAS,aAAa,QAAS,eAAe,aAAa,KAAK,IAAI;AACpG,MAAI,MAAM,kBAAkB,IAAI,GAAG;AACnC,MAAI,CAAC,KAAK;AACR,UAAM,oBAAI,IAAI;AACd,sBAAkB,IAAI,KAAK,GAAG;AAAA,EAChC;AACA,MAAI,CAAC,IAAI,IAAI,aAAa,EAAE;AAC1B,QAAI,IAAI,aAAa,IAAI,OAAO,QAAQ,CAAC;AAC3C,eAAa,KAAK,IAAI,IAAI,aAAa,EAAE;AACzC,SAAO,aAAa;AACtB;",
|
|
6
|
-
"names": ["names", "crypto"]
|
|
7
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../src/common/globals.ts"],
|
|
4
|
-
"sourcesContent": ["/**\n * Copyright Microsoft Corporation. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type { Suite } from './test';\nimport type { TestInfoImpl } from '../worker/testInfo';\n\nlet currentTestInfoValue: TestInfoImpl | null = null;\nexport function setCurrentTestInfo(testInfo: TestInfoImpl | null) {\n currentTestInfoValue = testInfo;\n}\nexport function currentTestInfo(): TestInfoImpl | null {\n return currentTestInfoValue;\n}\n\nlet currentFileSuite: Suite | undefined;\nexport function setCurrentlyLoadingFileSuite(suite: Suite | undefined) {\n currentFileSuite = suite;\n}\nexport function currentlyLoadingFileSuite() {\n return currentFileSuite;\n}\n\nlet _isWorkerProcess = false;\n\nexport function setIsWorkerProcess() {\n _isWorkerProcess = true;\n}\n\nexport function isWorkerProcess() {\n return _isWorkerProcess;\n}\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAmBA,IAAI,uBAA4C;AACzC,SAAS,mBAAmB,UAA+B;AAChE,yBAAuB;AACzB;AACO,SAAS,kBAAuC;AACrD,SAAO;AACT;AAEA,IAAI;AACG,SAAS,6BAA6B,OAA0B;AACrE,qBAAmB;AACrB;AACO,SAAS,4BAA4B;AAC1C,SAAO;AACT;AAEA,IAAI,mBAAmB;AAEhB,SAAS,qBAAqB;AACnC,qBAAmB;AACrB;AAEO,SAAS,kBAAkB;AAChC,SAAO;AACT;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
package/lib/common/ipc.js.map
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../src/common/ipc.ts"],
|
|
4
|
-
"sourcesContent": ["/**\n * Copyright Microsoft Corporation. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport util from 'util';\n\nimport { serializeCompilationCache } from '../transform/compilationCache';\n\nimport type { ConfigLocation, FullConfigInternal } from './config';\nimport type { ReporterDescription, TestInfoError, TestStatus } from '../../types/test';\nimport type { SerializedCompilationCache } from '../transform/compilationCache';\n\nexport type ConfigCLIOverrides = {\n debug?: boolean;\n failOnFlakyTests?: boolean;\n forbidOnly?: boolean;\n fullyParallel?: boolean;\n globalTimeout?: number;\n maxFailures?: number;\n outputDir?: string;\n preserveOutputDir?: boolean;\n quiet?: boolean;\n repeatEach?: number;\n retries?: number;\n reporter?: ReporterDescription[];\n additionalReporters?: ReporterDescription[];\n shard?: { current: number, total: number };\n timeout?: number;\n tsconfig?: string;\n ignoreSnapshots?: boolean;\n updateSnapshots?: 'all' | 'changed' | 'missing' | 'none';\n updateSourceMethod?: 'overwrite' | 'patch' | '3way';\n workers?: number | string;\n projects?: { name: string, use?: any }[],\n use?: any;\n};\n\nexport type SerializedConfig = {\n location: ConfigLocation;\n configCLIOverrides: ConfigCLIOverrides;\n compilationCache?: SerializedCompilationCache;\n metadata?: string;\n};\n\nexport type ProcessInitParams = {\n timeOrigin: number;\n processName: string;\n};\n\nexport type WorkerInitParams = {\n workerIndex: number;\n parallelIndex: number;\n repeatEachIndex: number;\n projectId: string;\n config: SerializedConfig;\n artifactsDir: string;\n pauseOnError: boolean;\n pauseAtEnd: boolean;\n};\n\nexport type TestBeginPayload = {\n testId: string;\n startWallTime: number; // milliseconds since unix epoch\n};\n\nexport type AttachmentPayload = {\n testId: string;\n name: string;\n path?: string;\n body?: string;\n contentType: string;\n stepId?: string;\n};\n\nexport type TestInfoErrorImpl = TestInfoError;\n\nexport type TestEndPayload = {\n testId: string;\n duration: number;\n status: TestStatus;\n errors: TestInfoErrorImpl[];\n hasNonRetriableError: boolean;\n expectedStatus: TestStatus;\n annotations: { type: string, description?: string }[];\n timeout: number;\n};\n\nexport type StepBeginPayload = {\n testId: string;\n stepId: string;\n parentStepId: string | undefined;\n title: string;\n category: string;\n wallTime: number; // milliseconds since unix epoch\n location?: { file: string, line: number, column: number };\n};\n\nexport type StepEndPayload = {\n testId: string;\n stepId: string;\n wallTime: number; // milliseconds since unix epoch\n error?: TestInfoErrorImpl;\n suggestedRebaseline?: string;\n annotations: { type: string, description?: string }[];\n};\n\nexport type TestEntry = {\n testId: string;\n retry: number;\n};\n\nexport type RunPayload = {\n file: string;\n entries: TestEntry[];\n};\n\nexport type DonePayload = {\n fatalErrors: TestInfoErrorImpl[];\n skipTestsDueToSetupFailure: string[]; // test ids\n fatalUnknownTestIds?: string[];\n stoppedDueToUnhandledErrorInTestFail?: boolean;\n};\n\nexport type TestOutputPayload = {\n text?: string;\n buffer?: string;\n};\n\nexport type TeardownErrorsPayload = {\n fatalErrors: TestInfoErrorImpl[];\n};\n\nexport type EnvProducedPayload = [string, string | null][];\n\nexport function serializeConfig(config: FullConfigInternal, passCompilationCache: boolean): SerializedConfig {\n const result: SerializedConfig = {\n location: { configDir: config.configDir, resolvedConfigFile: config.config.configFile },\n configCLIOverrides: config.configCLIOverrides,\n compilationCache: passCompilationCache ? serializeCompilationCache() : undefined,\n };\n\n try {\n result.metadata = JSON.stringify(config.config.metadata);\n } catch (error) {}\n\n return result;\n}\n\nexport function stdioChunkToParams(chunk: Uint8Array | string): TestOutputPayload {\n if (chunk instanceof Uint8Array)\n return { buffer: Buffer.from(chunk).toString('base64') };\n if (typeof chunk !== 'string')\n return { text: util.inspect(chunk) };\n return { text: chunk };\n}\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAgBA,kBAAiB;AAEjB,8BAA0C;AAgInC,SAAS,gBAAgB,QAA4B,sBAAiD;AAC3G,QAAM,SAA2B;AAAA,IAC/B,UAAU,EAAE,WAAW,OAAO,WAAW,oBAAoB,OAAO,OAAO,WAAW;AAAA,IACtF,oBAAoB,OAAO;AAAA,IAC3B,kBAAkB,2BAAuB,mDAA0B,IAAI;AAAA,EACzE;AAEA,MAAI;AACF,WAAO,WAAW,KAAK,UAAU,OAAO,OAAO,QAAQ;AAAA,EACzD,SAAS,OAAO;AAAA,EAAC;AAEjB,SAAO;AACT;AAEO,SAAS,mBAAmB,OAA+C;AAChF,MAAI,iBAAiB;AACnB,WAAO,EAAE,QAAQ,OAAO,KAAK,KAAK,EAAE,SAAS,QAAQ,EAAE;AACzD,MAAI,OAAO,UAAU;AACnB,WAAO,EAAE,MAAM,YAAAA,QAAK,QAAQ,KAAK,EAAE;AACrC,SAAO,EAAE,MAAM,MAAM;AACvB;",
|
|
6
|
-
"names": ["util"]
|
|
7
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../src/common/poolBuilder.ts"],
|
|
4
|
-
"sourcesContent": ["/**\n * Copyright Microsoft Corporation. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { FixturePool } from './fixtures';\nimport { formatLocation } from '../util';\n\nimport type { FullProjectInternal } from './config';\nimport type { LoadError } from './fixtures';\nimport type { Suite, TestCase } from './test';\nimport type { TestTypeImpl } from './testType';\nimport type { TestError } from '../../types/testReporter';\n\nexport class PoolBuilder {\n private _project: FullProjectInternal | undefined;\n private _testTypePools = new Map<TestTypeImpl, FixturePool>();\n private _type: 'loader' | 'worker';\n\n static createForLoader() {\n return new PoolBuilder('loader');\n }\n\n static createForWorker(project: FullProjectInternal) {\n return new PoolBuilder('worker', project);\n }\n\n private constructor(type: 'loader' | 'worker', project?: FullProjectInternal) {\n this._type = type;\n this._project = project;\n }\n\n buildPools(suite: Suite, testErrors?: TestError[]) {\n suite.forEachTest(test => {\n const pool = this._buildPoolForTest(test, testErrors);\n if (this._type === 'loader')\n test._poolDigest = pool.digest;\n if (this._type === 'worker')\n test._pool = pool;\n });\n }\n\n private _buildPoolForTest(test: TestCase, testErrors?: TestError[]): FixturePool {\n let pool = this._buildTestTypePool(test._testType, testErrors);\n\n const parents: Suite[] = [];\n for (let parent: Suite | undefined = test.parent; parent; parent = parent.parent)\n parents.push(parent);\n parents.reverse();\n\n for (const parent of parents) {\n if (parent._use.length)\n pool = new FixturePool(parent._use, e => this._handleLoadError(e, testErrors), pool, parent._type === 'describe');\n for (const hook of parent._hooks)\n pool.validateFunction(hook.fn, hook.type + ' hook', hook.location);\n for (const modifier of parent._modifiers)\n pool.validateFunction(modifier.fn, modifier.type + ' modifier', modifier.location);\n }\n\n pool.validateFunction(test.fn, 'Test', test.location);\n return pool;\n }\n\n private _buildTestTypePool(testType: TestTypeImpl, testErrors?: TestError[]): FixturePool {\n if (!this._testTypePools.has(testType)) {\n const optionOverrides = {\n overrides: this._project?.project?.use ?? {},\n location: { file: `project#${this._project?.id}`, line: 1, column: 1 }\n };\n const pool = new FixturePool(testType.fixtures, e => this._handleLoadError(e, testErrors), undefined, undefined, optionOverrides);\n this._testTypePools.set(testType, pool);\n }\n return this._testTypePools.get(testType)!;\n }\n\n private _handleLoadError(e: LoadError, testErrors?: TestError[]): void {\n if (testErrors)\n testErrors.push(e);\n else\n throw new Error(`${formatLocation(e.location)}: ${e.message}`);\n }\n}\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAgBA,sBAA4B;AAC5B,kBAA+B;AAQxB,MAAM,YAAY;AAAA,EAaf,YAAY,MAA2B,SAA+B;AAX9E,SAAQ,iBAAiB,oBAAI,IAA+B;AAY1D,SAAK,QAAQ;AACb,SAAK,WAAW;AAA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AM,GAAG,QAAQ,EAAE;AAAA,MACvE;AACA,YAAM,OAAO,IAAI,4BAAY,SAAS,UAAU,OAAK,KAAK,iBAAiB,GAAG,UAAU,GAAG,QAAW,QAAW,eAAe;AAChI,WAAK,eAAe,IAAI,UAAU,IAAI;AAAA,IACxC;AACA,WAAO,KAAK,eAAe,IAAI,QAAQ;AAAA,EACzC;AAAA,EAEQ,iBAAiB,GAAc,YAAgC;AACrE,QAAI;AACF,iBAAW,KAAK,CAAC;AAAA;AAEjB,YAAM,IAAI,MAAM,OAAG,4BAAe,EAAE,QAAQ,CAAC,KAAK,EAAE,OAAO,EAAE;AAAA,EACjE;AACF;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../src/common/process.ts"],
|
|
4
|
-
"sourcesContent": ["/**\n * Copyright Microsoft Corporation. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { setTimeOrigin, startProfiling, stopProfiling } from 'playwright-core/lib/utils';\n\nimport { serializeError } from '../util';\n\nimport type { EnvProducedPayload, ProcessInitParams, TestInfoErrorImpl } from './ipc';\n\nexport type ProtocolRequest = {\n id: number;\n method: string;\n params?: any;\n};\n\nexport type ProtocolResponse = {\n id?: number;\n error?: TestInfoErrorImpl;\n method?: string;\n params?: any;\n result?: any;\n};\n\nexport class ProcessRunner {\n async gracefullyClose(): Promise<void> { }\n\n protected dispatchEvent(method: string, params: any) {\n const response: ProtocolResponse = { method, params };\n sendMessageToParent({ method: '__dispatch__', params: response });\n }\n}\n\nlet gracefullyCloseCalled = false;\nlet forceExitInitiated = false;\n\nsendMessageToParent({ method: 'ready' });\n\nprocess.on('disconnect', () => gracefullyCloseAndExit(true));\nprocess.on('SIGINT', () => {});\nprocess.on('SIGTERM', () => {});\n\nlet processRunner: ProcessRunner | undefined;\nlet processName: string | undefined;\nconst startingEnv = { ...process.env };\n\nprocess.on('message', async (message: any) => {\n if (message.method === '__init__') {\n const { processParams, runnerParams, runnerScript } = message.params as { processParams: ProcessInitParams, runnerParams: any, runnerScript: string };\n void startProfiling();\n setTimeOrigin(processParams.timeOrigin);\n const { create } = require(runnerScript);\n processRunner = create(runnerParams) as ProcessRunner;\n processName = processParams.processName;\n return;\n }\n if (message.method === '__stop__') {\n const keys = new Set([...Object.keys(process.env), ...Object.keys(startingEnv)]);\n const producedEnv: EnvProducedPayload = [...keys].filter(key => startingEnv[key] !== process.env[key]).map(key => [key, process.env[key] ?? null]);\n sendMessageToParent({ method: '__env_produced__', params: producedEnv });\n await gracefullyCloseAndExit(false);\n return;\n }\n if (message.method === '__dispatch__') {\n const { id, method, params } = message.params as ProtocolRequest;\n try {\n const result = await (processRunner as any)[method](params);\n const response: ProtocolResponse = { id, result };\n sendMessageToParent({ method: '__dispatch__', params: response });\n } catch (e) {\n const response: ProtocolResponse = { id, error: serializeError(e) };\n sendMessageToParent({ method: '__dispatch__', params: response });\n }\n }\n});\n\nconst kForceExitTimeout = +(process.env.PWTEST_FORCE_EXIT_TIMEOUT || 30000);\n\nasync function gracefullyCloseAndExit(forceExit: boolean) {\n if (forceExit && !forceExitInitiated) {\n forceExitInitiated = true;\n // Force exit after 30 seconds.\n // eslint-disable-next-line no-restricted-properties\n setTimeout(() => process.exit(0), kForceExitTimeout);\n }\n if (!gracefullyCloseCalled) {\n gracefullyCloseCalled = true;\n // Meanwhile, try to gracefully shutdown.\n await processRunner?.gracefullyClose().catch(() => {});\n if (processName)\n await stopProfiling(processName).catch(() => {});\n // eslint-disable-next-line no-restricted-properties\n process.exit(0);\n }\n}\n\nfunction sendMessageToParent(message: { method: string, params?: any }) {\n try {\n process.send!(message);\n } catch (e) {\n try {\n // By default, the IPC messages are serialized as JSON.\n JSON.stringify(message);\n } catch {\n // Always throw serialization errors.\n throw e;\n }\n // Can throw when closing.\n }\n}\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAgBA,mBAA6D;AAE7D,kBAA+B;AAkBxB,MAAM,cAAc;AAAA,EACzB,MAAM,kBAAiC;AAAA,EAAE;AAAA,EAE/B,cAAc,QAAgB,QAAa;AACnD,UAAM,WAA6B,EAAE,QAAQ,OAAO;AACpD,wBAAoB,EAAE,QAAQ,gBAAgB,QAAQ,SAAS,CAAC;AAAA,EAClE;AACF;AAEA,IAAI,wBAAwB;AAC5B,IAAI,qBAAqB;AAEzB,oBAAoB,EAAE,QAAQ,QAAQ,CAAC;AAEvC,QAAQ,GAAG,cAAc,MAAM,uBAAuB,IAAI,CAAC;AAC3D,QAAQ,GAAG,UAAU,MAAM;AAAC,CAAC;AAC7B,QAAQ,GAAG,WAAW,MAAM;AAAC,CAAC;AAE9B,IAAI;AACJ,IAAI;AACJ,MAAM,cAAc,EAAE,GAAG,QAAQ,IAAI;AAErC,QAAQ,GAAG,WAAW,OAAO,YAAiB;AAC5C,MAAI,QAAQ,WAAW,YAAY;AACjC,UAAM,EAAE,eAAe,cAAc,aAAa,IAAI,QAAQ;AAC9D,aAAK,6BAAe;AACpB,oCAAc,cAAc,UAAU;AACtC,UAAM,EAAE,OAAO,IAAI,QAAQ,YAAY;AACvC,oBAAgB,OAAO,YAAY;AACnC,kBAAc,cAAc;AAC5B;AAAA,EACF;AACA,MAAI,QAAQ,WAAW,YAAY;AACjC,UAAM,OAAO,oBAAI,IAAI,CAAC,GAAG,OAAO,KAAK,QAAQ,GAAG,GAAG,GAAG,OAAO,KAAK,WAAW,CAAC,CAAC;AAC/E,UAAM,cAAkC,CAAC,GAAG,IAAI,EAA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
"names": []
|
|
7
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../src/common/suiteUtils.ts"],
|
|
4
|
-
"sourcesContent": ["/**\n* Copyright Microsoft Corporation. All rights reserved.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\nimport path from 'path';\n\nimport { calculateSha1, toPosixPath } from 'playwright-core/lib/utils';\n\nimport { createFileMatcher } from '../util';\n\nimport type { FullProjectInternal } from './config';\nimport type { Suite, TestCase } from './test';\nimport type { TestCaseFilter, TestFileFilter } from '../util';\n\n\nexport function filterSuite(suite: Suite, suiteFilter: (suites: Suite) => boolean, testFilter: TestCaseFilter) {\n for (const child of suite.suites) {\n if (!suiteFilter(child))\n filterSuite(child, suiteFilter, testFilter);\n }\n const filteredTests = suite.tests.filter(testFilter);\n const entries = new Set([...suite.suites, ...filteredTests]);\n suite._entries = suite._entries.filter(e => entries.has(e)); // Preserve the order.\n}\n\nexport function filterTestsRemoveEmptySuites(suite: Suite, filter: TestCaseFilter): boolean {\n const filteredSuites = suite.suites.filter(child => filterTestsRemoveEmptySuites(child, filter));\n const filteredTests = suite.tests.filter(filter);\n const entries = new Set([...filteredSuites, ...filteredTests]);\n suite._entries = suite._entries.filter(e => entries.has(e)); // Preserve the order.\n return !!suite._entries.length;\n}\n\nexport function bindFileSuiteToProject(project: FullProjectInternal, suite: Suite): Suite {\n const relativeFile = path.relative(project.project.testDir, suite.location!.file);\n const fileId = calculateSha1(toPosixPath(relativeFile)).slice(0, 20);\n\n // Clone suite.\n const result = suite._deepClone();\n result._fileId = fileId;\n\n // Assign test properties with project-specific values.\n result.forEachTest((test, suite) => {\n suite._fileId = fileId;\n // At the point of the query, suite is not yet attached to the project, so we only get file, describe and test titles.\n const [file, ...titles] = test.titlePath();\n const testIdExpression = `[project=${project.id}]${toPosixPath(file)}\\x1e${titles.join('\\x1e')}`;\n const testId = fileId + '-' + calculateSha1(testIdExpression).slice(0, 20);\n test.id = testId;\n test._projectId = project.id;\n\n // Inherit properties from parent suites.\n let inheritedRetries: number | undefined;\n let inheritedTimeout: number | undefined;\n for (let parentSuite: Suite | undefined = suite; parentSuite; parentSuite = parentSuite.parent) {\n if (parentSuite._staticAnnotations.length)\n test.annotations.unshift(...parentSuite._staticAnnotations);\n if (inheritedRetries === undefined && parentSuite._retries !== undefined)\n inheritedRetries = parentSuite._retries;\n if (inheritedTimeout === undefined && parentSuite._timeout !== undefined)\n inheritedTimeout = parentSuite._timeout;\n }\n test.retries = inheritedRetries ?? project.project.retries;\n test.timeout = inheritedTimeout ?? project.project.timeout;\n\n // Skip annotations imply skipped expectedStatus.\n if (test.annotations.some(a => a.type === 'skip' || a.type === 'fixme'))\n test.expectedStatus = 'skipped';\n\n // We only compute / set digest in the runner.\n if (test._poolDigest)\n test._workerHash = `${project.id}-${test._poolDigest}-0`;\n });\n\n return result;\n}\n\nexport function applyRepeatEachIndex(project: FullProjectInternal, fileSuite: Suite, repeatEachIndex: number) {\n // Assign test properties with project-specific values.\n fileSuite.forEachTest((test, suite) => {\n if (repeatEachIndex) {\n const [file, ...titles] = test.titlePath();\n const testIdExpression = `[project=${project.id}]${toPosixPath(file)}\\x1e${titles.join('\\x1e')} (repeat:${repeatEachIndex})`;\n const testId = suite._fileId + '-' + calculateSha1(testIdExpression).slice(0, 20);\n test.id = testId;\n test.repeatEachIndex = repeatEachIndex;\n\n if (test._poolDigest)\n test._workerHash = `${project.id}-${test._poolDigest}-${repeatEachIndex}`;\n }\n });\n}\n\nexport function filterOnly(suite: Suite) {\n if (!suite._getOnlyItems().length)\n return;\n const suiteFilter = (suite: Suite) => suite._only;\n const testFilter = (test: TestCase) => test._only;\n return filterSuiteWithOnlySemantics(suite, suiteFilter, testFilter);\n}\n\nfunction filterSuiteWithOnlySemantics(suite: Suite, suiteFilter: (suites: Suite) => boolean, testFilter: TestCaseFilter) {\n const onlySuites = suite.suites.filter(child => filterSuiteWithOnlySemantics(child, suiteFilter, testFilter) || suiteFilter(child));\n const onlyTests = suite.tests.filter(testFilter);\n const onlyEntries = new Set([...onlySuites, ...onlyTests]);\n if (onlyEntries.size) {\n suite._entries = suite._entries.filter(e => onlyEntries.has(e)); // Preserve the order.\n return true;\n }\n return false;\n}\n\nexport function filterByFocusedLine(suite: Suite, focusedTestFileLines: TestFileFilter[]) {\n if (!focusedTestFileLines.length)\n return;\n const matchers = focusedTestFileLines.map(createFileMatcherFromFilter);\n const testFileLineMatches = (testFileName: string, testLine: number, testColumn: number) => matchers.some(m => m(testFileName, testLine, testColumn));\n const suiteFilter = (suite: Suite) => !!suite.location && testFileLineMatches(suite.location.file, suite.location.line, suite.location.column);\n const testFilter = (test: TestCase) => testFileLineMatches(test.location.file, test.location.line, test.location.column);\n return filterSuite(suite, suiteFilter, testFilter);\n}\n\nfunction createFileMatcherFromFilter(filter: TestFileFilter) {\n const fileMatcher = createFileMatcher(filter.re || filter.exact || '');\n return (testFileName: string, testLine: number, testColumn: number) =>\n fileMatcher(testFileName) && (filter.line === testLine || filter.line === null) && (filter.column === testColumn || filter.column === null);\n}\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAgBA,kBAAiB;AAEjB,mBAA2C;AAE3C,kBAAkC;AAO3B,SAAS,YAAY,OAAc,aAAyC,YAA4B;AAC7G,aAAW,SAAS,MAAM,QAAQ;AAChC,QAAI,CAAC,YAAY,KAAK;AACpB,kBAAY,OAAO,aAAa,UAAU;AAAA,EAC9C;AACA,QAAM,gB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M,YAAY,MAAM,MAAM,OAAO,UAAU;AAC/C,QAAM,cAAc,oBAAI,IAAI,CAAC,GAAG,YAAY,GAAG,SAAS,CAAC;AACzD,MAAI,YAAY,MAAM;AACpB,UAAM,WAAW,MAAM,SAAS,OAAO,OAAK,YAAY,IAAI,CAAC,CAAC;AAC9D,WAAO;AAAA,EACT;AACA,SAAO;AACT;AAEO,SAAS,oBAAoB,OAAc,sBAAwC;AACxF,MAAI,CAAC,qBAAqB;AACxB;AACF,QAAM,WAAW,qBAAqB,IAAI,2BAA2B;AACrE,QAAM,sBAAsB,CAAC,cAAsB,UAAkB,eAAuB,SAAS,KAAK,OAAK,EAAE,cAAc,UAAU,UAAU,CAAC;AACpJ,QAAM,cAAc,CAACA,WAAiB,CAAC,CAACA,OAAM,YAAY,oBAAoBA,OAAM,SAAS,MAAMA,OAAM,SAAS,MAAMA,OAAM,SAAS,MAAM;AAC7I,QAAM,aAAa,CAAC,SAAmB,oBAAoB,KAAK,SAAS,MAAM,KAAK,SAAS,MAAM,KAAK,SAAS,MAAM;AACvH,SAAO,YAAY,OAAO,aAAa,UAAU;AACnD;AAEA,SAAS,4BAA4B,QAAwB;AAC3D,QAAM,kBAAc,+BAAkB,OAAO,MAAM,OAAO,SAAS,EAAE;AACrE,SAAO,CAAC,cAAsB,UAAkB,eAC9C,YAAY,YAAY,MAAM,OAAO,SAAS,YAAY,OAAO,SAAS,UAAU,OAAO,WAAW,cAAc,OAAO,WAAW;AAC1I;",
|
|
6
|
-
"names": ["path", "suite"]
|
|
7
|
-
}
|
package/lib/common/test.js.map
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../src/common/test.ts"],
|
|
4
|
-
"sourcesContent": ["/**\n * Copyright Microsoft Corporation. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { rootTestType } from './testType';\nimport { computeTestCaseOutcome } from '../isomorphic/teleReceiver';\n\nimport type { FixturesWithLocation, FullProjectInternal } from './config';\nimport type { FixturePool } from './fixtures';\nimport type { TestTypeImpl } from './testType';\nimport type { TestAnnotation } from '../../types/test';\nimport type * as reporterTypes from '../../types/testReporter';\nimport type { FullProject, Location } from '../../types/testReporter';\n\n\nclass Base {\n title: string;\n _only = false;\n _requireFile: string = '';\n\n constructor(title: string) {\n this.title = title;\n }\n}\n\nexport type Modifier = {\n type: 'slow' | 'fixme' | 'skip' | 'fail',\n fn: Function,\n location: Location,\n description: string | undefined\n};\n\nexport class Suite extends Base {\n location?: Location;\n parent?: Suite;\n _use: FixturesWithLocation[] = [];\n _entries: (Suite | TestCase)[] = [];\n _hooks: { type: 'beforeEach' | 'afterEach' | 'beforeAll' | 'afterAll', fn: Function, title: string, location: Location }[] = [];\n _timeout: number | undefined;\n _retries: number | undefined;\n // Annotations known statically before running the test, e.g. `test.describe.skip()` or `test.describe({ annotation }, body)`.\n _staticAnnotations: TestAnnotation[] = [];\n // Explicitly declared tags that are not a part of the title.\n _tags: string[] = [];\n _modifiers: Modifier[] = [];\n _parallelMode: 'none' | 'default' | 'serial' | 'parallel' = 'none';\n _fullProject: FullProjectInternal | undefined;\n _fileId: string | undefined;\n readonly _type: 'root' | 'project' | 'file' | 'describe';\n\n constructor(title: string, type: 'root' | 'project' | 'file' | 'describe') {\n super(title);\n this._type = type;\n }\n\n get type(): 'root' | 'project' | 'file' | 'describe' {\n return this._type;\n }\n\n entries() {\n return this._entries;\n }\n\n get suites(): Suite[] {\n return this._entries.filter(entry => entry instanceof Suite) as Suite[];\n }\n\n get tests(): TestCase[] {\n return this._entries.filter(entry => entry instanceof TestCase) as TestCase[];\n }\n\n _addTest(test: TestCase) {\n test.parent = this;\n this._entries.push(test);\n }\n\n _addSuite(suite: Suite) {\n suite.parent = this;\n this._entries.push(suite);\n }\n\n _prependSuite(suite: Suite) {\n suite.parent = this;\n this._entries.unshift(suite);\n }\n\n allTests(): TestCase[] {\n const result: TestCase[] = [];\n const visit = (suite: Suite) => {\n for (const entry of suite._entries) {\n if (entry instanceof Suite)\n visit(entry);\n else\n result.push(entry);\n }\n };\n visit(this);\n return result;\n }\n\n _hasTests(): boolean {\n let result = false;\n const visit = (suite: Suite) => {\n for (const entry of suite._entries) {\n if (result)\n return;\n if (entry instanceof Suite)\n visit(entry);\n else\n result = true;\n }\n };\n visit(this);\n return result;\n }\n\n titlePath(): string[] {\n const titlePath = this.parent ? this.parent.titlePath() : [];\n // Ignore anonymous describe blocks.\n if (this.title || this._type !== 'describe')\n titlePath.push(this.title);\n return titlePath;\n }\n\n _collectGrepTitlePath(path: string[]) {\n if (this.parent)\n this.parent._collectGrepTitlePath(path);\n if (this.title || this._type !== 'describe')\n path.push(this.title);\n path.push(...this._tags);\n }\n\n _getOnlyItems(): (TestCase | Suite)[] {\n const items: (TestCase | Suite)[] = [];\n if (this._only)\n items.push(this);\n for (const suite of this.suites)\n items.push(...suite._getOnlyItems());\n items.push(...this.tests.filter(test => test._only));\n return items;\n }\n\n _deepClone(): Suite {\n const suite = this._clone();\n for (const entry of this._entries) {\n if (entry instanceof Suite)\n suite._addSuite(entry._deepClone());\n else\n suite._addTest(entry._clone());\n }\n return suite;\n }\n\n _deepSerialize(): any {\n const suite = this._serialize();\n suite.entries = [];\n for (const entry of this._entries) {\n if (entry instanceof Suite)\n suite.entries.push(entry._deepSerialize());\n else\n suite.entries.push(entry._serialize());\n }\n return suite;\n }\n\n static _deepParse(data: any): Suite {\n const suite = Suite._parse(data);\n for (const entry of data.entries) {\n if (entry.kind === 'suite')\n suite._addSuite(Suite._deepParse(entry));\n else\n suite._addTest(TestCase._parse(entry));\n }\n return suite;\n }\n\n forEachTest(visitor: (test: TestCase, suite: Suite) => void) {\n for (const entry of this._entries) {\n if (entry instanceof Suite)\n entry.forEachTest(visitor);\n else\n visitor(entry, this);\n }\n }\n\n _serialize(): any {\n return {\n kind: 'suite',\n title: this.title,\n type: this._type,\n location: this.location,\n only: this._only,\n requireFile: this._requireFile,\n timeout: this._timeout,\n retries: this._retries,\n staticAnnotations: this._staticAnnotations.slice(),\n tags: this._tags.slice(),\n modifiers: this._modifiers.slice(),\n parallelMode: this._parallelMode,\n hooks: this._hooks.map(h => ({ type: h.type, location: h.location, title: h.title })),\n fileId: this._fileId,\n };\n }\n\n static _parse(data: any): Suite {\n const suite = new Suite(data.title, data.type);\n suite.location = data.location;\n suite._only = data.only;\n suite._requireFile = data.requireFile;\n suite._timeout = data.timeout;\n suite._retries = data.retries;\n suite._staticAnnotations = data.staticAnnotations;\n suite._tags = data.tags;\n suite._modifiers = data.modifiers;\n suite._parallelMode = data.parallelMode;\n suite._hooks = data.hooks.map((h: any) => ({ type: h.type, location: h.location, title: h.title, fn: () => { } }));\n suite._fileId = data.fileId;\n return suite;\n }\n\n _clone(): Suite {\n const data = this._serialize();\n const suite = Suite._parse(data);\n suite._use = this._use.slice();\n suite._hooks = this._hooks.slice();\n suite._fullProject = this._fullProject;\n return suite;\n }\n\n project(): FullProject | undefined {\n return this._fullProject?.project || this.parent?.project();\n }\n}\n\nexport class TestCase extends Base implements reporterTypes.TestCase {\n fn: Function;\n results: reporterTypes.TestResult[] = [];\n location: Location;\n parent!: Suite;\n type: 'test' = 'test';\n\n expectedStatus: reporterTypes.TestStatus = 'passed';\n timeout = 0;\n annotations: TestAnnotation[] = [];\n retries = 0;\n repeatEachIndex = 0;\n\n _testType: TestTypeImpl;\n id = '';\n _pool: FixturePool | undefined;\n _poolDigest = '';\n _workerHash = '';\n _projectId = '';\n // Explicitly declared tags that are not a part of the title.\n _tags: string[] = [];\n\n constructor(title: string, fn: Function, testType: TestTypeImpl, location: Location) {\n super(title);\n this.fn = fn;\n this._testType = testType;\n this.location = location;\n }\n\n titlePath(): string[] {\n const titlePath = this.parent ? this.parent.titlePath() : [];\n titlePath.push(this.title);\n return titlePath;\n }\n\n outcome(): 'skipped' | 'expected' | 'unexpected' | 'flaky' {\n return computeTestCaseOutcome(this);\n }\n\n ok(): boolean {\n const status = this.outcome();\n return status === 'expected' || status === 'flaky' || status === 'skipped';\n }\n\n get tags(): string[] {\n const titleTags = this._grepBaseTitlePath().join(' ').match(/@[\\S]+/g) || [];\n\n return [\n ...titleTags,\n ...this._tags,\n ];\n }\n\n _serialize(): any {\n return {\n kind: 'test',\n id: this.id,\n title: this.title,\n retries: this.retries,\n timeout: this.timeout,\n expectedStatus: this.expectedStatus,\n location: this.location,\n only: this._only,\n requireFile: this._requireFile,\n poolDigest: this._poolDigest,\n workerHash: this._workerHash,\n annotations: this.annotations.slice(),\n tags: this._tags.slice(),\n projectId: this._projectId,\n };\n }\n\n static _parse(data: any): TestCase {\n const test = new TestCase(data.title, () => {}, rootTestType, data.location);\n test.id = data.id;\n test.retries = data.retries;\n test.timeout = data.timeout;\n test.expectedStatus = data.expectedStatus;\n test._only = data.only;\n test._requireFile = data.requireFile;\n test._poolDigest = data.poolDigest;\n test._workerHash = data.workerHash;\n test.annotations = data.annotations;\n test._tags = data.tags;\n test._projectId = data.projectId;\n return test;\n }\n\n _clone(): TestCase {\n const data = this._serialize();\n const test = TestCase._parse(data);\n test._testType = this._testType;\n test.fn = this.fn;\n return test;\n }\n\n _appendTestResult(): reporterTypes.TestResult {\n const result: reporterTypes.TestResult = {\n retry: this.results.length,\n parallelIndex: -1,\n workerIndex: -1,\n duration: 0,\n startTime: new Date(),\n stdout: [],\n stderr: [],\n attachments: [],\n status: 'skipped',\n steps: [],\n errors: [],\n annotations: [],\n };\n this.results.push(result);\n return result;\n }\n\n _grepBaseTitlePath(): string[] {\n const path: string[] = [];\n this.parent._collectGrepTitlePath(path);\n path.push(this.title);\n return path;\n }\n\n _grepTitleWith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AC5C,UAAM,SAAmC;AAAA,MACvC,OAAO,KAAK,QAAQ;AAAA,MACpB,eAAe;AAAA,MACf,aAAa;AAAA,MACb,UAAU;AAAA,MACV,WAAW,oBAAI,KAAK;AAAA,MACpB,QAAQ,CAAC;AAAA,MACT,QAAQ,CAAC;AAAA,MACT,aAAa,CAAC;AAAA,MACd,QAAQ;AAAA,MACR,OAAO,CAAC;AAAA,MACR,QAAQ,CAAC;AAAA,MACT,aAAa,CAAC;AAAA,IAChB;AACA,SAAK,QAAQ,KAAK,MAAM;AACxB,WAAO;AAAA,EACT;AAAA,EAEA,qBAA+B;AAC7B,UAAM,OAAiB,CAAC;AACxB,SAAK,OAAO,sBAAsB,IAAI;AACtC,SAAK,KAAK,KAAK,KAAK;AACpB,WAAO;AAAA,EACT;AAAA,EAEA,qBAA6B;AAC3B,UAAM,OAAO,KAAK,mBAAmB;AACrC,SAAK,KAAK,GAAG,KAAK,KAAK;AACvB,WAAO,KAAK,KAAK,GAAG;AAAA,EACtB;AACF;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../src/common/testLoader.ts"],
|
|
4
|
-
"sourcesContent": ["/**\n * Copyright Microsoft Corporation. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport path from 'path';\nimport util from 'util';\n\nimport * as esmLoaderHost from './esmLoaderHost';\nimport { isWorkerProcess, setCurrentlyLoadingFileSuite } from './globals';\nimport { Suite } from './test';\nimport { startCollectingFileDeps, stopCollectingFileDeps } from '../transform/compilationCache';\nimport { requireOrImport } from '../transform/transform';\nimport { filterStackTrace } from '../util';\n\nimport type { TestError } from '../../types/testReporter';\nimport type { FullConfigInternal } from './config';\n\nexport const defaultTimeout = 30000;\n\n// To allow multiple loaders in the same process without clearing require cache,\n// we make these maps global.\nconst cachedFileSuites = new Map<string, Suite>();\n\nexport async function loadTestFile(file: string, config: FullConfigInternal, testErrors?: TestError[]): Promise<Suite> {\n if (cachedFileSuites.has(file))\n return cachedFileSuites.get(file)!;\n const suite = new Suite(path.relative(config.config.rootDir, file) || path.basename(file), 'file');\n suite._requireFile = file;\n suite.location = { file, line: 0, column: 0 };\n suite._tags = [...config.config.tags];\n\n setCurrentlyLoadingFileSuite(suite);\n if (!isWorkerProcess()) {\n startCollectingFileDeps();\n await esmLoaderHost.startCollectingFileDeps();\n }\n try {\n await requireOrImport(file);\n cachedFileSuites.set(file, suite);\n } catch (e) {\n if (!testErrors)\n throw e;\n testErrors.push(serializeLoadError(file, e));\n } finally {\n setCurrentlyLoadingFileSuite(undefined);\n if (!isWorkerProcess()) {\n stopCollectingFileDeps(file);\n await esmLoaderHost.stopCollectingFileDeps(file);\n }\n }\n\n {\n // Test locations that we discover potentially have different file name.\n // This could be due to either\n // a) use of source maps or due to\n // b) require of one file from another.\n // Try fixing (a) w/o regressing (b).\n\n const files = new Set<string>();\n suite.allTests().map(t => files.add(t.location.file));\n if (files.size === 1) {\n // All tests point to one file.\n const mappedFile = files.values().next().value!;\n if (suite.location.file !== mappedFile) {\n // The file is different, check for a likely source map case.\n if (path.extname(mappedFile) !== path.extname(suite.location.file))\n suite.location.file = mappedFile;\n }\n }\n }\n\n return suite;\n}\n\nfunction serializeLoadError(file: string, error: Error | any): TestError {\n if (error instanceof Error) {\n const result: TestError = filterStackTrace(error);\n // Babel parse errors have location.\n const loc = (error as any).loc;\n result.location = loc ? {\n file,\n line: loc.line || 0,\n column: loc.column || 0,\n } : undefined;\n return result;\n }\n return { value: util.inspect(error) };\n}\n"],
|
|
5
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C,UAAI,MAAM,SAAS,SAAS,YAAY;AAEtC,YAAI,YAAAA,QAAK,QAAQ,UAAU,MAAM,YAAAA,QAAK,QAAQ,MAAM,SAAS,IAAI;AAC/D,gBAAM,SAAS,OAAO;AAAA,MAC1B;AAAA,IACF;AAAA,EACF;AAEA,SAAO;AACT;AAEA,SAAS,mBAAmB,MAAc,OAA+B;AACvE,MAAI,iBAAiB,OAAO;AAC1B,UAAM,aAAoB,+BAAiB,KAAK;AAEhD,UAAM,MAAO,MAAc;AAC3B,WAAO,WAAW,MAAM;AAAA,MACtB;AAAA,MACA,MAAM,IAAI,QAAQ;AAAA,MAClB,QAAQ,IAAI,UAAU;AAAA,IACxB,IAAI;AACJ,WAAO;AAAA,EACT;AACA,SAAO,EAAE,OAAO,YAAAC,QAAK,QAAQ,KAAK,EAAE;AACtC;",
|
|
6
|
-
"names": ["import_util", "path", "util"]
|
|
7
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../src/common/testType.ts"],
|
|
4
|
-
"sourcesContent": ["/**\n * Copyright (c) Microsoft Corporation.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { errors } from 'playwright-core';\nimport { getPackageManagerExecCommand, monotonicTime, raceAgainstDeadline, currentZone } from 'playwright-core/lib/utils';\n\nimport { currentTestInfo, currentlyLoadingFileSuite, setCurrentlyLoadingFileSuite } from './globals';\nimport { Suite, TestCase } from './test';\nimport { expect } from '../matchers/expect';\nimport { wrapFunctionWithLocation } from '../transform/transform';\nimport { validateTestDetails } from './validators';\n\nimport type { FixturesWithLocation } from './config';\nimport type { Fixtures, TestDetails, TestStepInfo, TestType } from '../../types/test';\nimport type { Location } from '../../types/testReporter';\n\nconst testTypeSymbol = Symbol('testType');\n\nexport class TestTypeImpl {\n readonly fixtures: FixturesWithLocation[];\n readonly test: TestType<any, any>;\n\n constructor(fixtures: FixturesWithLocation[]) {\n this.fixtures = fixtures;\n\n const test: any = wrapFunctionWithLocation(this._createTest.bind(this, 'default'));\n test[testTypeSymbol] = this;\n test.expect = expect;\n test.only = wrapFunctionWithLocation(this._createTest.bind(this, 'only'));\n test.describe = wrapFunctionWithLocation(this._describe.bind(this, 'default'));\n test.describe.only = wrapFunctionWithLocation(this._describe.bind(this, 'only'));\n test.describe.configure = wrapFunctionWithLocation(this._configure.bind(this));\n test.describe.fixme = wrapFunctionWithLocation(this._describe.bind(this, 'fixme'));\n test.describe.parallel = wrapFunctionWithLocation(this._describe.bind(this, 'parallel'));\n test.describe.parallel.only = wrapFunctionWithLocation(this._describe.bind(this, 'parallel.only'));\n test.describe.serial = wrapFunctionWithLocation(this._describe.bind(this, 'serial'));\n test.describe.serial.only = wrapFunctionWithLocation(this._describe.bind(this, 'serial.only'));\n test.describe.skip = wrapFunctionWithLocation(this._describe.bind(this, 'skip'));\n test.beforeEach = wrapFunctionWithLocation(this._hook.bind(this, 'beforeEach'));\n test.afterEach = wrapFunctionWithLocation(this._hook.bind(this, 'afterEach'));\n test.beforeAll = wrapFunctionWithLocation(this._hook.bind(this, 'beforeAll'));\n test.afterAll = wrapFunctionWithLocation(this._hook.bind(this, 'afterAll'));\n test.skip = wrapFunctionWithLocation(this._modifier.bind(this, 'skip'));\n test.fixme = wrapFunctionWithLocation(this._modifier.bind(this, 'fixme'));\n test.fail = wrapFunctionWithLocation(this._modifier.bind(this, 'fail'));\n test.fail.only = wrapFunctionWithLocation(this._createTest.bind(this, 'fail.only'));\n test.slow = wrapFunctionWithLocation(this._modifier.bind(this, 'slow'));\n test.setTimeout = wrapFunctionWithLocation(this._setTimeout.bind(this));\n test.step = this._step.bind(this, 'pass');\n test.step.skip = this._step.bind(this, 'skip');\n test.use = wrapFunctionWithLocation(this._use.bind(this));\n test.extend = wrapFunctionWithLocation(this._extend.bind(this));\n test.info = () => {\n const result = currentTestInfo();\n if (!result)\n throw new Error('test.info() can only be called while test is running');\n return result;\n };\n this.test = test;\n }\n\n private _currentSuite(location: Location, title: string): Suite | undefined {\n const suite = currentlyLoadingFileSuite();\n if (!suite) {\n throw new Error([\n `Playwright Test did not expect ${title} to be called here.`,\n `Most common reasons include:`,\n `- You are calling ${title} in a configuration file.`,\n `- You are calling ${title} in a file that is imported by the configuration file.`,\n `- You have two different versions of @playwright/test. This usually happens`,\n ` when one of the dependencies in your package.json depends on @playwright/test.`,\n ].join('\\n'));\n }\n return suite;\n }\n\n private _createTest(type: 'default' | 'only' | 'skip' | 'fixme' | 'fail' | 'fail.only', location: Location, title: string, fnOrDetails: Function | TestDetails, fn?: Function) {\n throwIfRunningInsideJest();\n const suite = this._currentSuite(location, 'test()');\n if (!suite)\n return;\n\n let details: TestDetails;\n let body: Function;\n if (typeof fnOrDetails === 'function') {\n body = fnOrDetails;\n details = {};\n } else {\n body = fn!;\n details = fnOrDetails;\n }\n\n const validatedDetails = validateTestDetails(details, location);\n const test = new TestCase(title, body, this, location);\n test._requireFile = suite._requireFile;\n test.annotations.push(...validatedDetails.annotations);\n test._tags.push(...validatedDetails.tags);\n suite._addTest(test);\n\n if (type === 'only' || type === 'fail.only')\n test._only = true;\n if (type === 'skip' || type === 'fixme' || type === 'fail')\n test.annotations.push({ type, location });\n else if (type === 'fail.only')\n test.annotations.push({ type: 'fail', location });\n }\n\n private _describe(type: 'default' | 'only' | 'serial' | 'serial.only' | 'parallel' | 'parallel.only' | 'skip' | 'fixme', location: Location, titleOrFn: string | Function, fnOrDetails?: TestDetails | Function, fn?: Function) {\n throwIfRunningInsideJest();\n const suite = this._currentSuite(location, 'test.describe()');\n if (!suite)\n return;\n\n let title: string;\n let body: Function;\n let details: TestDetails;\n\n if (typeof titleOrFn === 'function') {\n title = '';\n details = {};\n body = titleOrFn;\n } else if (typeof fnOrDetails === 'function') {\n title = titleOrFn;\n details = {};\n body = fnOrDetails;\n } else {\n title = titleOrFn;\n details = fnOrDetails!;\n body = fn!;\n }\n\n const validatedDetails = validateTestDetails(details, location);\n const child = new Suite(title, 'describe');\n child._requireFile = suite._requireFile;\n child.location = location;\n child._staticAnnotations.push(...validatedDetails.annotations);\n child._tags.push(...validatedDetails.tags);\n suite._addSuite(child);\n\n if (type === 'only' || type === 'serial.only' || type === 'parallel.only')\n child._only = true;\n if (type === 'serial' || type === 'serial.only')\n child._parallelMode = 'serial';\n if (type === 'parallel' || type === 'parallel.only')\n child._parallelMode = 'parallel';\n if (type === 'skip' || type === 'fixme')\n child._staticAnnotations.push({ type, location });\n\n for (let parent: Suite | undefined = suite; parent; parent = parent.parent) {\n if (parent._parallelMode === 'serial' && child._parallelMode === 'parallel')\n throw new Error('describe.parallel cannot be nested inside describe.serial');\n if (parent._parallelMode === 'default' && child._parallelMode === 'parallel')\n throw new Error('describe.parallel cannot be nested inside describe with default mode');\n }\n\n setCurrentlyLoadingFileSuite(child);\n body();\n setCurrentlyLoadingFileSuite(suite);\n }\n\n private _hook(name: 'beforeEach' | 'afterEach' | 'beforeAll' | 'afterAll', location: Location, title: string | Function, fn?: Function) {\n const suite = this._currentSuite(location, `test.${name}()`);\n if (!suite)\n return;\n if (typeof title === 'function') {\n fn = title;\n title = `${name} hook`;\n }\n\n suite._hooks.push({ type: name, fn: fn!, title, location });\n }\n\n private _configure(location: Location, options: { mode?: 'default' | 'parallel' | 'serial', retries?: number, timeout?: number }) {\n throwIfRunningInsideJest();\n const suite = this._currentSuite(location, `test.describe.configure()`);\n if (!suite)\n return;\n\n if (options.timeout !== undefined)\n suite._timeout = options.timeout;\n\n if (options.retries !== undefined)\n suite._retries = options.retries;\n\n if (options.mode !== undefined) {\n if (suite._parallelMode !== 'none')\n throw new Error(`\"${suite._parallelMode}\" mode is already assigned for the enclosing scope.`);\n suite._parallelMode = options.mode;\n for (let parent: Suite | undefined = suite.parent; parent; parent = parent.parent) {\n if (parent._parallelMode === 'serial' && suite._parallelMode === 'parallel')\n throw new Error('describe with parallel mode cannot be nested inside describe with serial mode');\n if (parent._parallelMode === 'default' && suite._parallelMode === 'parallel')\n throw new Error('describe with parallel mode cannot be nested inside describe with default mode');\n }\n }\n }\n\n private _modifier(type: 'skip' | 'fail' | 'fixme' | 'slow', location: Location, ...modifierArgs: any[]) {\n const suite = currentlyLoadingFileSuite();\n if (suite) {\n if (typeof modifierArgs[0] === 'string' && typeof modifierArgs[1] === 'function' && (type === 'skip' || type === 'fixme' || type === 'fail')) {\n // Support for test.{skip,fixme,fail}(title, body)\n this._createTest(type, location, modifierArgs[0], modifierArgs[1]);\n return;\n }\n if (typeof modifierArgs[0] === 'string' && typeof modifierArgs[1] === 'object' && typeof modifierArgs[2] === 'function' && (type === 'skip' || type === 'fixme' || type === 'fail')) {\n // Support for test.{skip,fixme,fail}(title, details, body)\n this._createTest(type, location, modifierArgs[0], modifierArgs[1], modifierArgs[2]);\n return;\n }\n\n if (typeof modifierArgs[0] === 'function') {\n suite._modifiers.push({ type, fn: modifierArgs[0], location, description: modifierArgs[1] });\n } else {\n if (modifierArgs.length >= 1 && !modifierArgs[0])\n return;\n const description = modifierArgs[1];\n suite._staticAnnotations.push({ type, description, location });\n }\n return;\n }\n\n const testInfo = currentTestInfo();\n if (!testInfo)\n throw new Error(`test.${type}() can only be called inside test, describe block or fixture`);\n if (typeof modifierArgs[0] === 'function')\n throw new Error(`test.${type}() with a function can only be called inside describe block`);\n testInfo._modifier(type, location, modifierArgs as [any, any]);\n }\n\n private _setTimeout(location: Location, timeout: number) {\n const suite = currentlyLoadingFileSuite();\n if (suite) {\n suite._timeout = timeout;\n return;\n }\n\n const testInfo = currentTestInfo();\n if (!testInfo)\n throw new Error(`test.setTimeout() can only be called from a test`);\n testInfo.setTimeout(timeout);\n }\n\n private _use(location: Location, fixtures: Fixtures) {\n const suite = this._currentSuite(location, `test.use()`);\n if (!suite)\n return;\n suite._use.push({ fixtures, location });\n }\n\n async _step<T>(expectation: 'pass'|'skip', title: string, body: (step: TestStepInfo) => T | Promise<T>, options: {box?: boolean, location?: Location, timeout?: number } = {}): Promise<T> {\n const testInfo = currentTestInfo();\n if (!testInfo)\n throw new Error(`test.step() can only be called from a test`);\n const step = testInfo._addStep({ category: 'test.step', title, location: options.location, box: options.box });\n return await currentZone().with('stepZone', step).run(async () => {\n try {\n let result: Awaited<ReturnType<typeof raceAgainstDeadline<T>>> | undefined = undefined;\n result = await raceAgainstDeadline(async () => {\n try {\n return await step.info._runStepBody(expectation === 'skip', body, step.location);\n } catch (e) {\n // If the step timed out, the test fixtures will tear down, which in turn\n // will abort unfinished actions in the step body. Record such errors here.\n if (result?.timedOut)\n testInfo._failWithError(e);\n throw e;\n }\n }, options.timeout ? monotonicTime() + options.timeout : 0);\n if (result.timedOut)\n throw new errors.TimeoutError(`Step timeout of ${options.timeout}ms exceeded.`);\n step.complete({});\n return result.result;\n } catch (error) {\n step.complete({ error });\n throw error;\n }\n });\n }\n\n private _extend(location: Location, fixtures: Fixtures) {\n if ((fixtures as any)[testTypeSymbol])\n throw new Error(`test.extend() accepts fixtures object, not a test object.\\nDid you mean to call mergeTests()?`);\n const fixturesWithLocation: FixturesWithLocation = { fixtures, location };\n return new TestTypeImpl([...this.fixtures, fixturesWithLocation]).test;\n }\n}\n\nfunction throwIfRunningInsideJest() {\n if (process.env.JEST_WORKER_ID) {\n const packageManagerCommand = getPackageManagerExecCommand();\n throw new Error(\n `Playwright Test needs to be invoked via '${packageManagerCommand} playwright test' and excluded from Jest test runs.\\n` +\n `Creating one directory for Playwright tests and one for Jest is the recommended way of doing it.\\n` +\n `See https://playwright.dev/docs/intro for more information about Playwright Test.`,\n );\n }\n}\n\nexport const rootTestType = new TestTypeImpl([]);\n\nexport function mergeTests(...tests: TestType<any, any>[]) {\n let result = rootTestType;\n for (const t of tests) {\n const testTypeImpl = (t as any)[testTypeSymbol] as TestTypeImpl;\n if (!testTypeImpl)\n throw new Error(`mergeTests() accepts \"test\" functions as parameters.\\nDid you mean to call test.extend() with fixtures instead?`);\n // Filter out common ancestor fixtures.\n const newFixtures = testTypeImpl.fixtures.filter(theirs => !result.fixtures.find(ours => ours.fixtures === theirs.fixtures));\n result = new TestTypeImpl([...result.fixtures, ...newFixtures]);\n }\n return result.test;\n}\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAgBA,6BAAuB;AACvB,mBAA8F;AAE9F,qBAAyF;AACzF,kBAAgC;AAChC,oBAAuB;AACvB,uBAAyC;AACzC,wBAAoC;AAMpC,MAAM,iBAAiB,OAAO,UAAU;AAEjC,MAAM,aAAa;AAAA,EAIxB,YAAY,UAAkC;AAC5C,SAAK,WAAW;AAEhB,UAAM,WAAY,2CAAyB,KAAK,YAAY,KAAK,MAAM,SAAS,CAAC;AACjF,SAAK,cAAc,IAAI;AACvB,SAAK,SAAS;AACd,SAAK,WAAO,2CAAyB,KAAK,YAAY,KAAK,MAAM,MAAM,CAAC;AACxE,SAAK,eAAW,2CAAyB,KAAK,UAAU,KAAK,MAAM,SAAS,CAAC;AAC7E,SAAK,SAAS,WAAO,2CAAyB,KAAK,UAAU,KAAK,MAAM,MAAM,CAAC;AAC/E,SAAK,SAAS,gBAAY,2CAAyB,KAAK,WAAW,KAAK,IAAI,CAAC;AAC7E,SAAK,SAAS,YAAQ,2CAAyB,KAAK,UAAU,KAAK,MAAM,OAAO,CAAC;AACjF,SAAK,SAAS,eAAW,2CAAyB,KAAK,UAAU,KAAK,MAAM,UAAU,CAAC;AACvF,SAAK,SAAS,SAAS,WAAO,2CAAyB,KAAK,UAAU,KAAK,MAAM,eAAe,CAAC;AACjG,SAAK,SAAS,aAAS,2CAAyB,KAAK,UAAU,KAAK,MAAM,QAAQ,CAAC;AACnF,SAAK,SA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-1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../src/common/validators.ts"],
|
|
4
|
-
"sourcesContent": ["/**\n * Copyright (c) Microsoft Corporation.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { zod } from 'playwright-core/lib/utilsBundle';\n\nimport type { TestAnnotation, TestDetailsAnnotation } from 'packages/playwright/types/test';\nimport type { Location } from '../../types/testReporter';\nimport type { ZodError } from 'zod';\n\nconst testAnnotationSchema = zod.object({\n type: zod.string(),\n description: zod.string().optional(),\n});\n\nconst testDetailsSchema = zod.object({\n tag: zod.union([\n zod.string().optional(),\n zod.array(zod.string())\n ]).transform(val => Array.isArray(val) ? val : val !== undefined ? [val] : []).refine(val => val.every(v => v.startsWith('@')), {\n message: \"Tag must start with '@'\"\n }),\n annotation: zod.union([\n testAnnotationSchema,\n zod.array(testAnnotationSchema).optional()\n ]).transform(val => Array.isArray(val) ? val : val !== undefined ? [val] : []),\n});\n\nexport function validateTestAnnotation(annotation: unknown): TestAnnotation {\n try {\n return testAnnotationSchema.parse(annotation);\n } catch (error) {\n throwZodError(error);\n }\n}\n\ntype ValidTestDetails = {\n tags: string[];\n annotations: (TestDetailsAnnotation & { location: Location })[];\n location: Location;\n};\n\nexport function validateTestDetails(details: unknown, location: Location): ValidTestDetails {\n try {\n const parsedDetails = testDetailsSchema.parse(details);\n return {\n annotations: parsedDetails.annotation.map(a => ({ ...a, location })),\n tags: parsedDetails.tag,\n location,\n };\n } catch (error) {\n throwZodError(error);\n }\n}\n\nfunction throwZodError(error: any): never {\n throw new Error((error as ZodError).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S,cAAc,OAAmB;AACxC,QAAM,IAAI,MAAO,MAAmB,OAAO,IAAI,OAAK,EAAE,OAAO,EAAE,KAAK,IAAI,CAAC;AAC3E;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
package/lib/fsWatcher.js.map
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../src/fsWatcher.ts"],
|
|
4
|
-
"sourcesContent": ["/**\n * Copyright (c) Microsoft Corporation.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { chokidar } from './utilsBundle';\n\nimport type { FSWatcher } from 'chokidar';\n\nexport type FSEvent = { event: 'add' | 'addDir' | 'change' | 'unlink' | 'unlinkDir', file: string };\n\nexport class Watcher {\n private _onChange: (events: FSEvent[]) => void;\n private _watchedPaths: string[] = [];\n private _ignoredFolders: string[] = [];\n private _collector: FSEvent[] = [];\n private _fsWatcher: FSWatcher | undefined;\n private _throttleTimer: NodeJS.Timeout | undefined;\n\n constructor(onChange: (events: FSEvent[]) => void) {\n this._onChange = onChange;\n }\n\n async update(watchedPaths: string[], ignoredFolders: string[], reportPending: boolean) {\n if (JSON.stringify([this._watchedPaths, this._ignoredFolders]) === JSON.stringify([watchedPaths, ignoredFolders]))\n return;\n\n if (reportPending)\n this._reportEventsIfAny();\n\n this._watchedPaths = watchedPaths;\n this._ignoredFolders = ignoredFolders;\n void this._fsWatcher?.close();\n this._fsWatcher = undefined;\n this._collector.length = 0;\n clearTimeout(this._throttleTimer);\n this._throttleTimer = undefined;\n\n if (!this._watchedPaths.length)\n return;\n\n const ignored = [...this._ignoredFolders, '**/node_modules/**'];\n this._fsWatcher = chokidar.watch(watchedPaths, { ignoreInitial: true, ignored }).on('all', async (event, file) => {\n if (this._throttleTimer)\n clearTimeout(this._throttleTimer);\n this._collector.push({ event, file });\n this._throttleTimer = setTimeout(() => this._reportEventsIfAny(), 250);\n });\n\n await new Promise((resolve, reject) => this._fsWatcher!.once('ready', resolve).once('error', reject));\n }\n\n async close() {\n await this._fsWatcher?.close();\n }\n\n private _reportEventsIfAny() {\n if (this._collector.length)\n this._onChange(this._collector.slice());\n this._collector.length = 0;\n }\n}\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAgBA,yBAAyB;AAMlB,MAAM,QAAQ;AAAA,EAQnB,YAAY,UAAuC;AANnD,SAAQ,gBAA0B,CAAC;AACnC,SAAQ,kBAA4B,CAAC;AACrC,SAAQ,aAAwB,CAAC;AAK/B,SAAK,YAAY;AAAA,EACnB;AAAA,EAEA,MAAM,OAAO,cAAwB,gBAA0B,eAAwB;AACrF,QAAI,KAAK,UAAU,CAAC,KAAK,eAAe,KAAK,eAAe,CAAC,MAAM,KAAK,UAAU,CAAC,cAAc,cAAc,CAAC;AAC9G;AAEF,QAAI;AACF,WAAK,mBAAmB;AAE1B,SAAK,gBAAgB;AACrB,SAAK,kBAAkB;AACvB,SAAK,KAAK,YAAY,MAAM;AAC5B,SAAK,aAAa;AAClB,SAAK,WAAW,SAAS;AACzB,iBAAa,KAAK,cAAc;AAChC,SAAK,iBAAiB;AAEtB,QAAI,CAAC,KAAK,cAAc;AACtB;AAEF,UAAM,UAAU,CAAC,GAAG,KAAK,iBAAiB,oBAAoB;AAC9D,SAAK,aAAa,4BAAS,MAAM,cAAc,EAAE,eAAe,MAAM,QAAQ,CAAC,EAAE,GAAG,OAAO,OAAO,OAAO,SAAS;AAChH,UAAI,KAAK;AACP,qBAAa,KAAK,cAAc;AAClC,WAAK,WAAW,KAAK,EAAE,OAAO,KAAK,CAAC;AACpC,WAAK,iBAAiB,WAAW,MAAM,KAAK,mBAAmB,GAAG,GAAG;AAAA,IACvE,CAAC;AAED,UAAM,IAAI,QAAQ,CAAC,SAAS,WAAW,KAAK,WAAY,KAAK,SAAS,OAAO,EAAE,KAAK,SAAS,MAAM,CAAC;AAAA,EACtG;AAAA,EAEA,MAAM,QAAQ;AACZ,UAAM,KAAK,YAAY,MAAM;AAAA,EAC/B;AAAA,EAEQ,qBAAqB;AAC3B,QAAI,KAAK,WAAW;AAClB,WAAK,UAAU,KAAK,WAAW,MAAM,CAAC;AACxC,SAAK,WAAW,SAAS;AAAA,EAC3B;AACF;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
package/lib/index.js.map
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../src/index.ts"],
|
|
4
|
-
"sourcesContent": ["/**\n * Copyright (c) Microsoft Corporation.\n *\n * Licensed under the Apache License, Version 2.0 (the 'License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport fs from 'fs';\nimport path from 'path';\n\nimport * as playwrightLibrary from 'playwright-core';\nimport { setBoxedStackPrefixes, createGuid, currentZone, debugMode, jsonStringifyForceASCII, asLocatorDescription, renderTitleForCall, getActionGroup } from 'playwright-core/lib/utils';\n\nimport { currentTestInfo } from './common/globals';\nimport { rootTestType } from './common/testType';\nimport { runBrowserBackendAtEnd } from './mcp/test/browserBackend';\n\nimport type { Fixtures, PlaywrightTestArgs, PlaywrightTestOptions, PlaywrightWorkerArgs, PlaywrightWorkerOptions, ScreenshotMode, TestInfo, TestType, VideoMode } from '../types/test';\nimport type { ContextReuseMode } from './common/config';\nimport type { TestInfoImpl, TestStepInternal } from './worker/testInfo';\nimport type { ClientInstrumentationListener } from '../../playwright-core/src/client/clientInstrumentation';\nimport type { Playwright as PlaywrightImpl } from '../../playwright-core/src/client/playwright';\nimport type { Browser as BrowserImpl } from '../../playwright-core/src/client/browser';\nimport type { BrowserContext as BrowserContextImpl } from '../../playwright-core/src/client/browserContext';\nimport type { APIRequestContext as APIRequestContextImpl } from '../../playwright-core/src/client/fetch';\nimport type { ChannelOwner } from '../../playwright-core/src/client/channelOwner';\nimport type { Page as PageImpl } from '../../playwright-core/src/client/page';\nimport type { BrowserContext, BrowserContextOptions, LaunchOptions, Page, Tracing } from 'playwright-core';\n\nexport { expect } from './matchers/expect';\nexport const _baseTest: TestType<{}, {}> = rootTestType.test;\n\nsetBoxedStackPrefixes([path.dirname(require.resolve('../package.json'))]);\n\nif ((process as any)['__pw_initiator__']) {\n const originalStackTraceLimit = Error.stackTraceLimit;\n Error.stackTraceLimit = 200;\n try {\n throw new Error('Requiring @playwright/test second time, \\nFirst:\\n' + (process as any)['__pw_initiator__'] + '\\n\\nSecond: ');\n } finally {\n Error.stackTraceLimit = originalStackTraceLimit;\n }\n} else {\n (process as any)['__pw_initiator__'] = new Error().stack;\n}\n\ntype TestFixtures = PlaywrightTestArgs & PlaywrightTestOptions & {\n _combinedContextOptions: BrowserContextOptions,\n _setupContextOptions: void;\n _setupArtifacts: void;\n _contextFactory: (options?: BrowserContextOptions) => Promise<{ context: BrowserContext, close: () => Promise<void> }>;\n};\n\ntype WorkerFixtures = PlaywrightWorkerArgs & PlaywrightWorkerOptions & {\n playwright: PlaywrightImpl;\n _browserOptions: LaunchOptions;\n _optionContextReuseMode: ContextReuseMode,\n _optionConnectOptions: PlaywrightWorkerOptions['connectOptions'],\n _reuseContext: boolean,\n};\n\nconst playwrightFixtures: Fixtures<TestFixtures, WorkerFixtures> = ({\n defaultBrowserType: ['chromium', { scope: 'worker', option: true, box: true }],\n browserName: [({ defaultBrowserType }, use) => use(defaultBrowserType), { scope: 'worker', option: true, box: true }],\n playwright: [async ({}, use) => {\n await use(require('playwright-core'));\n }, { scope: 'worker', box: true }],\n headless: [({ launchOptions }, use) => use(launchOptions.headless ?? true), { scope: 'worker', option: true, box: true }],\n channel: [({ launchOptions }, use) => use(launchOptions.channel), { scope: 'worker', option: true, box: true }],\n launchOptions: [{}, { scope: 'worker', option: true, box: true }],\n connectOptions: [async ({ _optionConnectOptions }, use) => {\n await use(connectOptionsFromEnv() || _optionConnectOptions);\n }, { scope: 'worker', option: true, box: true }],\n screenshot: ['off', { scope: 'worker', option: true, box: true }],\n video: ['off', { scope: 'worker', option: true, box: true }],\n trace: ['off', { scope: 'worker', option: true, box: true }],\n\n _browserOptions: [async ({ playwright, headless, channel, launchOptions }, use) => {\n const options: LaunchOptions = {\n handleSIGINT: false,\n ...launchOptions,\n tracesDir: tracing().tracesDir(),\n };\n if (headless !== undefined)\n options.headless = headless;\n if (channel !== undefined)\n options.channel = channel;\n\n playwright._defaultLaunchOptions = options;\n await use(options);\n playwright._defaultLaunchOptions = undefined;\n }, { scope: 'worker', auto: true, box: true }],\n\n browser: [async ({ playwright, browserName, _browserOptions, connectOptions }, use) => {\n if (!['chromium', 'firefox', 'webkit'].includes(browserName))\n throw new Error(`Unexpected browserName \"${browserName}\", must be one of \"chromium\", \"firefox\" or \"webkit\"`);\n\n if (connectOptions) {\n const browser = await playwright[browserName].connect({\n ...connectOptions,\n exposeNetwork: connectOptions.exposeNetwork ?? (connectOptions as any)._exposeNetwork,\n headers: {\n // HTTP headers are ASCII only (not UTF-8).\n 'x-playwright-launch-options': jsonStringifyForceASCII(_browserOptions),\n ...connectOptions.headers,\n },\n });\n await use(browser);\n await browser.close({ reason: 'Test ended.' });\n return;\n }\n\n const browser = await playwright[browserName].launch();\n await use(browser);\n await browser.close({ reason: 'Test ended.' });\n }, { scope: 'worker', timeout: 0 }],\n\n acceptDownloads: [({ contextOptions }, use) => use(contextOptions.acceptDownloads ?? true), { option: true, box: true }],\n bypassCSP: [({ contextOptions }, use) => use(contextOptions.bypassCSP ?? false), { option: true, box: true }],\n colorScheme: [({ contextOptions }, use) => use(contextOptions.colorScheme === undefined ? 'light' : contextOptions.colorScheme), { option: true, box: true }],\n deviceScaleFactor: [({ contextOptions }, use) => use(contextOptions.deviceScaleFactor), { option: true, box: true }],\n extraHTTPHeaders: [({ contextOptions }, use) => use(contextOptions.extraHTTPHeaders), { option: true, box: true }],\n geolocation: [({ contextOptions }, use) => use(contextOptions.geolocation), { option: true, box: true }],\n hasTouch: [({ contextOptions }, use) => use(contextOptions.hasTouch ?? false), { option: true, box: true }],\n httpCredentials: [({ contextOptions }, use) => use(contextOptions.httpCredentials), { option: true, box: true }],\n ignoreHTTPSErrors: [({ contextOptions }, use) => use(contextOptions.ignoreHTTPSErrors ?? false), { option: true, box: true }],\n isMobile: [({ contextOptions }, use) => use(contextOptions.isMobile ?? false), { option: true, box: true }],\n javaScriptEnabled: [({ contextOptions }, use) => use(contextOptions.javaScriptEnabled ?? true), { option: true, box: true }],\n locale: [({ contextOptions }, use) => use(contextOptions.locale ?? 'en-US'), { option: true, box: true }],\n offline: [({ contextOptions }, use) => use(contextOptions.offline ?? false), { option: true, box: true }],\n permissions: [({ contextOptions }, use) => use(contextOptions.permissions), { option: true, box: true }],\n proxy: [({ contextOptions }, use) => use(contextOptions.proxy), { option: true, box: true }],\n storageState: [({ contextOptions }, use) => use(contextOptions.storageState), { option: true, box: true }],\n clientCertificates: [({ contextOptions }, use) => use(contextOptions.clientCertificates), { option: true, box: true }],\n timezoneId: [({ contextOptions }, use) => use(contextOptions.timezoneId), { option: true, box: true }],\n userAgent: [({ contextOptions }, use) => use(contextOptions.userAgent), { option: true, box: true }],\n viewport: [({ contextOptions }, use) => use(contextOptions.viewport === undefined ? { width: 1280, height: 720 } : contextOptions.viewport), { option: true, box: true }],\n actionTimeout: [0, { option: true, box: true }],\n testIdAttribute: ['data-testid', { option: true, box: true }],\n navigationTimeout: [0, { option: true, box: true }],\n baseURL: [async ({ }, use) => {\n await use(process.env.PLAYWRIGHT_TEST_BASE_URL);\n }, { option: true, box: true }],\n serviceWorkers: [({ contextOptions }, use) => use(contextOptions.serviceWorkers ?? 'allow'), { option: true, box: true }],\n contextOptions: [{}, { option: true, box: true }],\n\n _combinedContextOptions: [async ({\n acceptDownloads,\n bypassCSP,\n clientCertificates,\n colorScheme,\n deviceScaleFactor,\n extraHTTPHeaders,\n hasTouch,\n geolocation,\n httpCredentials,\n ignoreHTTPSErrors,\n isMobile,\n javaScriptEnabled,\n locale,\n offline,\n permissions,\n proxy,\n storageState,\n viewport,\n timezoneId,\n userAgent,\n baseURL,\n contextOptions,\n serviceWorkers,\n }, use) => {\n const options: BrowserContextOptions = {};\n if (acceptDownloads !== undefined)\n options.acceptDownloads = acceptDownloads;\n if (bypassCSP !== undefined)\n options.bypassCSP = bypassCSP;\n if (colorScheme !== undefined)\n options.colorScheme = colorScheme;\n if (deviceScaleFactor !== undefined)\n options.deviceScaleFactor = deviceScaleFactor;\n if (extraHTTPHeaders !== undefined)\n options.extraHTTPHeaders = extraHTTPHeaders;\n if (geolocation !== undefined)\n options.geolocation = geolocation;\n if (hasTouch !== undefined)\n options.hasTouch = hasTouch;\n if (httpCredentials !== undefined)\n options.httpCredentials = httpCredentials;\n if (ignoreHTTPSErrors !== undefined)\n options.ignoreHTTPSErrors = ignoreHTTPSErrors;\n if (isMobile !== undefined)\n options.isMobile = isMobile;\n if (javaScriptEnabled !== undefined)\n options.javaScriptEnabled = javaScriptEnabled;\n if (locale !== undefined)\n options.locale = locale;\n if (offline !== undefined)\n options.offline = offline;\n if (permissions !== undefined)\n options.permissions = permissions;\n if (proxy !== undefined)\n options.proxy = proxy;\n if (storageState !== undefined)\n options.storageState = storageState;\n if (clientCertificates?.length)\n options.clientCertificates = resolveClientCerticates(clientCertificates);\n if (timezoneId !== undefined)\n options.timezoneId = timezoneId;\n if (userAgent !== undefined)\n options.userAgent = userAgent;\n if (viewport !== undefined)\n options.viewport = viewport;\n if (baseURL !== undefined)\n options.baseURL = baseURL;\n if (serviceWorkers !== undefined)\n options.serviceWorkers = serviceWorkers;\n await use({\n ...contextOptions,\n ...options,\n });\n }, { box: true }],\n\n _setupContextOptions: [async ({ playwright, _combinedContextOptions, actionTimeout, navigationTimeout, testIdAttribute }, use, testInfo) => {\n if (testIdAttribute)\n playwrightLibrary.selectors.setTestIdAttribute(testIdAttribute);\n testInfo.snapshotSuffix = process.platform;\n if (debugMode() === 'inspector')\n (testInfo as TestInfoImpl)._setDebugMode();\n\n playwright._defaultContextOptions = _combinedContextOptions;\n playwright._defaultContextTimeout = (testInfo as TestInfoImpl)._pauseOnError() ? 5000 : actionTimeout || 0;\n playwright._defaultContextNavigationTimeout = navigationTimeout || 0;\n await use();\n playwright._defaultContextOptions = undefined;\n playwright._defaultContextTimeout = undefined;\n playwright._defaultContextNavigationTimeout = undefined;\n }, { auto: 'all-hooks-included', title: 'context configuration', box: true } as any],\n\n _setupArtifacts: [async ({ playwright, screenshot }, use, testInfo) => {\n // This fixture has a separate zero-timeout slot to ensure that artifact collection\n // happens even after some fixtures or hooks time out.\n // Now that default test timeout is known, we can replace zero with an actual value.\n testInfo.setTimeout(testInfo.project.timeout);\n\n const artifactsRecorder = new ArtifactsRecorder(playwright, tracing().artifactsDir(), screenshot);\n await artifactsRecorder.willStartTest(testInfo as TestInfoImpl);\n\n const tracingGroupSteps: TestStepInternal[] = [];\n const csiListener: ClientInstrumentationListener = {\n onApiCallBegin: (data, channel) => {\n const testInfo = currentTestInfo();\n // Some special calls do not get into steps.\n if (!testInfo || data.apiName.includes('setTestIdAttribute') || data.apiName === 'tracing.groupEnd')\n return;\n const zone = currentZone().data<TestStepInternal>('stepZone');\n const isExpectCall = data.apiName === 'locator._expect' || data.apiName === 'frame._expect' || data.apiName === 'page._expectScreenshot';\n if (zone && zone.category === 'expect' && isExpectCall) {\n // Display the internal locator._expect call under the name of the enclosing expect call,\n // and connect it to the existing expect step.\n if (zone.apiName)\n data.apiName = zone.apiName;\n if (zone.title)\n data.title = zone.title;\n data.stepId = zone.stepId;\n return;\n }\n\n // In the general case, create a step for each api call and connect them through the stepId.\n const step = testInfo._addStep({\n location: data.frames[0],\n category: 'pw:api',\n title: renderTitle(channel.type, channel.method, channel.params, data.title),\n apiName: data.apiName,\n params: channel.params,\n group: getActionGroup({ type: channel.type, method: channel.method }),\n }, tracingGroupSteps[tracingGroupSteps.length - 1]);\n data.userData = step;\n data.stepId = step.stepId;\n if (data.apiName === 'tracing.group')\n tracingGroupSteps.push(step);\n },\n onApiCallEnd: data => {\n\n // \"tracing.group\" step will end later, when \"tracing.groupEnd\" finishes.\n if (data.apiName === 'tracing.group')\n return;\n if (data.apiName === 'tracing.groupEnd') {\n const step = tracingGroupSteps.pop();\n step?.complete({ error: data.error });\n return;\n }\n const step = data.userData;\n step?.complete({ error: data.error });\n },\n onWillPause: ({ keepTestTimeout }) => {\n if (!keepTestTimeout)\n currentTestInfo()?._setDebugMode();\n },\n runAfterCreateBrowserContext: async (context: BrowserContextImpl) => {\n await artifactsRecorder?.didCreateBrowserContext(context);\n const testInfo = currentTestInfo();\n if (testInfo)\n attachConnectedHeaderIfNeeded(testInfo, context.browser());\n },\n runAfterCreateRequestContext: async (context: APIRequestContextImpl) => {\n await artifactsRecorder?.didCreateRequestContext(context);\n },\n runBeforeCloseBrowserContext: async (context: BrowserContextImpl) => {\n await artifactsRecorder?.willCloseBrowserContext(context);\n },\n runBeforeCloseRequestContext: async (context: APIRequestContextImpl) => {\n await artifactsRecorder?.willCloseRequestContext(context);\n },\n };\n\n const clientInstrumentation = playwright._instrumentation;\n clientInstrumentation.addListener(csiListener);\n\n await use();\n\n clientInstrumentation.removeListener(csiListener);\n await artifactsRecorder.didFinishTest();\n }, { auto: 'all-hooks-included', title: 'trace recording', box: true, timeout: 0 } as any],\n\n _contextFactory: [async ({ browser, video, _reuseContext, _combinedContextOptions /** mitigate dep-via-auto lack of traceability */ }, use, testInfo) => {\n const testInfoImpl = testInfo as TestInfoImpl;\n const videoMode = normalizeVideoMode(video);\n const captureVideo = shouldCaptureVideo(videoMode, testInfo) && !_reuseContext;\n const contexts = new Map<BrowserContext, { close: () => Promise<void>, pagesWithVideo: Page[] }>();\n let counter = 0;\n\n await use(async options => {\n const hook = testInfoImpl._currentHookType();\n if (hook === 'beforeAll' || hook === 'afterAll') {\n throw new Error([\n `\"context\" and \"page\" fixtures are not supported in \"${hook}\" since they are created on a per-test basis.`,\n `If you would like to reuse a single page between tests, create context manually with browser.newContext(). See https://aka.ms/playwright/reuse-page for details.`,\n `If you would like to configure your page before each test, do that in beforeEach hook instead.`,\n ].join('\\n'));\n }\n const videoOptions: BrowserContextOptions = captureVideo ? {\n recordVideo: {\n dir: tracing().artifactsDir(),\n size: typeof video === 'string' ? undefined : video.size,\n }\n } : {};\n const context = await browser.newContext({ ...videoOptions, ...options }) as BrowserContextImpl;\n\n if (process.env.PW_CLOCK === 'frozen') {\n await context._wrapApiCall(async () => {\n await context.clock.install({ time: 0 });\n await context.clock.pauseAt(1000);\n }, { internal: true });\n } else if (process.env.PW_CLOCK === 'realtime') {\n await context._wrapApiCall(async () => {\n await context.clock.install({ time: 0 });\n }, { internal: true });\n }\n\n let closed = false;\n const close = async () => {\n if (closed)\n return;\n closed = true;\n const closeReason = testInfo.status === 'timedOut' ? 'Test timeout of ' + testInfo.timeout + 'ms exceeded.' : 'Test ended.';\n await context.close({ reason: closeReason });\n const testFailed = testInfo.status !== testInfo.expectedStatus;\n const preserveVideo = captureVideo && (videoMode === 'on' || (testFailed && videoMode === 'retain-on-failure') || (videoMode === 'on-first-retry' && testInfo.retry === 1));\n if (preserveVideo) {\n const { pagesWithVideo: pagesForVideo } = contexts.get(context)!;\n const videos = pagesForVideo.map(p => p.video()).filter(video => !!video);\n await Promise.all(videos.map(async v => {\n try {\n const savedPath = testInfo.outputPath(`video${counter ? '-' + counter : ''}.webm`);\n ++counter;\n await v.saveAs(savedPath);\n testInfo.attachments.push({ name: 'video', path: savedPath, contentType: 'video/webm' });\n } catch (e) {\n // Silent catch empty videos.\n }\n }));\n }\n };\n\n const contextData = { close, pagesWithVideo: [] as Page[] };\n if (captureVideo)\n context.on('page', page => contextData.pagesWithVideo.push(page));\n contexts.set(context, contextData);\n return { context, close };\n });\n\n await Promise.all([...contexts.values()].map(data => data.close()));\n }, { scope: 'test', title: 'context', box: true }],\n\n _optionContextReuseMode: ['none', { scope: 'worker', option: true, box: true }],\n _optionConnectOptions: [undefined, { scope: 'worker', option: true, box: true }],\n\n _reuseContext: [async ({ video, _optionContextReuseMode }, use) => {\n let mode = _optionContextReuseMode;\n if (process.env.PW_TEST_REUSE_CONTEXT)\n mode = 'when-possible';\n const reuse = mode === 'when-possible' && normalizeVideoMode(video) === 'off';\n await use(reuse);\n }, { scope: 'worker', title: 'context', box: true }],\n\n context: async ({ browser, _reuseContext, _contextFactory }, use, testInfo) => {\n const browserImpl = browser as BrowserImpl;\n attachConnectedHeaderIfNeeded(testInfo, browserImpl);\n if (!_reuseContext) {\n const { context, close } = await _contextFactory();\n (testInfo as TestInfoImpl)._onDidFinishTestFunctions.unshift(() => runBrowserBackendAtEnd(context, testInfo.errors[0]?.message));\n await use(context);\n await close();\n return;\n }\n\n const context = await browserImpl._wrapApiCall(() => browserImpl._newContextForReuse(), { internal: true });\n (testInfo as TestInfoImpl)._onDidFinishTestFunctions.unshift(() => runBrowserBackendAtEnd(context, testInfo.errors[0]?.message));\n await use(context);\n const closeReason = testInfo.status === 'timedOut' ? 'Test timeout of ' + testInfo.timeout + 'ms exceeded.' : 'Test ended.';\n await browserImpl._wrapApiCall(() => browserImpl._disconnectFromReusedContext(closeReason), { internal: true });\n },\n\n page: async ({ context, _reuseContext }, use) => {\n if (!_reuseContext) {\n await use(await context.newPage());\n return;\n }\n\n // First time we are reusing the context, we should create the page.\n let [page] = context.pages();\n if (!page)\n page = await context.newPage();\n await use(page);\n },\n\n request: async ({ playwright }, use) => {\n const request = await playwright.request.newContext();\n await use(request);\n const hook = (test.info() as TestInfoImpl)._currentHookType();\n if (hook === 'beforeAll') {\n await request.dispose({ reason: [\n `Fixture { request } from beforeAll cannot be reused in a test.`,\n ` - Recommended fix: use a separate { request } in the test.`,\n ` - Alternatively, manually create APIRequestContext in beforeAll and dispose it in afterAll.`,\n `See https://playwright.dev/docs/api-testing#sending-api-requests-from-ui-tests for more details.`,\n ].join('\\n') });\n } else {\n await request.dispose();\n }\n },\n});\n\ntype ScreenshotOption = PlaywrightWorkerOptions['screenshot'] | undefined;\n\nfunction normalizeVideoMode(video: VideoMode | 'retry-with-video' | { mode: VideoMode } | undefined): VideoMode {\n if (!video)\n return 'off';\n let videoMode = typeof video === 'string' ? video : video.mode;\n if (videoMode === 'retry-with-video')\n videoMode = 'on-first-retry';\n return videoMode;\n}\n\nfunction shouldCaptureVideo(videoMode: VideoMode, testInfo: TestInfo) {\n return (videoMode === 'on' || videoMode === 'retain-on-failure' || (videoMode === 'on-first-retry' && testInfo.retry === 1));\n}\n\nfunction normalizeScreenshotMode(screenshot: ScreenshotOption): ScreenshotMode {\n if (!screenshot)\n return 'off';\n return typeof screenshot === 'string' ? screenshot : screenshot.mode;\n}\n\nfunction attachConnectedHeaderIfNeeded(testInfo: TestInfo, browser: BrowserImpl | null) {\n const connectHeaders: { name: string, value: string }[] | undefined = browser?._connection.headers;\n if (!connectHeaders)\n return;\n for (const header of connectHeaders) {\n if (header.name !== 'x-playwright-attachment')\n continue;\n const [name, value] = header.value.split('=');\n if (!name || !value)\n continue;\n if (testInfo.attachments.some(attachment => attachment.name === name))\n continue;\n testInfo.attachments.push({ name, contentType: 'text/plain', body: Buffer.from(value) });\n }\n}\n\nfunction resolveFileToConfig(file: string | undefined) {\n const config = test.info().config.configFile;\n if (!config || !file)\n return file;\n if (path.isAbsolute(file))\n return file;\n return path.resolve(path.dirname(config), file);\n}\n\ntype ClientCertificates = NonNullable<PlaywrightTestOptions['clientCertificates']>;\n\nfunction resolveClientCerticates(clientCertificates: ClientCertificates): ClientCertificates {\n for (const cert of clientCertificates) {\n cert.certPath = resolveFileToConfig(cert.certPath);\n cert.keyPath = resolveFileToConfig(cert.keyPath);\n cert.pfxPath = resolveFileToConfig(cert.pfxPath);\n }\n return clientCertificates;\n}\n\nconst kTracingStarted = Symbol('kTracingStarted');\n\nfunction connectOptionsFromEnv() {\n const wsEndpoint = process.env.PW_TEST_CONNECT_WS_ENDPOINT;\n if (!wsEndpoint)\n return undefined;\n const headers = process.env.PW_TEST_CONNECT_HEADERS ? JSON.parse(process.env.PW_TEST_CONNECT_HEADERS) : undefined;\n return {\n wsEndpoint,\n headers,\n exposeNetwork: process.env.PW_TEST_CONNECT_EXPOSE_NETWORK,\n };\n}\n\ntype SnapshotRecorderMode = 'on' | 'off' | 'only-on-failure' | 'on-first-failure';\n\nclass SnapshotRecorder {\n private _ordinal = 0;\n private _temporary: string[] = [];\n\n constructor(\n private _artifactsRecorder: ArtifactsRecorder,\n private _mode: SnapshotRecorderMode,\n private _name: string,\n private _contentType: string,\n private _extension: string,\n private _doSnapshot: (page: PageImpl, path: string) => Promise<void>) {\n }\n\n fixOrdinal() {\n // Since beforeAll(s), test and afterAll(s) reuse the same TestInfo, make sure we do not\n // overwrite previous screenshots.\n this._ordinal = this.testInfo.attachments.filter(a => a.name === this._name).length;\n }\n\n private shouldCaptureUponFinish() {\n return this._mode === 'on' ||\n (this._mode === 'only-on-failure' && this.testInfo._isFailure()) ||\n (this._mode === 'on-first-failure' && this.testInfo._isFailure() && this.testInfo.retry === 0);\n }\n\n async maybeCapture() {\n if (!this.shouldCaptureUponFinish())\n return;\n\n await Promise.all(this._artifactsRecorder._playwright._allPages().map(page => this._snapshotPage(page, false)));\n }\n\n async persistTemporary() {\n if (this.shouldCaptureUponFinish()) {\n await Promise.all(this._temporary.map(async file => {\n try {\n const path = this._createAttachmentPath();\n await fs.promises.rename(file, path);\n this._attach(path);\n } catch {\n }\n }));\n }\n }\n\n async captureTemporary(context: BrowserContextImpl) {\n if (this._mode === 'on' || this._mode === 'only-on-failure' || (this._mode === 'on-first-failure' && this.testInfo.retry === 0))\n await Promise.all(context.pages().map(page => this._snapshotPage(page, true)));\n }\n\n private _attach(screenshotPath: string) {\n this.testInfo.attachments.push({ name: this._name, path: screenshotPath, contentType: this._contentType });\n }\n\n private _createAttachmentPath() {\n const testFailed = this.testInfo._isFailure();\n const index = this._ordinal + 1;\n ++this._ordinal;\n const path = this.testInfo.outputPath(`test-${testFailed ? 'failed' : 'finished'}-${index}${this._extension}`);\n return path;\n }\n\n private _createTemporaryArtifact(...name: string[]) {\n const file = path.join(this._artifactsRecorder._artifactsDir, ...name);\n return file;\n }\n\n private async _snapshotPage(page: PageImpl, temporary: boolean) {\n // Make sure we do not snapshot the same page twice for a single TestInfo,\n // which is reused between beforeAll(s), test and afterAll(s).\n if ((page as any)[this.testInfo._uniqueSymbol])\n return;\n (page as any)[this.testInfo._uniqueSymbol] = true;\n try {\n const path = temporary ? this._createTemporaryArtifact(createGuid() + this._extension) : this._createAttachmentPath();\n await this._doSnapshot(page, path);\n if (temporary)\n this._temporary.push(path);\n else\n this._attach(path);\n } catch {\n // snapshot may fail, just ignore.\n }\n }\n\n private get testInfo(): TestInfoImpl {\n return this._artifactsRecorder._testInfo;\n }\n}\n\nclass ArtifactsRecorder {\n _testInfo!: TestInfoImpl;\n _playwright: PlaywrightImpl;\n _artifactsDir: string;\n private _startedCollectingArtifacts: symbol;\n\n private _screenshotRecorder: SnapshotRecorder;\n private _pageSnapshot: string | undefined;\n\n constructor(playwright: PlaywrightImpl, artifactsDir: string, screenshot: ScreenshotOption) {\n this._playwright = playwright;\n this._artifactsDir = artifactsDir;\n const screenshotOptions = typeof screenshot === 'string' ? undefined : screenshot;\n this._startedCollectingArtifacts = Symbol('startedCollectingArtifacts');\n\n this._screenshotRecorder = new SnapshotRecorder(this, normalizeScreenshotMode(screenshot), 'screenshot', 'image/png', '.png', async (page, path) => {\n await page._wrapApiCall(async () => {\n await page.screenshot({ ...screenshotOptions, timeout: 5000, path, caret: 'initial' });\n }, { internal: true });\n });\n }\n\n async willStartTest(testInfo: TestInfoImpl) {\n this._testInfo = testInfo;\n testInfo._onDidFinishTestFunctions.push(() => this.didFinishTestFunction());\n\n this._screenshotRecorder.fixOrdinal();\n\n // Process existing contexts.\n await Promise.all(this._playwright._allContexts().map(context => this.didCreateBrowserContext(context)));\n const existingApiRequests = Array.from(this._playwright.request._contexts);\n await Promise.all(existingApiRequests.map(c => this.didCreateRequestContext(c)));\n }\n\n async didCreateBrowserContext(context: BrowserContextImpl) {\n await this._startTraceChunkOnContextCreation(context, context.tracing);\n }\n\n async willCloseBrowserContext(context: BrowserContextImpl) {\n await this._stopTracing(context, context.tracing);\n await this._screenshotRecorder.captureTemporary(context);\n await this._takePageSnapshot(context);\n }\n\n private async _takePageSnapshot(context: BrowserContextImpl) {\n if (process.env.PLAYWRIGHT_NO_COPY_PROMPT)\n return;\n if (this._testInfo.errors.length === 0)\n return;\n if (this._pageSnapshot)\n return;\n const page = context.pages()[0];\n if (!page)\n return;\n\n try {\n // TODO: maybe capture snapshot when the error is created, so it's from the right page and right time\n await page._wrapApiCall(async () => {\n this._pageSnapshot = await page._snapshotForAI({ timeout: 5000 });\n }, { internal: true });\n } catch {}\n }\n\n async didCreateRequestContext(context: APIRequestContextImpl) {\n await this._startTraceChunkOnContextCreation(context, context._tracing);\n }\n\n async willCloseRequestContext(context: APIRequestContextImpl) {\n await this._stopTracing(context, context._tracing);\n }\n\n async didFinishTestFunction() {\n await this._screenshotRecorder.maybeCapture();\n }\n\n async didFinishTest() {\n await this.didFinishTestFunction();\n\n const leftoverContexts = this._playwright._allContexts();\n const leftoverApiRequests = Array.from(this._playwright.request._contexts);\n\n // Collect traces/screenshots for remaining contexts.\n await Promise.all(leftoverContexts.map(async context => {\n await this._stopTracing(context, context.tracing);\n }).concat(leftoverApiRequests.map(async context => {\n await this._stopTracing(context, context._tracing);\n })));\n\n await this._screenshotRecorder.persistTemporary();\n\n const context = leftoverContexts[0];\n if (context)\n await this._takePageSnapshot(context);\n\n if (this._pageSnapshot && this._testInfo.errors.length > 0 && !this._testInfo.attachments.some(a => a.name === 'error-context')) {\n const lines = [\n '# Page snapshot',\n '',\n '```yaml',\n this._pageSnapshot,\n '```',\n ];\n const filePath = this._testInfo.outputPath('error-context.md');\n await fs.promises.writeFile(filePath, lines.join('\\n'), 'utf8');\n\n this._testInfo._attach({\n name: 'error-context',\n contentType: 'text/markdown',\n path: filePath,\n }, undefined);\n }\n }\n\n private async _startTraceChunkOnContextCreation(channelOwner: ChannelOwner, tracing: Tracing) {\n await channelOwner._wrapApiCall(async () => {\n const options = this._testInfo._tracing.traceOptions();\n if (options) {\n const title = this._testInfo._tracing.traceTitle();\n const name = this._testInfo._tracing.generateNextTraceRecordingName();\n if (!(tracing as any)[kTracingStarted]) {\n await tracing.start({ ...options, title, name });\n (tracing as any)[kTracingStarted] = true;\n } else {\n await tracing.startChunk({ title, name });\n }\n } else {\n if ((tracing as any)[kTracingStarted]) {\n (tracing as any)[kTracingStarted] = false;\n await tracing.stop();\n }\n }\n }, { internal: true });\n }\n\n private async _stopTracing(channelOwner: ChannelOwner, tracing: Tracing) {\n await channelOwner._wrapApiCall(async () => {\n if ((tracing as any)[this._startedCollectingArtifacts])\n return;\n (tracing as any)[this._startedCollectingArtifacts] = true;\n if (this._testInfo._tracing.traceOptions() && (tracing as any)[kTracingStarted])\n await tracing.stopChunk({ path: this._testInfo._tracing.maybeGenerateNextTraceRecordingPath() });\n }, { internal: true });\n }\n}\n\nfunction renderTitle(type: string, method: string, params: Record<string, string> | undefined, title?: string) {\n const prefix = renderTitleForCall({ title, type, method, params });\n let selector;\n if (params?.['selector'] && typeof params.selector === 'string')\n selector = asLocatorDescription('javascript', params.selector);\n return prefix + (selector ? ` ${selector}` : '');\n}\n\nfunction tracing() {\n return (test.info() as TestInfoImpl)._tracing;\n}\n\nexport const test = _baseTest.extend<TestFixtures, WorkerFixtures>(playwrightFixtures);\n\nexport { defineConfig } from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ACF,GAAG,EAAE,UAAU,KAAK,CAAC;AAAA,EACvB;AAAA,EAEA,MAAc,aAAa,cAA4BA,UAAkB;AACvE,UAAM,aAAa,aAAa,YAAY;AAC1C,UAAKA,SAAgB,KAAK,2BAA2B;AACnD;AACF,MAACA,SAAgB,KAAK,2BAA2B,IAAI;AACrD,UAAI,KAAK,UAAU,SAAS,aAAa,KAAMA,SAAgB,eAAe;AAC5E,cAAMA,SAAQ,UAAU,EAAE,MAAM,KAAK,UAAU,SAAS,oCAAoC,EAAE,CAAC;AAAA,IACnG,GAAG,EAAE,UAAU,KAAK,CAAC;AAAA,EACvB;AACF;AAEA,SAAS,YAAY,MAAc,QAAgB,QAA4C,OAAgB;AAC7G,QAAM,aAAS,iCAAmB,EAAE,OAAO,MAAM,QAAQ,OAAO,CAAC;AACjE,MAAI;AACJ,MAAI,SAAS,UAAU,KAAK,OAAO,OAAO,aAAa;AACrD,mBAAW,mCAAqB,cAAc,OAAO,QAAQ;AAC/D,SAAO,UAAU,WAAW,IAAI,QAAQ,KAAK;AAC/C;AAEA,SAAS,UAAU;AACjB,SAAQ,KAAK,KAAK,EAAmB;AACvC;AAEO,MAAM,OAAO,UAAU,OAAqC,kBAAkB;",
|
|
6
|
-
"names": ["import_testType", "import_expect", "path", "browser", "testInfo", "step", "video", "context", "fs", "tracing"]
|
|
7
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../src/internalsForTest.ts"],
|
|
4
|
-
"sourcesContent": ["/**\n * Copyright (c) Microsoft Corporation.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport path from 'path';\n\nimport { fileDependenciesForTest } from './transform/compilationCache';\n\nexport function fileDependencies() {\n return Object.fromEntries([...fileDependenciesForTest().entries()].map(entry => (\n [path.basename(entry[0]), [...entry[1]].map(f => path.basename(f)).sort()]\n )));\n}\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAgBA,kBAAiB;AAEjB,8BAAwC;AAEjC,SAAS,mBAAmB;AACjC,SAAO,OAAO,YAAY,CAAC,OAAG,iDAAwB,EAAE,QAAQ,CAAC,EAAE,IAAI,WACrE,CAAC,YAAAA,QAAK,SAAS,MAAM,CAAC,CAAC,GAAG,CAAC,GAAG,MAAM,CAAC,CAAC,EAAE,IAAI,OAAK,YAAAA,QAAK,SAAS,CAAC,CAAC,EAAE,KAAK,CAAC,CAC1E,CAAC;AACJ;",
|
|
6
|
-
"names": ["path"]
|
|
7
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../src/isomorphic/events.ts"],
|
|
4
|
-
"sourcesContent": ["/**\n * Copyright (c) Microsoft Corporation.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport namespace Disposable {\n export function disposeAll(disposables: Disposable[]): void {\n for (const disposable of disposables.splice(0))\n disposable.dispose();\n }\n}\n\nexport type Disposable = {\n dispose(): void;\n};\n\nexport interface Event<T> {\n (listener: (e: T) => any, disposables?: Disposable[]): Disposable;\n}\n\nexport class EventEmitter<T> {\n public event: Event<T>;\n\n private _deliveryQueue?: {listener: (e: T) => void, event: T}[];\n private _listeners = new Set<(e: T) => void>();\n\n constructor() {\n this.event = (listener: (e: T) => any, disposables?: Disposable[]) => {\n this._listeners.add(listener);\n let disposed = false;\n const self = this;\n const result: Disposable = {\n dispose() {\n if (!disposed) {\n disposed = true;\n self._listeners.delete(listener);\n }\n }\n };\n if (disposables)\n disposables.push(result);\n return result;\n };\n }\n\n fire(event: T): void {\n const dispatch = !this._deliveryQueue;\n if (!this._deliveryQueue)\n this._deliveryQueue = [];\n for (const listener of this._listeners)\n this._deliveryQueue.push({ listener, event });\n if (!dispatch)\n return;\n for (let index = 0; index < this._deliveryQueue.length; index++) {\n const { listener, event } = this._deliveryQueue[index];\n listener.call(null, event);\n }\n this._deliveryQueue = undefined;\n }\n\n dispose() {\n this._listeners.clear();\n if (this._deliveryQueue)\n this._deliveryQueue = [];\n }\n}\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAgBO,IAAU;AAAA,CAAV,CAAUA,gBAAV;AACE,WAAS,WAAW,aAAiC;AAC1D,eAAW,cAAc,YAAY,OAAO,CAAC;AAC3C,iBAAW,QAAQ;AAAA,EACvB;AAHO,EAAAA,YAAS;AAAA,GADD;AAeV,MAAM,aAAgB;AAAA,EAM3B,cAAc;AAFd,SAAQ,aAAa,oBAAI,IAAoB;AAG3C,SAAK,QAAQ,CAAC,UAAyB,gBAA+B;AACpE,WAAK,WAAW,IAAI,QAAQ;AAC5B,UAAI,WAAW;AACf,YAAM,OAAO;AACb,YAAM,SAAqB;AAAA,QACzB,UAAU;AACR,cAAI,CAAC,UAAU;AACb,uBAAW;AACX,iBAAK,WAAW,OAAO,QAAQ;AAAA,UACjC;AAAA,QACF;AAAA,MACF;AACA,UAAI;AACF,oBAAY,KAAK,MAAM;AACzB,aAAO;AAAA,IACT;AAAA,EACF;AAAA,EAEA,KAAK,OAAgB;AACnB,UAAM,WAAW,CAAC,KAAK;AACvB,QAAI,CAAC,KAAK;AACR,WAAK,iBAAiB,CAAC;AACzB,eAAW,YAAY,KAAK;AAC1B,WAAK,eAAe,KAAK,EAAE,UAAU,MAAM,CAAC;AAC9C,QAAI,CAAC;AACH;AACF,aAAS,QAAQ,GAAG,QAAQ,KAAK,eAAe,QAAQ,SAAS;AAC/D,YAAM,EAAE,UAAU,OAAAC,OAAM,IAAI,KAAK,eAAe,KAAK;AACrD,eAAS,KAAK,MAAMA,MAAK;AAAA,IAC3B;AACA,SAAK,iBAAiB;AAAA,EACxB;AAAA,EAEA,UAAU;AACR,SAAK,WAAW,MAAM;AACtB,QAAI,KAAK;AACP,WAAK,iBAAiB,CAAC;AAAA,EAC3B;AACF;",
|
|
6
|
-
"names": ["Disposable", "event"]
|
|
7
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../src/isomorphic/folders.ts"],
|
|
4
|
-
"sourcesContent": ["/**\n * Copyright (c) Microsoft Corporation.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport function artifactsFolderName(workerIndex: number) {\n return `.playwright-artifacts-${workerIndex}`;\n}\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAgBO,SAAS,oBAAoB,aAAqB;AACvD,SAAO,yBAAyB,WAAW;AAC7C;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../src/isomorphic/stringInternPool.ts"],
|
|
4
|
-
"sourcesContent": ["/**\n * Copyright (c) Microsoft Corporation.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport class StringInternPool {\n private _stringCache = new Map<string, string>();\n\n public internString(s: string): string {\n let result = this._stringCache.get(s);\n if (!result) {\n this._stringCache.set(s, s);\n result = s;\n }\n return result;\n }\n}\n\nexport class JsonStringInternalizer {\n private readonly _pool;\n\n constructor(pool: StringInternPool) {\n this._pool = pool;\n }\n\n traverse(value: any) {\n if (typeof value !== 'object')\n return;\n if (Array.isArray(value)) {\n for (let i = 0; i < value.length; i++) {\n if (typeof value[i] === 'string')\n value[i] = this.intern(value[i]);\n else\n this.traverse(value[i]);\n }\n } else {\n for (const name in value) {\n if (typeof value[name] === 'string')\n value[name] = this.intern(value[name]);\n else\n this.traverse(value[name]);\n }\n }\n }\n\n private intern(value: string): string {\n return this._pool.internString(value);\n }\n}\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAgBO,MAAM,iBAAiB;AAAA,EAAvB;AACL,SAAQ,eAAe,oBAAI,IAAoB;AAAA;AAAA,EAExC,aAAa,GAAmB;AACrC,QAAI,SAAS,KAAK,aAAa,IAAI,CAAC;AACpC,QAAI,CAAC,QAAQ;AACX,WAAK,aAAa,IAAI,GAAG,CAAC;AAC1B,eAAS;AAAA,IACX;AACA,WAAO;AAAA,EACT;AACF;AAEO,MAAM,uBAAuB;AAAA,EAGlC,YAAY,MAAwB;AAClC,SAAK,QAAQ;AAAA,EACf;AAAA,EAEA,SAAS,OAAY;AACnB,QAAI,OAAO,UAAU;AACnB;AACF,QAAI,MAAM,QAAQ,KAAK,GAAG;AACxB,eAAS,IAAI,GAAG,IAAI,MAAM,QAAQ,KAAK;AACrC,YAAI,OAAO,MAAM,CAAC,MAAM;AACtB,gBAAM,CAAC,IAAI,KAAK,OAAO,MAAM,CAAC,CAAC;AAAA;AAE/B,eAAK,SAAS,MAAM,CAAC,CAAC;AAAA,MAC1B;AAAA,IACF,OAAO;AACL,iBAAW,QAAQ,OAAO;AACxB,YAAI,OAAO,MAAM,IAAI,MAAM;AACzB,gBAAM,IAAI,IAAI,KAAK,OAAO,MAAM,IAAI,CAAC;AAAA;AAErC,eAAK,SAAS,MAAM,IAAI,CAAC;AAAA,MAC7B;AAAA,IACF;AAAA,EACF;AAAA,EAEQ,OAAO,OAAuB;AACpC,WAAO,KAAK,MAAM,aAAa,KAAK;AAAA,EACtC;AACF;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|