@stablyai/internal-playwright 0.1.0
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/LICENSE +202 -0
- package/NOTICE +5 -0
- package/README.md +168 -0
- package/ThirdPartyNotices.txt +6277 -0
- package/cli.js +19 -0
- package/index.d.ts +17 -0
- package/index.js +17 -0
- package/index.mjs +18 -0
- package/jsx-runtime.js +42 -0
- package/jsx-runtime.mjs +21 -0
- package/lib/agents/generateAgents.js +265 -0
- package/lib/agents/generator.md +102 -0
- package/lib/agents/healer.md +78 -0
- package/lib/agents/planner.md +135 -0
- package/lib/cli.js +274 -0
- package/lib/common/config.js +274 -0
- package/lib/common/config.js.map +7 -0
- package/lib/common/configLoader.js +377 -0
- package/lib/common/configLoader.js.map +7 -0
- package/lib/common/esmLoaderHost.js +102 -0
- package/lib/common/esmLoaderHost.js.map +7 -0
- package/lib/common/expectBundle.js +52 -0
- package/lib/common/expectBundle.js.map +7 -0
- package/lib/common/expectBundleImpl.js +389 -0
- package/lib/common/expectBundleImpl.js.map +7 -0
- package/lib/common/fixtures.js +302 -0
- package/lib/common/fixtures.js.map +7 -0
- package/lib/common/globals.js +58 -0
- package/lib/common/globals.js.map +7 -0
- package/lib/common/ipc.js +60 -0
- package/lib/common/ipc.js.map +7 -0
- package/lib/common/poolBuilder.js +85 -0
- package/lib/common/poolBuilder.js.map +7 -0
- package/lib/common/process.js +104 -0
- package/lib/common/process.js.map +7 -0
- package/lib/common/suiteUtils.js +140 -0
- package/lib/common/suiteUtils.js.map +7 -0
- package/lib/common/test.js +321 -0
- package/lib/common/test.js.map +7 -0
- package/lib/common/testLoader.js +100 -0
- package/lib/common/testLoader.js.map +7 -0
- package/lib/common/testType.js +310 -0
- package/lib/common/testType.js.map +7 -0
- package/lib/fsWatcher.js +67 -0
- package/lib/fsWatcher.js.map +7 -0
- package/lib/index.js +696 -0
- package/lib/index.js.map +7 -0
- package/lib/internalsForTest.js +42 -0
- package/lib/internalsForTest.js.map +7 -0
- package/lib/isomorphic/events.js +77 -0
- package/lib/isomorphic/events.js.map +7 -0
- package/lib/isomorphic/folders.js +30 -0
- package/lib/isomorphic/folders.js.map +7 -0
- package/lib/isomorphic/stringInternPool.js +69 -0
- package/lib/isomorphic/stringInternPool.js.map +7 -0
- package/lib/isomorphic/teleReceiver.js +507 -0
- package/lib/isomorphic/teleReceiver.js.map +7 -0
- package/lib/isomorphic/teleSuiteUpdater.js +137 -0
- package/lib/isomorphic/teleSuiteUpdater.js.map +7 -0
- package/lib/isomorphic/testServerConnection.js +211 -0
- package/lib/isomorphic/testServerConnection.js.map +7 -0
- package/lib/isomorphic/testServerInterface.js +16 -0
- package/lib/isomorphic/testServerInterface.js.map +7 -0
- package/lib/isomorphic/testTree.js +334 -0
- package/lib/isomorphic/testTree.js.map +7 -0
- package/lib/isomorphic/types.d.js +16 -0
- package/lib/isomorphic/types.d.js.map +7 -0
- package/lib/loader/loaderMain.js +59 -0
- package/lib/loader/loaderMain.js.map +7 -0
- package/lib/matchers/expect.js +325 -0
- package/lib/matchers/expect.js.map +7 -0
- package/lib/matchers/matcherHint.js +87 -0
- package/lib/matchers/matcherHint.js.map +7 -0
- package/lib/matchers/matchers.js +366 -0
- package/lib/matchers/matchers.js.map +7 -0
- package/lib/matchers/toBeTruthy.js +73 -0
- package/lib/matchers/toBeTruthy.js.map +7 -0
- package/lib/matchers/toEqual.js +99 -0
- package/lib/matchers/toEqual.js.map +7 -0
- package/lib/matchers/toHaveURL.js +102 -0
- package/lib/matchers/toHaveURL.js.map +7 -0
- package/lib/matchers/toMatchAriaSnapshot.js +159 -0
- package/lib/matchers/toMatchAriaSnapshot.js.map +7 -0
- package/lib/matchers/toMatchSnapshot.js +359 -0
- package/lib/matchers/toMatchSnapshot.js.map +7 -0
- package/lib/matchers/toMatchText.js +99 -0
- package/lib/matchers/toMatchText.js.map +7 -0
- package/lib/mcp/browser/actions.d.js +16 -0
- package/lib/mcp/browser/backend.js +93 -0
- package/lib/mcp/browser/backend.js.map +7 -0
- package/lib/mcp/browser/browserContextFactory.js +296 -0
- package/lib/mcp/browser/browserServerBackend.js +76 -0
- package/lib/mcp/browser/codegen.js +66 -0
- package/lib/mcp/browser/config.js +385 -0
- package/lib/mcp/browser/context.js +287 -0
- package/lib/mcp/browser/response.js +228 -0
- package/lib/mcp/browser/sessionLog.js +160 -0
- package/lib/mcp/browser/tab.js +277 -0
- package/lib/mcp/browser/tool.js +30 -0
- package/lib/mcp/browser/tool.js.map +7 -0
- package/lib/mcp/browser/tools/common.js +63 -0
- package/lib/mcp/browser/tools/console.js +44 -0
- package/lib/mcp/browser/tools/dialogs.js +60 -0
- package/lib/mcp/browser/tools/evaluate.js +70 -0
- package/lib/mcp/browser/tools/files.js +58 -0
- package/lib/mcp/browser/tools/form.js +74 -0
- package/lib/mcp/browser/tools/install.js +69 -0
- package/lib/mcp/browser/tools/keyboard.js +85 -0
- package/lib/mcp/browser/tools/mouse.js +107 -0
- package/lib/mcp/browser/tools/navigate.js +62 -0
- package/lib/mcp/browser/tools/network.js +54 -0
- package/lib/mcp/browser/tools/pdf.js +59 -0
- package/lib/mcp/browser/tools/screenshot.js +88 -0
- package/lib/mcp/browser/tools/snapshot.js +182 -0
- package/lib/mcp/browser/tools/tabs.js +67 -0
- package/lib/mcp/browser/tools/tool.js +49 -0
- package/lib/mcp/browser/tools/tracing.js +74 -0
- package/lib/mcp/browser/tools/utils.js +100 -0
- package/lib/mcp/browser/tools/verify.js +154 -0
- package/lib/mcp/browser/tools/wait.js +63 -0
- package/lib/mcp/browser/tools.js +80 -0
- package/lib/mcp/browser/tools.js.map +7 -0
- package/lib/mcp/browser/watchdog.js +44 -0
- package/lib/mcp/config.d.js +16 -0
- package/lib/mcp/extension/cdpRelay.js +351 -0
- package/lib/mcp/extension/extensionContextFactory.js +75 -0
- package/lib/mcp/extension/protocol.js +28 -0
- package/lib/mcp/index.js +61 -0
- package/lib/mcp/log.js +35 -0
- package/lib/mcp/program.js +96 -0
- package/lib/mcp/sdk/bundle.js +81 -0
- package/lib/mcp/sdk/bundle.js.map +7 -0
- package/lib/mcp/sdk/call.js +49 -0
- package/lib/mcp/sdk/call.js.map +7 -0
- package/lib/mcp/sdk/exports.js +32 -0
- package/lib/mcp/sdk/exports.js.map +7 -0
- package/lib/mcp/sdk/http.js +187 -0
- package/lib/mcp/sdk/http.js.map +7 -0
- package/lib/mcp/sdk/inProcessTransport.js +71 -0
- package/lib/mcp/sdk/inProcessTransport.js.map +7 -0
- package/lib/mcp/sdk/mdb.js +206 -0
- package/lib/mcp/sdk/mdb.js.map +7 -0
- package/lib/mcp/sdk/proxyBackend.js +128 -0
- package/lib/mcp/sdk/proxyBackend.js.map +7 -0
- package/lib/mcp/sdk/server.js +189 -0
- package/lib/mcp/sdk/server.js.map +7 -0
- package/lib/mcp/sdk/tool.js +51 -0
- package/lib/mcp/sdk/tool.js.map +7 -0
- package/lib/mcp/test/backend.js +67 -0
- package/lib/mcp/test/backend.js.map +7 -0
- package/lib/mcp/test/browserBackend.js +98 -0
- package/lib/mcp/test/context.js +48 -0
- package/lib/mcp/test/context.js.map +7 -0
- package/lib/mcp/test/generatorTools.js +122 -0
- package/lib/mcp/test/plannerTools.js +46 -0
- package/lib/mcp/test/seed.js +72 -0
- package/lib/mcp/test/streams.js +39 -0
- package/lib/mcp/test/streams.js.map +7 -0
- package/lib/mcp/test/testBackend.js +97 -0
- package/lib/mcp/test/testContext.js +176 -0
- package/lib/mcp/test/testTool.js +30 -0
- package/lib/mcp/test/testTools.js +115 -0
- package/lib/mcp/test/tool.js +30 -0
- package/lib/mcp/test/tool.js.map +7 -0
- package/lib/mcp/test/tools.js +150 -0
- package/lib/mcp/test/tools.js.map +7 -0
- package/lib/mcp/vscode/host.js +187 -0
- package/lib/mcp/vscode/main.js +77 -0
- package/lib/mcpBundleImpl.js +41 -0
- package/lib/mcpBundleImpl.js.map +7 -0
- package/lib/plugins/gitCommitInfoPlugin.js +198 -0
- package/lib/plugins/gitCommitInfoPlugin.js.map +7 -0
- package/lib/plugins/index.js +28 -0
- package/lib/plugins/index.js.map +7 -0
- package/lib/plugins/webServerPlugin.js +209 -0
- package/lib/plugins/webServerPlugin.js.map +7 -0
- package/lib/program.js +412 -0
- package/lib/program.js.map +7 -0
- package/lib/reporters/base.js +609 -0
- package/lib/reporters/base.js.map +7 -0
- package/lib/reporters/blob.js +135 -0
- package/lib/reporters/blob.js.map +7 -0
- package/lib/reporters/dot.js +82 -0
- package/lib/reporters/dot.js.map +7 -0
- package/lib/reporters/empty.js +32 -0
- package/lib/reporters/empty.js.map +7 -0
- package/lib/reporters/github.js +128 -0
- package/lib/reporters/github.js.map +7 -0
- package/lib/reporters/html.js +644 -0
- package/lib/reporters/html.js.map +7 -0
- package/lib/reporters/internalReporter.js +130 -0
- package/lib/reporters/internalReporter.js.map +7 -0
- package/lib/reporters/json.js +254 -0
- package/lib/reporters/json.js.map +7 -0
- package/lib/reporters/junit.js +230 -0
- package/lib/reporters/junit.js.map +7 -0
- package/lib/reporters/line.js +113 -0
- package/lib/reporters/line.js.map +7 -0
- package/lib/reporters/list.js +235 -0
- package/lib/reporters/list.js.map +7 -0
- package/lib/reporters/listModeReporter.js +69 -0
- package/lib/reporters/listModeReporter.js.map +7 -0
- package/lib/reporters/markdown.js +144 -0
- package/lib/reporters/markdown.js.map +7 -0
- package/lib/reporters/merge.js +535 -0
- package/lib/reporters/merge.js.map +7 -0
- package/lib/reporters/multiplexer.js +104 -0
- package/lib/reporters/multiplexer.js.map +7 -0
- package/lib/reporters/reporterV2.js +102 -0
- package/lib/reporters/reporterV2.js.map +7 -0
- package/lib/reporters/teleEmitter.js +297 -0
- package/lib/reporters/teleEmitter.js.map +7 -0
- package/lib/reporters/versions/blobV1.js +16 -0
- package/lib/reporters/versions/blobV1.js.map +7 -0
- package/lib/runner/dispatcher.js +491 -0
- package/lib/runner/dispatcher.js.map +7 -0
- package/lib/runner/failureTracker.js +72 -0
- package/lib/runner/failureTracker.js.map +7 -0
- package/lib/runner/lastRun.js +77 -0
- package/lib/runner/lastRun.js.map +7 -0
- package/lib/runner/loadUtils.js +333 -0
- package/lib/runner/loadUtils.js.map +7 -0
- package/lib/runner/loaderHost.js +89 -0
- package/lib/runner/loaderHost.js.map +7 -0
- package/lib/runner/processHost.js +161 -0
- package/lib/runner/processHost.js.map +7 -0
- package/lib/runner/projectUtils.js +241 -0
- package/lib/runner/projectUtils.js.map +7 -0
- package/lib/runner/rebase.js +189 -0
- package/lib/runner/rebase.js.map +7 -0
- package/lib/runner/reporters.js +137 -0
- package/lib/runner/reporters.js.map +7 -0
- package/lib/runner/runner.js +173 -0
- package/lib/runner/sigIntWatcher.js +96 -0
- package/lib/runner/sigIntWatcher.js.map +7 -0
- package/lib/runner/taskRunner.js +127 -0
- package/lib/runner/taskRunner.js.map +7 -0
- package/lib/runner/tasks.js +410 -0
- package/lib/runner/tasks.js.map +7 -0
- package/lib/runner/testGroups.js +117 -0
- package/lib/runner/testGroups.js.map +7 -0
- package/lib/runner/testRunner.js +390 -0
- package/lib/runner/testRunner.js.map +7 -0
- package/lib/runner/testServer.js +264 -0
- package/lib/runner/testServer.js.map +7 -0
- package/lib/runner/uiMode.js +271 -0
- package/lib/runner/uiModeReporter.js +30 -0
- package/lib/runner/uiModeReporter.js.map +7 -0
- package/lib/runner/vcs.js +72 -0
- package/lib/runner/vcs.js.map +7 -0
- package/lib/runner/watchMode.js +395 -0
- package/lib/runner/watchMode.js.map +7 -0
- package/lib/runner/workerHost.js +95 -0
- package/lib/runner/workerHost.js.map +7 -0
- package/lib/store.js +98 -0
- package/lib/third_party/pirates.js +62 -0
- package/lib/third_party/pirates.js.map +7 -0
- package/lib/third_party/tsconfig-loader.js +103 -0
- package/lib/third_party/tsconfig-loader.js.map +7 -0
- package/lib/transform/babelBundle.js +43 -0
- package/lib/transform/babelBundle.js.map +7 -0
- package/lib/transform/babelBundleImpl.js +461 -0
- package/lib/transform/babelBundleImpl.js.map +7 -0
- package/lib/transform/compilationCache.js +272 -0
- package/lib/transform/compilationCache.js.map +7 -0
- package/lib/transform/esmLoader.js +104 -0
- package/lib/transform/esmLoader.js.map +7 -0
- package/lib/transform/esmUtils.js +32 -0
- package/lib/transform/portTransport.js +67 -0
- package/lib/transform/portTransport.js.map +7 -0
- package/lib/transform/transform.js +293 -0
- package/lib/transform/transform.js.map +7 -0
- package/lib/util.js +403 -0
- package/lib/util.js.map +7 -0
- package/lib/utilsBundle.js +43 -0
- package/lib/utilsBundle.js.map +7 -0
- package/lib/utilsBundleImpl.js +100 -0
- package/lib/utilsBundleImpl.js.map +7 -0
- package/lib/worker/fixtureRunner.js +258 -0
- package/lib/worker/fixtureRunner.js.map +7 -0
- package/lib/worker/stepContext.js +34 -0
- package/lib/worker/testInfo.js +508 -0
- package/lib/worker/testInfo.js.map +7 -0
- package/lib/worker/testTracing.js +344 -0
- package/lib/worker/testTracing.js.map +7 -0
- package/lib/worker/timeoutManager.js +174 -0
- package/lib/worker/timeoutManager.js.map +7 -0
- package/lib/worker/util.js +31 -0
- package/lib/worker/util.js.map +7 -0
- package/lib/worker/workerMain.js +520 -0
- package/lib/worker/workerMain.js.map +7 -0
- package/package.json +74 -0
- package/test.d.ts +18 -0
- package/test.js +24 -0
- package/test.mjs +33 -0
- package/types/test.d.ts +10217 -0
- package/types/testReporter.d.ts +816 -0
@@ -0,0 +1,7 @@
|
|
1
|
+
{
|
2
|
+
"version": 3,
|
3
|
+
"sources": ["../../src/reporters/html.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';\nimport { Transform } from 'stream';\n\nimport { HttpServer, MultiMap, assert, calculateSha1, getPackageManagerExecCommand, copyFileAndMakeWritable, gracefullyProcessExitDoNotHang, removeFolders, sanitizeForFilePath, toPosixPath } from 'playwright-core/lib/utils';\nimport { colors } from 'playwright-core/lib/utils';\nimport { open } from 'playwright-core/lib/utilsBundle';\nimport { mime } from 'playwright-core/lib/utilsBundle';\nimport { yazl } from 'playwright-core/lib/zipBundle';\n\nimport { CommonReporterOptions, formatError, formatResultFailure, internalScreen } from './base';\nimport { codeFrameColumns } from '../transform/babelBundle';\nimport { resolveReporterOutputPath, stripAnsiEscapes } from '../util';\n\nimport type { ReporterV2 } from './reporterV2';\nimport type { HtmlReporterOptions as HtmlReporterConfigOptions, Metadata, TestAnnotation } from '../../types/test';\nimport type * as api from '../../types/testReporter';\nimport type { HTMLReport, Location, Stats, TestAttachment, TestCase, TestCaseSummary, TestFile, TestFileSummary, TestResult, TestStep } from '@html-reporter/types';\nimport type { ZipFile } from 'playwright-core/lib/zipBundle';\nimport type { TransformCallback } from 'stream';\n\ntype TestEntry = {\n testCase: TestCase;\n testCaseSummary: TestCaseSummary\n};\n\ntype HtmlReportOpenOption = NonNullable<HtmlReporterConfigOptions['open']>;\nconst htmlReportOptions: HtmlReportOpenOption[] = ['always', 'never', 'on-failure'];\n\nconst isHtmlReportOption = (type: string): type is HtmlReportOpenOption => {\n return htmlReportOptions.includes(type as HtmlReportOpenOption);\n};\n\nclass HtmlReporter implements ReporterV2 {\n private config!: api.FullConfig;\n private suite!: api.Suite;\n private _options: HtmlReporterConfigOptions & CommonReporterOptions;\n private _outputFolder!: string;\n private _attachmentsBaseURL!: string;\n private _open: string | undefined;\n private _port: number | undefined;\n private _host: string | undefined;\n private _buildResult: { ok: boolean, singleTestId: string | undefined } | undefined;\n private _topLevelErrors: api.TestError[] = [];\n\n constructor(options: HtmlReporterConfigOptions & CommonReporterOptions) {\n this._options = options;\n }\n\n version(): 'v2' {\n return 'v2';\n }\n\n printsToStdio() {\n return false;\n }\n\n onConfigure(config: api.FullConfig) {\n this.config = config;\n }\n\n onBegin(suite: api.Suite) {\n const { outputFolder, open, attachmentsBaseURL, host, port } = this._resolveOptions();\n this._outputFolder = outputFolder;\n this._open = open;\n this._host = host;\n this._port = port;\n this._attachmentsBaseURL = attachmentsBaseURL;\n const reportedWarnings = new Set<string>();\n for (const project of this.config.projects) {\n if (this._isSubdirectory(outputFolder, project.outputDir) || this._isSubdirectory(project.outputDir, outputFolder)) {\n const key = outputFolder + '|' + project.outputDir;\n if (reportedWarnings.has(key))\n continue;\n reportedWarnings.add(key);\n writeLine(colors.red(`Configuration Error: HTML reporter output folder clashes with the tests output folder:`));\n writeLine(`\n html reporter folder: ${colors.bold(outputFolder)}\n test results folder: ${colors.bold(project.outputDir)}`);\n writeLine('');\n writeLine(`HTML reporter will clear its output directory prior to being generated, which will lead to the artifact loss.\n`);\n }\n }\n this.suite = suite;\n }\n\n _resolveOptions(): { outputFolder: string, open: HtmlReportOpenOption, attachmentsBaseURL: string, host: string | undefined, port: number | undefined } {\n const outputFolder = reportFolderFromEnv() ?? resolveReporterOutputPath('playwright-report', this._options.configDir, this._options.outputFolder);\n return {\n outputFolder,\n open: getHtmlReportOptionProcessEnv() || this._options.open || 'on-failure',\n attachmentsBaseURL: process.env.PLAYWRIGHT_HTML_ATTACHMENTS_BASE_URL || this._options.attachmentsBaseURL || 'data/',\n host: process.env.PLAYWRIGHT_HTML_HOST || this._options.host,\n port: process.env.PLAYWRIGHT_HTML_PORT ? +process.env.PLAYWRIGHT_HTML_PORT : this._options.port,\n };\n }\n\n _isSubdirectory(parentDir: string, dir: string): boolean {\n const relativePath = path.relative(parentDir, dir);\n return !!relativePath && !relativePath.startsWith('..') && !path.isAbsolute(relativePath);\n }\n\n onError(error: api.TestError): void {\n this._topLevelErrors.push(error);\n }\n\n async onEnd(result: api.FullResult) {\n const projectSuites = this.suite.suites;\n await removeFolders([this._outputFolder]);\n let noSnippets: boolean | undefined;\n if (process.env.PLAYWRIGHT_HTML_NO_SNIPPETS === 'false' || process.env.PLAYWRIGHT_HTML_NO_SNIPPETS === '0')\n noSnippets = false;\n else if (process.env.PLAYWRIGHT_HTML_NO_SNIPPETS)\n noSnippets = true;\n noSnippets = noSnippets || this._options.noSnippets;\n\n const builder = new HtmlBuilder(this.config, this._outputFolder, this._attachmentsBaseURL, process.env.PLAYWRIGHT_HTML_TITLE || this._options.title, noSnippets);\n this._buildResult = await builder.build(this.config.metadata, projectSuites, result, this._topLevelErrors);\n }\n\n async onExit() {\n if (process.env.CI || !this._buildResult)\n return;\n const { ok, singleTestId } = this._buildResult;\n const shouldOpen = !this._options._isTestServer && (this._open === 'always' || (!ok && this._open === 'on-failure'));\n if (shouldOpen) {\n await showHTMLReport(this._outputFolder, this._host, this._port, singleTestId);\n } else if (this._options._mode === 'test' && !this._options._isTestServer) {\n const packageManagerCommand = getPackageManagerExecCommand();\n const relativeReportPath = this._outputFolder === standaloneDefaultFolder() ? '' : ' ' + path.relative(process.cwd(), this._outputFolder);\n const hostArg = this._host ? ` --host ${this._host}` : '';\n const portArg = this._port ? ` --port ${this._port}` : '';\n writeLine('');\n writeLine('To open last HTML report run:');\n writeLine(colors.cyan(`\n ${packageManagerCommand} playwright show-report${relativeReportPath}${hostArg}${portArg}\n`));\n }\n }\n}\n\nfunction reportFolderFromEnv(): string | undefined {\n // Note: PLAYWRIGHT_HTML_REPORT is for backwards compatibility.\n const envValue = process.env.PLAYWRIGHT_HTML_OUTPUT_DIR || process.env.PLAYWRIGHT_HTML_REPORT;\n return envValue ? path.resolve(envValue) : undefined;\n}\n\nfunction getHtmlReportOptionProcessEnv(): HtmlReportOpenOption | undefined {\n // Note: PW_TEST_HTML_REPORT_OPEN is for backwards compatibility.\n const htmlOpenEnv = process.env.PLAYWRIGHT_HTML_OPEN || process.env.PW_TEST_HTML_REPORT_OPEN;\n if (!htmlOpenEnv)\n return undefined;\n if (!isHtmlReportOption(htmlOpenEnv)) {\n writeLine(colors.red(`Configuration Error: HTML reporter Invalid value for PLAYWRIGHT_HTML_OPEN: ${htmlOpenEnv}. Valid values are: ${htmlReportOptions.join(', ')}`));\n return undefined;\n }\n return htmlOpenEnv;\n}\n\nfunction standaloneDefaultFolder(): string {\n return reportFolderFromEnv() ?? resolveReporterOutputPath('playwright-report', process.cwd(), undefined);\n}\n\nexport async function showHTMLReport(reportFolder: string | undefined, host: string = 'localhost', port?: number, testId?: string) {\n const folder = reportFolder ?? standaloneDefaultFolder();\n try {\n assert(fs.statSync(folder).isDirectory());\n } catch (e) {\n writeLine(colors.red(`No report found at \"${folder}\"`));\n gracefullyProcessExitDoNotHang(1);\n return;\n }\n const server = startHtmlReportServer(folder);\n await server.start({ port, host, preferredPort: port ? undefined : 9323 });\n let url = server.urlPrefix('human-readable');\n writeLine('');\n writeLine(colors.cyan(` Serving HTML report at ${url}. Press Ctrl+C to quit.`));\n if (testId)\n url += `#?testId=${testId}`;\n url = url.replace('0.0.0.0', 'localhost');\n await open(url, { wait: true }).catch(() => {});\n await new Promise(() => {});\n}\n\nexport function startHtmlReportServer(folder: string): HttpServer {\n const server = new HttpServer();\n server.routePrefix('/', (request, response) => {\n let relativePath = new URL('http://localhost' + request.url).pathname;\n if (relativePath.startsWith('/trace/file')) {\n const url = new URL('http://localhost' + request.url!);\n try {\n return server.serveFile(request, response, url.searchParams.get('path')!);\n } catch (e) {\n return false;\n }\n }\n if (relativePath.endsWith('/stall.js'))\n return true;\n if (relativePath === '/')\n relativePath = '/index.html';\n const absolutePath = path.join(folder, ...relativePath.split('/'));\n return server.serveFile(request, response, absolutePath);\n });\n return server;\n}\n\nclass HtmlBuilder {\n private _config: api.FullConfig;\n private _reportFolder: string;\n private _stepsInFile = new MultiMap<string, TestStep>();\n private _dataZipFile: ZipFile;\n private _hasTraces = false;\n private _attachmentsBaseURL: string;\n private _title: string | undefined;\n private _noSnippets: boolean;\n\n constructor(config: api.FullConfig, outputDir: string, attachmentsBaseURL: string, title: string | undefined, noSnippets: boolean = false) {\n this._config = config;\n this._reportFolder = outputDir;\n this._noSnippets = noSnippets;\n fs.mkdirSync(this._reportFolder, { recursive: true });\n this._dataZipFile = new yazl.ZipFile();\n this._attachmentsBaseURL = attachmentsBaseURL;\n this._title = title;\n }\n\n async build(metadata: Metadata, projectSuites: api.Suite[], result: api.FullResult, topLevelErrors: api.TestError[]): Promise<{ ok: boolean, singleTestId: string | undefined }> {\n const data = new Map<string, { testFile: TestFile, testFileSummary: TestFileSummary }>();\n for (const projectSuite of projectSuites) {\n for (const fileSuite of projectSuite.suites) {\n const fileName = this._relativeLocation(fileSuite.location)!.file;\n const fileId = calculateSha1(toPosixPath(fileName)).slice(0, 20);\n let fileEntry = data.get(fileId);\n if (!fileEntry) {\n fileEntry = {\n testFile: { fileId, fileName, tests: [] },\n testFileSummary: { fileId, fileName, tests: [], stats: emptyStats() },\n };\n data.set(fileId, fileEntry);\n }\n const { testFile, testFileSummary } = fileEntry;\n const testEntries: TestEntry[] = [];\n this._processSuite(fileSuite, projectSuite.project()!.name, [], testEntries);\n for (const test of testEntries) {\n testFile.tests.push(test.testCase);\n testFileSummary.tests.push(test.testCaseSummary);\n }\n }\n }\n if (!this._noSnippets)\n createSnippets(this._stepsInFile);\n\n let ok = true;\n for (const [fileId, { testFile, testFileSummary }] of data) {\n const stats = testFileSummary.stats;\n for (const test of testFileSummary.tests) {\n if (test.outcome === 'expected')\n ++stats.expected;\n if (test.outcome === 'skipped')\n ++stats.skipped;\n if (test.outcome === 'unexpected')\n ++stats.unexpected;\n if (test.outcome === 'flaky')\n ++stats.flaky;\n ++stats.total;\n }\n stats.ok = stats.unexpected + stats.flaky === 0;\n if (!stats.ok)\n ok = false;\n\n const testCaseSummaryComparator = (t1: TestCaseSummary, t2: TestCaseSummary) => {\n const w1 = (t1.outcome === 'unexpected' ? 1000 : 0) + (t1.outcome === 'flaky' ? 1 : 0);\n const w2 = (t2.outcome === 'unexpected' ? 1000 : 0) + (t2.outcome === 'flaky' ? 1 : 0);\n return w2 - w1;\n };\n testFileSummary.tests.sort(testCaseSummaryComparator);\n\n this._addDataFile(fileId + '.json', testFile);\n }\n const htmlReport: HTMLReport = {\n metadata,\n title: this._title,\n startTime: result.startTime.getTime(),\n duration: result.duration,\n files: [...data.values()].map(e => e.testFileSummary),\n projectNames: projectSuites.map(r => r.project()!.name),\n stats: { ...[...data.values()].reduce((a, e) => addStats(a, e.testFileSummary.stats), emptyStats()) },\n errors: topLevelErrors.map(error => formatError(internalScreen, error).message),\n };\n htmlReport.files.sort((f1, f2) => {\n const w1 = f1.stats.unexpected * 1000 + f1.stats.flaky;\n const w2 = f2.stats.unexpected * 1000 + f2.stats.flaky;\n return w2 - w1;\n });\n\n this._addDataFile('report.json', htmlReport);\n\n let singleTestId: string | undefined;\n if (htmlReport.stats.total === 1) {\n const testFile: TestFile = data.values().next().value!.testFile;\n singleTestId = testFile.tests[0].testId;\n }\n\n if (process.env.PW_HMR === '1') {\n const redirectFile = path.join(this._reportFolder, 'index.html');\n\n await this._writeReportData(redirectFile);\n\n async function redirect() {\n const hmrURL = new URL('http://localhost:44224'); // dev server, port is harcoded in build.js\n const popup = window.open(hmrURL);\n const listener = (evt: MessageEvent) => {\n if (evt.source === popup && evt.data === 'ready') {\n const element = document.getElementById('playwrightReportBase64');\n popup!.postMessage(element?.textContent ?? '', hmrURL.origin);\n window.removeEventListener('message', listener);\n // This is generally not allowed\n window.close();\n }\n };\n window.addEventListener('message', listener);\n }\n\n fs.appendFileSync(redirectFile, `<script>(${redirect.toString()})()</script>`);\n\n return { ok, singleTestId };\n }\n\n // Copy app.\n const appFolder = path.join(require.resolve('playwright-core'), '..', 'lib', 'vite', 'htmlReport');\n await copyFileAndMakeWritable(path.join(appFolder, 'index.html'), path.join(this._reportFolder, 'index.html'));\n\n // Copy trace viewer.\n if (this._hasTraces) {\n const traceViewerFolder = path.join(require.resolve('playwright-core'), '..', 'lib', 'vite', 'traceViewer');\n const traceViewerTargetFolder = path.join(this._reportFolder, 'trace');\n const traceViewerAssetsTargetFolder = path.join(traceViewerTargetFolder, 'assets');\n fs.mkdirSync(traceViewerAssetsTargetFolder, { recursive: true });\n for (const file of fs.readdirSync(traceViewerFolder)) {\n if (file.endsWith('.map') || file.includes('watch') || file.includes('assets'))\n continue;\n await copyFileAndMakeWritable(path.join(traceViewerFolder, file), path.join(traceViewerTargetFolder, file));\n }\n for (const file of fs.readdirSync(path.join(traceViewerFolder, 'assets'))) {\n if (file.endsWith('.map') || file.includes('xtermModule'))\n continue;\n await copyFileAndMakeWritable(path.join(traceViewerFolder, 'assets', file), path.join(traceViewerAssetsTargetFolder, file));\n }\n }\n\n await this._writeReportData(path.join(this._reportFolder, 'index.html'));\n\n\n return { ok, singleTestId };\n }\n\n private async _writeReportData(filePath: string) {\n fs.appendFileSync(filePath, '<script id=\"playwrightReportBase64\" type=\"application/zip\">data:application/zip;base64,');\n await new Promise(f => {\n this._dataZipFile!.end(undefined, () => {\n this._dataZipFile!.outputStream\n .pipe(new Base64Encoder())\n .pipe(fs.createWriteStream(filePath, { flags: 'a' })).on('close', f);\n });\n });\n fs.appendFileSync(filePath, '</script>');\n }\n\n private _addDataFile(fileName: string, data: any) {\n this._dataZipFile.addBuffer(Buffer.from(JSON.stringify(data)), fileName);\n }\n\n private _processSuite(suite: api.Suite, projectName: string, path: string[], outTests: TestEntry[]) {\n const newPath = [...path, suite.title];\n suite.entries().forEach(e => {\n if (e.type === 'test')\n outTests.push(this._createTestEntry(e, projectName, newPath));\n else\n this._processSuite(e, projectName, newPath, outTests);\n });\n }\n\n private _createTestEntry(test: api.TestCase, projectName: string, path: string[]): TestEntry {\n const duration = test.results.reduce((a, r) => a + r.duration, 0);\n const location = this._relativeLocation(test.location)!;\n path = path.slice(1).filter(path => path.length > 0);\n const results = test.results.map(r => this._createTestResult(test, r));\n\n return {\n testCase: {\n testId: test.id,\n title: test.title,\n projectName,\n location,\n duration,\n annotations: this._serializeAnnotations(test.annotations),\n tags: test.tags,\n outcome: test.outcome(),\n path,\n results,\n ok: test.outcome() === 'expected' || test.outcome() === 'flaky',\n },\n testCaseSummary: {\n testId: test.id,\n title: test.title,\n projectName,\n location,\n duration,\n annotations: this._serializeAnnotations(test.annotations),\n tags: test.tags,\n outcome: test.outcome(),\n path,\n ok: test.outcome() === 'expected' || test.outcome() === 'flaky',\n results: results.map(result => {\n return { attachments: result.attachments.map(a => ({ name: a.name, contentType: a.contentType, path: a.path })) };\n }),\n },\n };\n }\n\n private _serializeAttachments(attachments: JsonAttachment[]) {\n let lastAttachment: TestAttachment | undefined;\n return attachments.map(a => {\n if (a.name === 'trace')\n this._hasTraces = true;\n\n if ((a.name === 'stdout' || a.name === 'stderr') && a.contentType === 'text/plain') {\n if (lastAttachment &&\n lastAttachment.name === a.name &&\n lastAttachment.contentType === a.contentType) {\n lastAttachment.body += stripAnsiEscapes(a.body as string);\n return null;\n }\n a.body = stripAnsiEscapes(a.body as string);\n lastAttachment = a as TestAttachment;\n return a;\n }\n\n if (a.path) {\n let fileName = a.path;\n try {\n const buffer = fs.readFileSync(a.path);\n const sha1 = calculateSha1(buffer) + path.extname(a.path);\n fileName = this._attachmentsBaseURL + sha1;\n fs.mkdirSync(path.join(this._reportFolder, 'data'), { recursive: true });\n fs.writeFileSync(path.join(this._reportFolder, 'data', sha1), buffer);\n } catch (e) {\n }\n return {\n name: a.name,\n contentType: a.contentType,\n path: fileName,\n body: a.body,\n };\n }\n\n if (a.body instanceof Buffer) {\n if (isTextContentType(a.contentType)) {\n // Content type is like this: \"text/html; charset=UTF-8\"\n const charset = a.contentType.match(/charset=(.*)/)?.[1];\n try {\n const body = a.body.toString(charset as any || 'utf-8');\n return {\n name: a.name,\n contentType: a.contentType,\n body,\n };\n } catch (e) {\n // Invalid encoding, fall through and save to file.\n }\n }\n\n fs.mkdirSync(path.join(this._reportFolder, 'data'), { recursive: true });\n const extension = sanitizeForFilePath(path.extname(a.name).replace(/^\\./, '')) || mime.getExtension(a.contentType) || 'dat';\n const sha1 = calculateSha1(a.body) + '.' + extension;\n fs.writeFileSync(path.join(this._reportFolder, 'data', sha1), a.body);\n return {\n name: a.name,\n contentType: a.contentType,\n path: this._attachmentsBaseURL + sha1,\n };\n }\n\n // string\n return {\n name: a.name,\n contentType: a.contentType,\n body: a.body,\n };\n }).filter(Boolean) as TestAttachment[];\n }\n\n private _serializeAnnotations(annotations: api.TestCase['annotations']): TestAnnotation[] {\n // Annotations can be pushed directly, with a wrong type.\n return annotations.map(a => ({\n type: a.type,\n description: a.description === undefined ? undefined : String(a.description),\n location: a.location ? {\n file: a.location.file,\n line: a.location.line,\n column: a.location.column,\n } : undefined,\n }));\n }\n\n private _createTestResult(test: api.TestCase, result: api.TestResult): TestResult {\n return {\n duration: result.duration,\n startTime: result.startTime.toISOString(),\n retry: result.retry,\n steps: dedupeSteps(result.steps).map(s => this._createTestStep(s, result)),\n errors: formatResultFailure(internalScreen, test, result, '').map(error => {\n return {\n message: error.message,\n codeframe: error.location ? createErrorCodeframe(error.message, error.location) : undefined\n };\n }),\n status: result.status,\n annotations: this._serializeAnnotations(result.annotations),\n attachments: this._serializeAttachments([\n ...result.attachments,\n ...result.stdout.map(m => stdioAttachment(m, 'stdout')),\n ...result.stderr.map(m => stdioAttachment(m, 'stderr'))]),\n };\n }\n\n private _createTestStep(dedupedStep: DedupedStep, result: api.TestResult): TestStep {\n const { step, duration, count } = dedupedStep;\n const skipped = dedupedStep.step.annotations?.find(a => a.type === 'skip');\n let title = step.title;\n if (skipped)\n title = `${title} (skipped${skipped.description ? ': ' + skipped.description : ''})`;\n const testStep: TestStep = {\n title,\n startTime: step.startTime.toISOString(),\n duration,\n steps: dedupeSteps(step.steps).map(s => this._createTestStep(s, result)),\n attachments: step.attachments.map(s => {\n const index = result.attachments.indexOf(s);\n if (index === -1)\n throw new Error('Unexpected, attachment not found');\n return index;\n }),\n location: this._relativeLocation(step.location),\n error: step.error?.message,\n count,\n skipped: !!skipped,\n };\n if (step.location)\n this._stepsInFile.set(step.location.file, testStep);\n return testStep;\n }\n\n private _relativeLocation(location: api.Location | undefined): api.Location | undefined {\n if (!location)\n return undefined;\n const file = toPosixPath(path.relative(this._config.rootDir, location.file));\n return {\n file,\n line: location.line,\n column: location.column,\n };\n }\n}\n\nconst emptyStats = (): Stats => {\n return {\n total: 0,\n expected: 0,\n unexpected: 0,\n flaky: 0,\n skipped: 0,\n ok: true,\n };\n};\n\nconst addStats = (stats: Stats, delta: Stats): Stats => {\n stats.total += delta.total;\n stats.skipped += delta.skipped;\n stats.expected += delta.expected;\n stats.unexpected += delta.unexpected;\n stats.flaky += delta.flaky;\n stats.ok = stats.ok && delta.ok;\n return stats;\n};\n\nclass Base64Encoder extends Transform {\n private _remainder: Buffer | undefined;\n\n override _transform(chunk: any, encoding: BufferEncoding, callback: TransformCallback): void {\n if (this._remainder) {\n chunk = Buffer.concat([this._remainder, chunk]);\n this._remainder = undefined;\n }\n\n const remaining = chunk.length % 3;\n if (remaining) {\n this._remainder = chunk.slice(chunk.length - remaining);\n chunk = chunk.slice(0, chunk.length - remaining);\n }\n chunk = chunk.toString('base64');\n this.push(Buffer.from(chunk));\n callback();\n }\n\n override _flush(callback: TransformCallback): void {\n if (this._remainder)\n this.push(Buffer.from(this._remainder.toString('base64')));\n callback();\n }\n}\n\nfunction isTextContentType(contentType: string) {\n return contentType.startsWith('text/') || contentType.startsWith('application/json');\n}\n\ntype JsonAttachment = {\n name: string;\n body?: string | Buffer;\n path?: string;\n contentType: string;\n};\n\nfunction stdioAttachment(chunk: Buffer | string, type: 'stdout' | 'stderr'): JsonAttachment {\n return {\n name: type,\n contentType: 'text/plain',\n body: typeof chunk === 'string' ? chunk : chunk.toString('utf-8')\n };\n}\n\ntype DedupedStep = { step: api.TestStep, count: number, duration: number };\n\nfunction dedupeSteps(steps: api.TestStep[]) {\n const result: DedupedStep[] = [];\n let lastResult = undefined;\n for (const step of steps) {\n const canDedupe = !step.error && step.duration >= 0 && step.location?.file && !step.steps.length;\n const lastStep = lastResult?.step;\n if (canDedupe && lastResult && lastStep && step.category === lastStep.category && step.title === lastStep.title && step.location?.file === lastStep.location?.file && step.location?.line === lastStep.location?.line && step.location?.column === lastStep.location?.column) {\n ++lastResult.count;\n lastResult.duration += step.duration;\n continue;\n }\n lastResult = { step, count: 1, duration: step.duration };\n result.push(lastResult);\n if (!canDedupe)\n lastResult = undefined;\n }\n return result;\n}\n\nfunction createSnippets(stepsInFile: MultiMap<string, TestStep>) {\n for (const file of stepsInFile.keys()) {\n let source: string;\n try {\n source = fs.readFileSync(file, 'utf-8') + '\\n//';\n } catch (e) {\n continue;\n }\n const lines = source.split('\\n').length;\n const highlighted = codeFrameColumns(source, { start: { line: lines, column: 1 } }, { highlightCode: true, linesAbove: lines, linesBelow: 0 });\n const highlightedLines = highlighted.split('\\n');\n const lineWithArrow = highlightedLines[highlightedLines.length - 1];\n for (const step of stepsInFile.get(file)) {\n // Don't bother with snippets that have less than 3 lines.\n if (step.location!.line < 2 || step.location!.line >= lines)\n continue;\n // Cut out snippet.\n const snippetLines = highlightedLines.slice(step.location!.line - 2, step.location!.line + 1);\n // Relocate arrow.\n const index = lineWithArrow.indexOf('^');\n const shiftedArrow = lineWithArrow.slice(0, index) + ' '.repeat(step.location!.column - 1) + lineWithArrow.slice(index);\n // Insert arrow line.\n snippetLines.splice(2, 0, shiftedArrow);\n step.snippet = snippetLines.join('\\n');\n }\n }\n}\n\nfunction createErrorCodeframe(message: string, location: Location) {\n let source: string;\n try {\n source = fs.readFileSync(location.file, 'utf-8') + '\\n//';\n } catch (e) {\n return;\n }\n\n return codeFrameColumns(\n source,\n {\n start: {\n line: location.line,\n column: location.column,\n },\n },\n {\n highlightCode: false,\n linesAbove: 100,\n linesBelow: 100,\n message: stripAnsiEscapes(message).split('\\n')[0] || undefined,\n }\n );\n}\n\nfunction writeLine(line: string) {\n // eslint-disable-next-line no-restricted-properties\n process.stdout.write(line + '\\n');\n}\n\nexport default HtmlReporter;\n"],
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;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EA,SAAS,UAAU,MAAc;AAE/B,UAAQ,OAAO,MAAM,OAAO,IAAI;AAClC;AAEA,IAAO,eAAQ;",
|
6
|
+
"names": ["import_utils", "import_utilsBundle", "open", "path", "fs"]
|
7
|
+
}
|
@@ -0,0 +1,130 @@
|
|
1
|
+
"use strict";
|
2
|
+
var __create = Object.create;
|
3
|
+
var __defProp = Object.defineProperty;
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
8
|
+
var __export = (target, all) => {
|
9
|
+
for (var name in all)
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
11
|
+
};
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
14
|
+
for (let key of __getOwnPropNames(from))
|
15
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
16
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
17
|
+
}
|
18
|
+
return to;
|
19
|
+
};
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
25
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
26
|
+
mod
|
27
|
+
));
|
28
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
29
|
+
var internalReporter_exports = {};
|
30
|
+
__export(internalReporter_exports, {
|
31
|
+
InternalReporter: () => InternalReporter
|
32
|
+
});
|
33
|
+
module.exports = __toCommonJS(internalReporter_exports);
|
34
|
+
var import_fs = __toESM(require("fs"));
|
35
|
+
var import_utils = require("playwright-core/lib/utils");
|
36
|
+
var import_base = require("./base");
|
37
|
+
var import_multiplexer = require("./multiplexer");
|
38
|
+
var import_test = require("../common/test");
|
39
|
+
var import_babelBundle = require("../transform/babelBundle");
|
40
|
+
var import_reporterV2 = require("./reporterV2");
|
41
|
+
class InternalReporter {
|
42
|
+
constructor(reporters) {
|
43
|
+
this._didBegin = false;
|
44
|
+
this._reporter = new import_multiplexer.Multiplexer(reporters.map(import_reporterV2.wrapReporterAsV2));
|
45
|
+
}
|
46
|
+
version() {
|
47
|
+
return "v2";
|
48
|
+
}
|
49
|
+
onConfigure(config) {
|
50
|
+
this._config = config;
|
51
|
+
this._startTime = /* @__PURE__ */ new Date();
|
52
|
+
this._monotonicStartTime = (0, import_utils.monotonicTime)();
|
53
|
+
this._reporter.onConfigure?.(config);
|
54
|
+
}
|
55
|
+
onBegin(suite) {
|
56
|
+
this._didBegin = true;
|
57
|
+
this._reporter.onBegin?.(suite);
|
58
|
+
}
|
59
|
+
onTestBegin(test, result) {
|
60
|
+
this._reporter.onTestBegin?.(test, result);
|
61
|
+
}
|
62
|
+
onStdOut(chunk, test, result) {
|
63
|
+
this._reporter.onStdOut?.(chunk, test, result);
|
64
|
+
}
|
65
|
+
onStdErr(chunk, test, result) {
|
66
|
+
this._reporter.onStdErr?.(chunk, test, result);
|
67
|
+
}
|
68
|
+
onTestEnd(test, result) {
|
69
|
+
this._addSnippetToTestErrors(test, result);
|
70
|
+
this._reporter.onTestEnd?.(test, result);
|
71
|
+
}
|
72
|
+
async onEnd(result) {
|
73
|
+
if (!this._didBegin) {
|
74
|
+
this.onBegin(new import_test.Suite("", "root"));
|
75
|
+
}
|
76
|
+
return await this._reporter.onEnd?.({
|
77
|
+
...result,
|
78
|
+
startTime: this._startTime,
|
79
|
+
duration: (0, import_utils.monotonicTime)() - this._monotonicStartTime
|
80
|
+
});
|
81
|
+
}
|
82
|
+
async onExit() {
|
83
|
+
await this._reporter.onExit?.();
|
84
|
+
}
|
85
|
+
onError(error) {
|
86
|
+
addLocationAndSnippetToError(this._config, error);
|
87
|
+
this._reporter.onError?.(error);
|
88
|
+
}
|
89
|
+
onStepBegin(test, result, step) {
|
90
|
+
this._reporter.onStepBegin?.(test, result, step);
|
91
|
+
}
|
92
|
+
onStepEnd(test, result, step) {
|
93
|
+
this._addSnippetToStepError(test, step);
|
94
|
+
this._reporter.onStepEnd?.(test, result, step);
|
95
|
+
}
|
96
|
+
printsToStdio() {
|
97
|
+
return this._reporter.printsToStdio ? this._reporter.printsToStdio() : true;
|
98
|
+
}
|
99
|
+
_addSnippetToTestErrors(test, result) {
|
100
|
+
for (const error of result.errors)
|
101
|
+
addLocationAndSnippetToError(this._config, error, test.location.file);
|
102
|
+
}
|
103
|
+
_addSnippetToStepError(test, step) {
|
104
|
+
if (step.error)
|
105
|
+
addLocationAndSnippetToError(this._config, step.error, test.location.file);
|
106
|
+
}
|
107
|
+
}
|
108
|
+
function addLocationAndSnippetToError(config, error, file) {
|
109
|
+
if (error.stack && !error.location)
|
110
|
+
error.location = (0, import_base.prepareErrorStack)(error.stack).location;
|
111
|
+
const location = error.location;
|
112
|
+
if (!location)
|
113
|
+
return;
|
114
|
+
try {
|
115
|
+
const tokens = [];
|
116
|
+
const source = import_fs.default.readFileSync(location.file, "utf8");
|
117
|
+
const codeFrame = (0, import_babelBundle.codeFrameColumns)(source, { start: location }, { highlightCode: true });
|
118
|
+
if (!file || import_fs.default.realpathSync(file) !== location.file) {
|
119
|
+
tokens.push(import_base.internalScreen.colors.gray(` at `) + `${(0, import_base.relativeFilePath)(import_base.internalScreen, config, location.file)}:${location.line}`);
|
120
|
+
tokens.push("");
|
121
|
+
}
|
122
|
+
tokens.push(codeFrame);
|
123
|
+
error.snippet = tokens.join("\n");
|
124
|
+
} catch (e) {
|
125
|
+
}
|
126
|
+
}
|
127
|
+
// Annotate the CommonJS export names for ESM import in node:
|
128
|
+
0 && (module.exports = {
|
129
|
+
InternalReporter
|
130
|
+
});
|
@@ -0,0 +1,7 @@
|
|
1
|
+
{
|
2
|
+
"version": 3,
|
3
|
+
"sources": ["../../src/reporters/internalReporter.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';\n\nimport { monotonicTime } from 'playwright-core/lib/utils';\n\nimport { internalScreen, prepareErrorStack, relativeFilePath } from './base';\nimport { Multiplexer } from './multiplexer';\nimport { Suite } from '../common/test';\nimport { codeFrameColumns } from '../transform/babelBundle';\nimport { wrapReporterAsV2 } from './reporterV2';\n\nimport type { AnyReporter, ReporterV2 } from './reporterV2';\nimport type { FullConfig, FullResult, TestCase, TestError, TestResult, TestStep } from '../../types/testReporter';\n\n\nexport class InternalReporter implements ReporterV2 {\n private _reporter: ReporterV2;\n private _didBegin = false;\n private _config!: FullConfig;\n private _startTime: Date | undefined;\n private _monotonicStartTime: number | undefined;\n\n constructor(reporters: AnyReporter[]) {\n this._reporter = new Multiplexer(reporters.map(wrapReporterAsV2));\n }\n\n version(): 'v2' {\n return 'v2';\n }\n\n onConfigure(config: FullConfig) {\n this._config = config;\n this._startTime = new Date();\n this._monotonicStartTime = monotonicTime();\n this._reporter.onConfigure?.(config);\n }\n\n onBegin(suite: Suite) {\n this._didBegin = true;\n this._reporter.onBegin?.(suite);\n }\n\n onTestBegin(test: TestCase, result: TestResult) {\n this._reporter.onTestBegin?.(test, result);\n }\n\n onStdOut(chunk: string | Buffer, test?: TestCase, result?: TestResult) {\n this._reporter.onStdOut?.(chunk, test, result);\n }\n\n onStdErr(chunk: string | Buffer, test?: TestCase, result?: TestResult) {\n this._reporter.onStdErr?.(chunk, test, result);\n }\n\n onTestEnd(test: TestCase, result: TestResult) {\n this._addSnippetToTestErrors(test, result);\n this._reporter.onTestEnd?.(test, result);\n }\n\n async onEnd(result: { status: FullResult['status'] }) {\n if (!this._didBegin) {\n // onBegin was not reported, emit it.\n this.onBegin(new Suite('', 'root'));\n }\n return await this._reporter.onEnd?.({\n ...result,\n startTime: this._startTime!,\n duration: monotonicTime() - this._monotonicStartTime!,\n });\n }\n\n async onExit() {\n await this._reporter.onExit?.();\n }\n\n onError(error: TestError) {\n addLocationAndSnippetToError(this._config, error);\n this._reporter.onError?.(error);\n }\n\n onStepBegin(test: TestCase, result: TestResult, step: TestStep) {\n this._reporter.onStepBegin?.(test, result, step);\n }\n\n onStepEnd(test: TestCase, result: TestResult, step: TestStep) {\n this._addSnippetToStepError(test, step);\n this._reporter.onStepEnd?.(test, result, step);\n }\n\n printsToStdio() {\n return this._reporter.printsToStdio ? this._reporter.printsToStdio() : true;\n }\n\n private _addSnippetToTestErrors(test: TestCase, result: TestResult) {\n for (const error of result.errors)\n addLocationAndSnippetToError(this._config, error, test.location.file);\n }\n\n private _addSnippetToStepError(test: TestCase, step: TestStep) {\n if (step.error)\n addLocationAndSnippetToError(this._config, step.error, test.location.file);\n }\n}\n\nfunction addLocationAndSnippetToError(config: FullConfig, error: TestError, file?: string) {\n if (error.stack && !error.location)\n error.location = prepareErrorStack(error.stack).location;\n const location = error.location;\n if (!location)\n return;\n\n try {\n const tokens = [];\n const source = fs.readFileSync(location.file, 'utf8');\n const codeFrame = codeFrameColumns(source, { start: location }, { highlightCode: true });\n // Convert /var/folders to /private/var/folders on Mac.\n if (!file || fs.realpathSync(file) !== location.file) {\n tokens.push(internalScreen.colors.gray(` at `) + `${relativeFilePath(internalScreen, config, location.file)}:${location.line}`);\n tokens.push('');\n }\n tokens.push(codeFrame);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,aAAO,KAAK,2BAAe,OAAO,KAAK,QAAQ,IAAI,OAAG,8BAAiB,4BAAgB,QAAQ,SAAS,IAAI,CAAC,IAAI,SAAS,IAAI,EAAE;AAChI,aAAO,KAAK,EAAE;AAAA,IAChB;AACA,WAAO,KAAK,SAAS;AACrB,UAAM,UAAU,OAAO,KAAK,IAAI;AAAA,EAClC,SAAS,GAAG;AAAA,EAEZ;AACF;",
|
6
|
+
"names": ["fs"]
|
7
|
+
}
|
@@ -0,0 +1,254 @@
|
|
1
|
+
"use strict";
|
2
|
+
var __create = Object.create;
|
3
|
+
var __defProp = Object.defineProperty;
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
8
|
+
var __export = (target, all) => {
|
9
|
+
for (var name in all)
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
11
|
+
};
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
14
|
+
for (let key of __getOwnPropNames(from))
|
15
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
16
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
17
|
+
}
|
18
|
+
return to;
|
19
|
+
};
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
25
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
26
|
+
mod
|
27
|
+
));
|
28
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
29
|
+
var json_exports = {};
|
30
|
+
__export(json_exports, {
|
31
|
+
default: () => json_default,
|
32
|
+
serializePatterns: () => serializePatterns
|
33
|
+
});
|
34
|
+
module.exports = __toCommonJS(json_exports);
|
35
|
+
var import_fs = __toESM(require("fs"));
|
36
|
+
var import_path = __toESM(require("path"));
|
37
|
+
var import_utils = require("playwright-core/lib/utils");
|
38
|
+
var import_base = require("./base");
|
39
|
+
var import_config = require("../common/config");
|
40
|
+
class JSONReporter {
|
41
|
+
constructor(options) {
|
42
|
+
this._errors = [];
|
43
|
+
this._resolvedOutputFile = (0, import_base.resolveOutputFile)("JSON", options)?.outputFile;
|
44
|
+
}
|
45
|
+
version() {
|
46
|
+
return "v2";
|
47
|
+
}
|
48
|
+
printsToStdio() {
|
49
|
+
return !this._resolvedOutputFile;
|
50
|
+
}
|
51
|
+
onConfigure(config) {
|
52
|
+
this.config = config;
|
53
|
+
}
|
54
|
+
onBegin(suite) {
|
55
|
+
this.suite = suite;
|
56
|
+
}
|
57
|
+
onError(error) {
|
58
|
+
this._errors.push(error);
|
59
|
+
}
|
60
|
+
async onEnd(result) {
|
61
|
+
await outputReport(this._serializeReport(result), this._resolvedOutputFile);
|
62
|
+
}
|
63
|
+
_serializeReport(result) {
|
64
|
+
const report = {
|
65
|
+
config: {
|
66
|
+
...removePrivateFields(this.config),
|
67
|
+
rootDir: (0, import_utils.toPosixPath)(this.config.rootDir),
|
68
|
+
projects: this.config.projects.map((project) => {
|
69
|
+
return {
|
70
|
+
outputDir: (0, import_utils.toPosixPath)(project.outputDir),
|
71
|
+
repeatEach: project.repeatEach,
|
72
|
+
retries: project.retries,
|
73
|
+
metadata: project.metadata,
|
74
|
+
id: (0, import_config.getProjectId)(project),
|
75
|
+
name: project.name,
|
76
|
+
testDir: (0, import_utils.toPosixPath)(project.testDir),
|
77
|
+
testIgnore: serializePatterns(project.testIgnore),
|
78
|
+
testMatch: serializePatterns(project.testMatch),
|
79
|
+
timeout: project.timeout
|
80
|
+
};
|
81
|
+
})
|
82
|
+
},
|
83
|
+
suites: this._mergeSuites(this.suite.suites),
|
84
|
+
errors: this._errors,
|
85
|
+
stats: {
|
86
|
+
startTime: result.startTime.toISOString(),
|
87
|
+
duration: result.duration,
|
88
|
+
expected: 0,
|
89
|
+
skipped: 0,
|
90
|
+
unexpected: 0,
|
91
|
+
flaky: 0
|
92
|
+
}
|
93
|
+
};
|
94
|
+
for (const test of this.suite.allTests())
|
95
|
+
++report.stats[test.outcome()];
|
96
|
+
return report;
|
97
|
+
}
|
98
|
+
_mergeSuites(suites) {
|
99
|
+
const fileSuites = new import_utils.MultiMap();
|
100
|
+
for (const projectSuite of suites) {
|
101
|
+
const projectId = (0, import_config.getProjectId)(projectSuite.project());
|
102
|
+
const projectName = projectSuite.project().name;
|
103
|
+
for (const fileSuite of projectSuite.suites) {
|
104
|
+
const file = fileSuite.location.file;
|
105
|
+
const serialized = this._serializeSuite(projectId, projectName, fileSuite);
|
106
|
+
if (serialized)
|
107
|
+
fileSuites.set(file, serialized);
|
108
|
+
}
|
109
|
+
}
|
110
|
+
const results = [];
|
111
|
+
for (const [, suites2] of fileSuites) {
|
112
|
+
const result = {
|
113
|
+
title: suites2[0].title,
|
114
|
+
file: suites2[0].file,
|
115
|
+
column: 0,
|
116
|
+
line: 0,
|
117
|
+
specs: []
|
118
|
+
};
|
119
|
+
for (const suite of suites2)
|
120
|
+
this._mergeTestsFromSuite(result, suite);
|
121
|
+
results.push(result);
|
122
|
+
}
|
123
|
+
return results;
|
124
|
+
}
|
125
|
+
_relativeLocation(location) {
|
126
|
+
if (!location)
|
127
|
+
return { file: "", line: 0, column: 0 };
|
128
|
+
return {
|
129
|
+
file: (0, import_utils.toPosixPath)(import_path.default.relative(this.config.rootDir, location.file)),
|
130
|
+
line: location.line,
|
131
|
+
column: location.column
|
132
|
+
};
|
133
|
+
}
|
134
|
+
_locationMatches(s1, s2) {
|
135
|
+
return s1.file === s2.file && s1.line === s2.line && s1.column === s2.column;
|
136
|
+
}
|
137
|
+
_mergeTestsFromSuite(to, from) {
|
138
|
+
for (const fromSuite of from.suites || []) {
|
139
|
+
const toSuite = (to.suites || []).find((s) => s.title === fromSuite.title && this._locationMatches(s, fromSuite));
|
140
|
+
if (toSuite) {
|
141
|
+
this._mergeTestsFromSuite(toSuite, fromSuite);
|
142
|
+
} else {
|
143
|
+
if (!to.suites)
|
144
|
+
to.suites = [];
|
145
|
+
to.suites.push(fromSuite);
|
146
|
+
}
|
147
|
+
}
|
148
|
+
for (const spec of from.specs || []) {
|
149
|
+
const toSpec = to.specs.find((s) => s.title === spec.title && s.file === (0, import_utils.toPosixPath)(import_path.default.relative(this.config.rootDir, spec.file)) && s.line === spec.line && s.column === spec.column);
|
150
|
+
if (toSpec)
|
151
|
+
toSpec.tests.push(...spec.tests);
|
152
|
+
else
|
153
|
+
to.specs.push(spec);
|
154
|
+
}
|
155
|
+
}
|
156
|
+
_serializeSuite(projectId, projectName, suite) {
|
157
|
+
if (!suite.allTests().length)
|
158
|
+
return null;
|
159
|
+
const suites = suite.suites.map((suite2) => this._serializeSuite(projectId, projectName, suite2)).filter((s) => s);
|
160
|
+
return {
|
161
|
+
title: suite.title,
|
162
|
+
...this._relativeLocation(suite.location),
|
163
|
+
specs: suite.tests.map((test) => this._serializeTestSpec(projectId, projectName, test)),
|
164
|
+
suites: suites.length ? suites : void 0
|
165
|
+
};
|
166
|
+
}
|
167
|
+
_serializeTestSpec(projectId, projectName, test) {
|
168
|
+
return {
|
169
|
+
title: test.title,
|
170
|
+
ok: test.ok(),
|
171
|
+
tags: test.tags.map((tag) => tag.substring(1)),
|
172
|
+
// Strip '@'.
|
173
|
+
tests: [this._serializeTest(projectId, projectName, test)],
|
174
|
+
id: test.id,
|
175
|
+
...this._relativeLocation(test.location)
|
176
|
+
};
|
177
|
+
}
|
178
|
+
_serializeTest(projectId, projectName, test) {
|
179
|
+
return {
|
180
|
+
timeout: test.timeout,
|
181
|
+
annotations: test.annotations,
|
182
|
+
expectedStatus: test.expectedStatus,
|
183
|
+
projectId,
|
184
|
+
projectName,
|
185
|
+
results: test.results.map((r) => this._serializeTestResult(r, test)),
|
186
|
+
status: test.outcome()
|
187
|
+
};
|
188
|
+
}
|
189
|
+
_serializeTestResult(result, test) {
|
190
|
+
const steps = result.steps.filter((s) => s.category === "test.step");
|
191
|
+
const jsonResult = {
|
192
|
+
workerIndex: result.workerIndex,
|
193
|
+
parallelIndex: result.parallelIndex,
|
194
|
+
status: result.status,
|
195
|
+
duration: result.duration,
|
196
|
+
error: result.error,
|
197
|
+
errors: result.errors.map((e) => this._serializeError(e)),
|
198
|
+
stdout: result.stdout.map((s) => stdioEntry(s)),
|
199
|
+
stderr: result.stderr.map((s) => stdioEntry(s)),
|
200
|
+
retry: result.retry,
|
201
|
+
steps: steps.length ? steps.map((s) => this._serializeTestStep(s)) : void 0,
|
202
|
+
startTime: result.startTime.toISOString(),
|
203
|
+
annotations: result.annotations,
|
204
|
+
attachments: result.attachments.map((a) => ({
|
205
|
+
name: a.name,
|
206
|
+
contentType: a.contentType,
|
207
|
+
path: a.path,
|
208
|
+
body: a.body?.toString("base64")
|
209
|
+
}))
|
210
|
+
};
|
211
|
+
if (result.error?.stack)
|
212
|
+
jsonResult.errorLocation = (0, import_base.prepareErrorStack)(result.error.stack).location;
|
213
|
+
return jsonResult;
|
214
|
+
}
|
215
|
+
_serializeError(error) {
|
216
|
+
return (0, import_base.formatError)(import_base.nonTerminalScreen, error);
|
217
|
+
}
|
218
|
+
_serializeTestStep(step) {
|
219
|
+
const steps = step.steps.filter((s) => s.category === "test.step");
|
220
|
+
return {
|
221
|
+
title: step.title,
|
222
|
+
duration: step.duration,
|
223
|
+
error: step.error,
|
224
|
+
steps: steps.length ? steps.map((s) => this._serializeTestStep(s)) : void 0
|
225
|
+
};
|
226
|
+
}
|
227
|
+
}
|
228
|
+
async function outputReport(report, resolvedOutputFile) {
|
229
|
+
const reportString = JSON.stringify(report, void 0, 2);
|
230
|
+
if (resolvedOutputFile) {
|
231
|
+
await import_fs.default.promises.mkdir(import_path.default.dirname(resolvedOutputFile), { recursive: true });
|
232
|
+
await import_fs.default.promises.writeFile(resolvedOutputFile, reportString);
|
233
|
+
} else {
|
234
|
+
console.log(reportString);
|
235
|
+
}
|
236
|
+
}
|
237
|
+
function stdioEntry(s) {
|
238
|
+
if (typeof s === "string")
|
239
|
+
return { text: s };
|
240
|
+
return { buffer: s.toString("base64") };
|
241
|
+
}
|
242
|
+
function removePrivateFields(config) {
|
243
|
+
return Object.fromEntries(Object.entries(config).filter(([name, value]) => !name.startsWith("_")));
|
244
|
+
}
|
245
|
+
function serializePatterns(patterns) {
|
246
|
+
if (!Array.isArray(patterns))
|
247
|
+
patterns = [patterns];
|
248
|
+
return patterns.map((s) => s.toString());
|
249
|
+
}
|
250
|
+
var json_default = JSONReporter;
|
251
|
+
// Annotate the CommonJS export names for ESM import in node:
|
252
|
+
0 && (module.exports = {
|
253
|
+
serializePatterns
|
254
|
+
});
|
@@ -0,0 +1,7 @@
|
|
1
|
+
{
|
2
|
+
"version": 3,
|
3
|
+
"sources": ["../../src/reporters/json.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 { toPosixPath, MultiMap } from 'playwright-core/lib/utils';\n\nimport { formatError, nonTerminalScreen, prepareErrorStack, resolveOutputFile, CommonReporterOptions } from './base';\nimport { getProjectId } from '../common/config';\n\nimport type { ReporterV2 } from './reporterV2';\nimport type { JsonReporterOptions } from '../../types/test';\nimport type { FullConfig, FullResult, JSONReport, JSONReportError, JSONReportSpec, JSONReportSuite, JSONReportTest, JSONReportTestResult, JSONReportTestStep, Location, Suite, TestCase, TestError, TestResult, TestStep } from '../../types/testReporter';\n\nclass JSONReporter implements ReporterV2 {\n config!: FullConfig;\n suite!: Suite;\n private _errors: TestError[] = [];\n private _resolvedOutputFile: string | undefined;\n\n constructor(options: JsonReporterOptions & CommonReporterOptions) {\n this._resolvedOutputFile = resolveOutputFile('JSON', options)?.outputFile;\n }\n\n version(): 'v2' {\n return 'v2';\n }\n\n printsToStdio() {\n return !this._resolvedOutputFile;\n }\n\n onConfigure(config: FullConfig) {\n this.config = config;\n }\n\n onBegin(suite: Suite) {\n this.suite = suite;\n }\n\n onError(error: TestError): void {\n this._errors.push(error);\n }\n\n async onEnd(result: FullResult) {\n await outputReport(this._serializeReport(result), this._resolvedOutputFile);\n }\n\n private _serializeReport(result: FullResult): JSONReport {\n const report: JSONReport = {\n config: {\n ...removePrivateFields(this.config),\n rootDir: toPosixPath(this.config.rootDir),\n projects: this.config.projects.map(project => {\n return {\n outputDir: toPosixPath(project.outputDir),\n repeatEach: project.repeatEach,\n retries: project.retries,\n metadata: project.metadata,\n id: getProjectId(project),\n name: project.name,\n testDir: toPosixPath(project.testDir),\n testIgnore: serializePatterns(project.testIgnore),\n testMatch: serializePatterns(project.testMatch),\n timeout: project.timeout,\n };\n })\n },\n suites: this._mergeSuites(this.suite.suites),\n errors: this._errors,\n stats: {\n startTime: result.startTime.toISOString(),\n duration: result.duration,\n expected: 0,\n skipped: 0,\n unexpected: 0,\n flaky: 0,\n },\n };\n for (const test of this.suite.allTests())\n ++report.stats[test.outcome()];\n return report;\n }\n\n private _mergeSuites(suites: Suite[]): JSONReportSuite[] {\n const fileSuites = new MultiMap<string, JSONReportSuite>();\n for (const projectSuite of suites) {\n const projectId = getProjectId(projectSuite.project()!);\n const projectName = projectSuite.project()!.name;\n for (const fileSuite of projectSuite.suites) {\n const file = fileSuite.location!.file;\n const serialized = this._serializeSuite(projectId, projectName, fileSuite);\n if (serialized)\n fileSuites.set(file, serialized);\n }\n }\n\n const results: JSONReportSuite[] = [];\n for (const [, suites] of fileSuites) {\n const result: JSONReportSuite = {\n title: suites[0].title,\n file: suites[0].file,\n column: 0,\n line: 0,\n specs: [],\n };\n for (const suite of suites)\n this._mergeTestsFromSuite(result, suite);\n results.push(result);\n }\n return results;\n }\n\n private _relativeLocation(location: Location | undefined): Location {\n if (!location)\n return { file: '', line: 0, column: 0 };\n return {\n file: toPosixPath(path.relative(this.config.rootDir, location.file)),\n line: location.line,\n column: location.column,\n };\n }\n\n private _locationMatches(s1: JSONReportSuite | JSONReportSpec, s2: JSONReportSuite | JSONReportSpec) {\n return s1.file === s2.file && s1.line === s2.line && s1.column === s2.column;\n }\n\n private _mergeTestsFromSuite(to: JSONReportSuite, from: JSONReportSuite) {\n for (const fromSuite of from.suites || []) {\n const toSuite = (to.suites || []).find(s => s.title === fromSuite.title && this._locationMatches(s, fromSuite));\n if (toSuite) {\n this._mergeTestsFromSuite(toSuite, fromSuite);\n } else {\n if (!to.suites)\n to.suites = [];\n to.suites.push(fromSuite);\n }\n }\n\n for (const spec of from.specs || []) {\n const toSpec = to.specs.find(s => s.title === spec.title && s.file === toPosixPath(path.relative(this.config.rootDir, spec.file)) && s.line === spec.line && s.column === spec.column);\n if (toSpec)\n toSpec.tests.push(...spec.tests);\n else\n to.specs.push(spec);\n }\n }\n\n private _serializeSuite(projectId: string, projectName: string, suite: Suite): null | JSONReportSuite {\n if (!suite.allTests().length)\n return null;\n const suites = suite.suites.map(suite => this._serializeSuite(projectId, projectName, suite)).filter(s => s) as JSONReportSuite[];\n return {\n title: suite.title,\n ...this._relativeLocation(suite.location),\n specs: suite.tests.map(test => this._serializeTestSpec(projectId, projectName, test)),\n suites: suites.length ? suites : undefined,\n };\n }\n\n private _serializeTestSpec(projectId: string, projectName: string, test: TestCase): JSONReportSpec {\n return {\n title: test.title,\n ok: test.ok(),\n tags: test.tags.map(tag => tag.substring(1)), // Strip '@'.\n tests: [this._serializeTest(projectId, projectName, test)],\n id: test.id,\n ...this._relativeLocation(test.location),\n };\n }\n\n private _serializeTest(projectId: string, projectName: string, test: TestCase): JSONReportTest {\n return {\n timeout: test.timeout,\n annotations: test.annotations,\n expectedStatus: test.expectedStatus,\n projectId,\n projectName,\n results: test.results.map(r => this._serializeTestResult(r, test)),\n status: test.outcome(),\n };\n }\n\n private _serializeTestResult(result: TestResult, test: TestCase): JSONReportTestResult {\n const steps = result.steps.filter(s => s.category === 'test.step');\n const jsonResult: JSONReportTestResult = {\n workerIndex: result.workerIndex,\n parallelIndex: result.parallelIndex,\n status: result.status,\n duration: result.duration,\n error: result.error,\n errors: result.errors.map(e => this._serializeError(e)),\n stdout: result.stdout.map(s => stdioEntry(s)),\n stderr: result.stderr.map(s => stdioEntry(s)),\n retry: result.retry,\n steps: steps.length ? steps.map(s => this._serializeTestStep(s)) : undefined,\n startTime: result.startTime.toISOString(),\n annotations: result.annotations,\n attachments: result.attachments.map(a => ({\n name: a.name,\n contentType: a.contentType,\n path: a.path,\n body: a.body?.toString('base64')\n })),\n };\n if (result.error?.stack)\n jsonResult.errorLocation = prepareErrorStack(result.error.stack).location;\n return jsonResult;\n }\n\n private _serializeError(error: TestError): JSONReportError {\n return formatError(nonTerminalScreen, error);\n }\n\n private _serializeTestStep(step: TestStep): JSONReportTestStep {\n const steps = step.steps.filter(s => s.category === 'test.step');\n return {\n title: step.title,\n duration: step.duration,\n error: step.error,\n steps: steps.length ? steps.map(s => this._serializeTestStep(s)) : undefined,\n };\n }\n}\n\nasync function outputReport(report: JSONReport, resolvedOutputFile: string | undefined) {\n const reportString = JSON.stringify(report, undefined, 2);\n if (resolvedOutputFile) {\n await fs.promises.mkdir(path.dirname(resolvedOutputFile), { recursive: true });\n await fs.promises.writeFile(resolvedOutputFile, reportString);\n } else {\n // eslint-disable-next-line no-console\n console.log(reportString);\n }\n}\n\nfunction stdioEntry(s: string | Buffer): any {\n if (typeof s === 'string')\n return { text: s };\n return { buffer: s.toString('base64') };\n}\n\nfunction removePrivateFields(config: FullConfig): FullConfig {\n return Object.fromEntries(Object.entries(config).filter(([name, value]) => !name.startsWith('_'))) as FullConfig;\n}\n\nexport function serializePatterns(patterns: string | RegExp | (string | RegExp)[]): string[] {\n if (!Array.isArray(patterns))\n patterns = [patterns];\n return patterns.map(s => s.toString());\n}\n\nexport default JSONReporter;\n"],
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAgBA,gBAAe;AACf,kBAAiB;AAEjB,mBAAsC;AAEtC,kBAA4G;AAC5G,oBAA6B;AAM7B,MAAM,aAAmC;AAAA,EAMvC,YAAY,SAAsD;AAHlE,SAAQ,UAAuB,CAAC;AAI9B,SAAK,0BAAsB,+BAAkB,QAAQ,OAAO,GAAG;AAAA,EACjE;AAAA,EAEA,UAAgB;AACd,WAAO;AAAA,EACT;AAAA,EAEA,gBAAgB;AACd,WAAO,CAAC,KAAK;AAAA,EACf;AAAA,EAEA,YAAY,QAAoB;AAC9B,SAAK,SAAS;AAAA,EAChB;AAAA,EAEA,QAAQ,OAAc;AACpB,SAAK,QAAQ;AAAA,EACf;AAAA,EAEA,QAAQ,OAAwB;AAC9B,SAAK,QAAQ,KAAK,KAAK;AAAA,EACzB;AAAA,EAEA,MAAM,MAAM,QAAoB;AAC9B,UAAM,aAAa,KAAK,iBAAiB,MAAM,GAAG,KAAK,mBAAmB;AAAA,EAC5E;AAAA,EAEQ,iBAAiB,QAAgC;AACvD,UAAM,SAAqB;AAAA,MACzB,QAAQ;AAAA,QACN,GAAG,oBAAoB,KAAK,MAAM;AAAA,QAClC,aAAS,0BAAY,KAAK,OAAO,OAAO;AAAA,QACxC,UAAU,KAAK,OAAO,SAAS,IAAI,aAAW;AAC5C,iBAAO;AAAA,YACL,eAAW,0BAAY,QAAQ,SAAS;AAAA,YAC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