@playdrop/playdrop-cli 0.14.7 → 0.14.9

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.
Files changed (179) hide show
  1. package/config/client-meta.json +2 -2
  2. package/dist/commands/worker.d.ts +1 -1
  3. package/dist/commands/worker.js +29 -8
  4. package/dist/index.js +1 -1
  5. package/node_modules/@playdrop/config/client-meta.json +2 -2
  6. package/node_modules/@playwright/mcp/LICENSE +201 -0
  7. package/node_modules/@playwright/mcp/README.md +1592 -0
  8. package/node_modules/@playwright/mcp/cli.js +32 -0
  9. package/node_modules/@playwright/mcp/config.d.ts +239 -0
  10. package/node_modules/@playwright/mcp/index.d.ts +23 -0
  11. package/node_modules/@playwright/mcp/index.js +19 -0
  12. package/node_modules/@playwright/mcp/node_modules/playwright/LICENSE +202 -0
  13. package/node_modules/@playwright/mcp/node_modules/playwright/NOTICE +5 -0
  14. package/node_modules/@playwright/mcp/node_modules/playwright/README.md +318 -0
  15. package/node_modules/@playwright/mcp/node_modules/playwright/ThirdPartyNotices.txt +14 -0
  16. package/node_modules/@playwright/mcp/node_modules/playwright/cli.js +19 -0
  17. package/node_modules/@playwright/mcp/node_modules/playwright/index.d.ts +17 -0
  18. package/node_modules/@playwright/mcp/node_modules/playwright/index.js +17 -0
  19. package/node_modules/@playwright/mcp/node_modules/playwright/index.mjs +18 -0
  20. package/node_modules/@playwright/mcp/node_modules/playwright/jsx-runtime.js +42 -0
  21. package/node_modules/@playwright/mcp/node_modules/playwright/jsx-runtime.mjs +21 -0
  22. package/node_modules/@playwright/mcp/node_modules/playwright/lib/agents/agentParser.js +89 -0
  23. package/node_modules/@playwright/mcp/node_modules/playwright/lib/agents/copilot-setup-steps.yml +34 -0
  24. package/node_modules/@playwright/mcp/node_modules/playwright/lib/agents/generateAgents.js +395 -0
  25. package/node_modules/@playwright/mcp/node_modules/playwright/lib/agents/playwright-test-coverage.prompt.md +31 -0
  26. package/node_modules/@playwright/mcp/node_modules/playwright/lib/agents/playwright-test-generate.prompt.md +8 -0
  27. package/node_modules/@playwright/mcp/node_modules/playwright/lib/agents/playwright-test-generator.agent.md +88 -0
  28. package/node_modules/@playwright/mcp/node_modules/playwright/lib/agents/playwright-test-heal.prompt.md +6 -0
  29. package/node_modules/@playwright/mcp/node_modules/playwright/lib/agents/playwright-test-healer.agent.md +56 -0
  30. package/node_modules/@playwright/mcp/node_modules/playwright/lib/agents/playwright-test-plan.prompt.md +9 -0
  31. package/node_modules/@playwright/mcp/node_modules/playwright/lib/agents/playwright-test-planner.agent.md +74 -0
  32. package/node_modules/@playwright/mcp/node_modules/playwright/lib/cli/reportActions.js +78 -0
  33. package/node_modules/@playwright/mcp/node_modules/playwright/lib/cli/testActions.js +213 -0
  34. package/node_modules/@playwright/mcp/node_modules/playwright/lib/common/index.js +2966 -0
  35. package/node_modules/@playwright/mcp/node_modules/playwright/lib/common/index.js.txt +34 -0
  36. package/node_modules/@playwright/mcp/node_modules/playwright/lib/errorContext.js +129 -0
  37. package/node_modules/@playwright/mcp/node_modules/playwright/lib/globals.js +58 -0
  38. package/node_modules/@playwright/mcp/node_modules/playwright/lib/index.js +783 -0
  39. package/node_modules/@playwright/mcp/node_modules/playwright/lib/isomorphic.js +260 -0
  40. package/node_modules/@playwright/mcp/node_modules/playwright/lib/isomorphic.js.txt +9 -0
  41. package/node_modules/@playwright/mcp/node_modules/playwright/lib/loader/loaderProcessEntry.js +34 -0
  42. package/node_modules/@playwright/mcp/node_modules/playwright/lib/loader/loaderProcessEntry.js.txt +9 -0
  43. package/node_modules/@playwright/mcp/node_modules/playwright/lib/matchers/expect.js +13480 -0
  44. package/node_modules/@playwright/mcp/node_modules/playwright/lib/matchers/expect.js.LICENSE +640 -0
  45. package/node_modules/@playwright/mcp/node_modules/playwright/lib/matchers/expect.js.txt +67 -0
  46. package/node_modules/@playwright/mcp/node_modules/playwright/lib/mcp/test/browserBackend.js +125 -0
  47. package/node_modules/@playwright/mcp/node_modules/playwright/lib/mcp/test/generatorTools.js +122 -0
  48. package/node_modules/@playwright/mcp/node_modules/playwright/lib/mcp/test/plannerTools.js +150 -0
  49. package/node_modules/@playwright/mcp/node_modules/playwright/lib/mcp/test/seed.js +82 -0
  50. package/node_modules/@playwright/mcp/node_modules/playwright/lib/mcp/test/streams.js +44 -0
  51. package/node_modules/@playwright/mcp/node_modules/playwright/lib/mcp/test/testBackend.js +99 -0
  52. package/node_modules/@playwright/mcp/node_modules/playwright/lib/mcp/test/testContext.js +306 -0
  53. package/node_modules/@playwright/mcp/node_modules/playwright/lib/mcp/test/testTool.js +30 -0
  54. package/node_modules/@playwright/mcp/node_modules/playwright/lib/mcp/test/testTools.js +98 -0
  55. package/node_modules/@playwright/mcp/node_modules/playwright/lib/package.js +47 -0
  56. package/node_modules/@playwright/mcp/node_modules/playwright/lib/program.js +237 -0
  57. package/node_modules/@playwright/mcp/node_modules/playwright/lib/runner/index.js +8154 -0
  58. package/node_modules/@playwright/mcp/node_modules/playwright/lib/runner/index.js.txt +59 -0
  59. package/node_modules/@playwright/mcp/node_modules/playwright/lib/transform/babelBundle.js +72275 -0
  60. package/node_modules/@playwright/mcp/node_modules/playwright/lib/transform/babelBundle.js.LICENSE +2384 -0
  61. package/node_modules/@playwright/mcp/node_modules/playwright/lib/transform/babelBundle.js.txt +325 -0
  62. package/node_modules/@playwright/mcp/node_modules/playwright/lib/transform/esmLoader.js +8060 -0
  63. package/node_modules/@playwright/mcp/node_modules/playwright/lib/transform/esmLoader.js.LICENSE +355 -0
  64. package/node_modules/@playwright/mcp/node_modules/playwright/lib/transform/esmLoader.js.txt +60 -0
  65. package/node_modules/@playwright/mcp/node_modules/playwright/lib/util.js +373 -0
  66. package/node_modules/@playwright/mcp/node_modules/playwright/lib/worker/workerProcessEntry.js +1850 -0
  67. package/node_modules/@playwright/mcp/node_modules/playwright/lib/worker/workerProcessEntry.js.txt +19 -0
  68. package/node_modules/@playwright/mcp/node_modules/playwright/package.json +58 -0
  69. package/node_modules/@playwright/mcp/node_modules/playwright/test.d.ts +18 -0
  70. package/node_modules/@playwright/mcp/node_modules/playwright/test.js +24 -0
  71. package/node_modules/@playwright/mcp/node_modules/playwright/test.mjs +35 -0
  72. package/node_modules/@playwright/mcp/node_modules/playwright/types/test.d.ts +10709 -0
  73. package/node_modules/@playwright/mcp/node_modules/playwright/types/testReporter.d.ts +908 -0
  74. package/node_modules/@playwright/mcp/node_modules/playwright-core/LICENSE +202 -0
  75. package/node_modules/@playwright/mcp/node_modules/playwright-core/NOTICE +5 -0
  76. package/node_modules/@playwright/mcp/node_modules/playwright-core/README.md +3 -0
  77. package/node_modules/@playwright/mcp/node_modules/playwright-core/ThirdPartyNotices.txt +13 -0
  78. package/node_modules/@playwright/mcp/node_modules/playwright-core/bin/install_media_pack.ps1 +5 -0
  79. package/node_modules/@playwright/mcp/node_modules/playwright-core/bin/install_webkit_wsl.ps1 +33 -0
  80. package/node_modules/@playwright/mcp/node_modules/playwright-core/bin/reinstall_chrome_beta_linux.sh +42 -0
  81. package/node_modules/@playwright/mcp/node_modules/playwright-core/bin/reinstall_chrome_beta_mac.sh +13 -0
  82. package/node_modules/@playwright/mcp/node_modules/playwright-core/bin/reinstall_chrome_beta_win.ps1 +24 -0
  83. package/node_modules/@playwright/mcp/node_modules/playwright-core/bin/reinstall_chrome_stable_linux.sh +42 -0
  84. package/node_modules/@playwright/mcp/node_modules/playwright-core/bin/reinstall_chrome_stable_mac.sh +12 -0
  85. package/node_modules/@playwright/mcp/node_modules/playwright-core/bin/reinstall_chrome_stable_win.ps1 +24 -0
  86. package/node_modules/@playwright/mcp/node_modules/playwright-core/bin/reinstall_msedge_beta_linux.sh +48 -0
  87. package/node_modules/@playwright/mcp/node_modules/playwright-core/bin/reinstall_msedge_beta_mac.sh +11 -0
  88. package/node_modules/@playwright/mcp/node_modules/playwright-core/bin/reinstall_msedge_beta_win.ps1 +23 -0
  89. package/node_modules/@playwright/mcp/node_modules/playwright-core/bin/reinstall_msedge_dev_linux.sh +48 -0
  90. package/node_modules/@playwright/mcp/node_modules/playwright-core/bin/reinstall_msedge_dev_mac.sh +11 -0
  91. package/node_modules/@playwright/mcp/node_modules/playwright-core/bin/reinstall_msedge_dev_win.ps1 +23 -0
  92. package/node_modules/@playwright/mcp/node_modules/playwright-core/bin/reinstall_msedge_stable_linux.sh +48 -0
  93. package/node_modules/@playwright/mcp/node_modules/playwright-core/bin/reinstall_msedge_stable_mac.sh +11 -0
  94. package/node_modules/@playwright/mcp/node_modules/playwright-core/bin/reinstall_msedge_stable_win.ps1 +24 -0
  95. package/node_modules/@playwright/mcp/node_modules/playwright-core/browsers.json +81 -0
  96. package/node_modules/@playwright/mcp/node_modules/playwright-core/cli.js +21 -0
  97. package/node_modules/@playwright/mcp/node_modules/playwright-core/index.d.ts +17 -0
  98. package/node_modules/@playwright/mcp/node_modules/playwright-core/index.js +17 -0
  99. package/node_modules/@playwright/mcp/node_modules/playwright-core/index.mjs +28 -0
  100. package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/bootstrap.js +88 -0
  101. package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/coreBundle.js +74495 -0
  102. package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/entry/cliDaemon.js +5 -0
  103. package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/entry/dashboardApp.js +3 -0
  104. package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/entry/mcp.js +10 -0
  105. package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/entry/oopBrowserDownload.js +3 -0
  106. package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/package.js +50 -0
  107. package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/server/chromium/appIcon.png +0 -0
  108. package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/server/electron/loader.js +118 -0
  109. package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/serverRegistry.js +7347 -0
  110. package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/serverRegistry.js.LICENSE +354 -0
  111. package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/tools/cli-client/channelSessions.js +141 -0
  112. package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/tools/cli-client/cli.js +6 -0
  113. package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/tools/cli-client/help.json +707 -0
  114. package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/tools/cli-client/minimist.js +128 -0
  115. package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/tools/cli-client/output.js +343 -0
  116. package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/tools/cli-client/program.js +404 -0
  117. package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/tools/cli-client/registry.js +176 -0
  118. package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/tools/cli-client/session.js +258 -0
  119. package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/tools/cli-client/skill/SKILL.md +420 -0
  120. package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/tools/cli-client/skill/references/element-attributes.md +23 -0
  121. package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/tools/cli-client/skill/references/playwright-tests.md +39 -0
  122. package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/tools/cli-client/skill/references/request-mocking.md +87 -0
  123. package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/tools/cli-client/skill/references/running-code.md +241 -0
  124. package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/tools/cli-client/skill/references/session-management.md +225 -0
  125. package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/tools/cli-client/skill/references/storage-state.md +275 -0
  126. package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/tools/cli-client/skill/references/test-generation.md +433 -0
  127. package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/tools/cli-client/skill/references/tracing.md +139 -0
  128. package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/tools/cli-client/skill/references/video-recording.md +143 -0
  129. package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/tools/dashboard/appIcon.png +0 -0
  130. package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/tools/trace/SKILL.md +171 -0
  131. package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/tools/utils/extension.js +78 -0
  132. package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/tools/utils/socketConnection.js +108 -0
  133. package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/utilsBundle.js +90764 -0
  134. package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/utilsBundle.js.LICENSE +2179 -0
  135. package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/vite/dashboard/assets/codicon-DCmgc-ay.ttf +0 -0
  136. package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/vite/dashboard/assets/firefox-1bWoP6pv.svg +1 -0
  137. package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/vite/dashboard/assets/firefox-beta-k3eOH_eK.svg +1 -0
  138. package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/vite/dashboard/assets/firefox-nightly-Cp5nfeDT.svg +1 -0
  139. package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/vite/dashboard/assets/index-CyWAfh-p.js +11 -0
  140. package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/vite/dashboard/assets/index-DhC616m4.css +1 -0
  141. package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/vite/dashboard/assets/safari-na3_-uQk.svg +1 -0
  142. package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/vite/dashboard/index.html +29 -0
  143. package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/vite/dashboard/playwright-logo.svg +24 -0
  144. package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/vite/htmlReport/index.html +16 -0
  145. package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/vite/htmlReport/report.css +2 -0
  146. package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/vite/htmlReport/report.js +32 -0
  147. package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/vite/recorder/assets/codeMirrorModule--QdMvsKi.css +1 -0
  148. package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/vite/recorder/assets/codeMirrorModule-BVGIAA-i.js +32 -0
  149. package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/vite/recorder/assets/codicon-DCmgc-ay.ttf +0 -0
  150. package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/vite/recorder/assets/index-BQ57a3QC.js +129 -0
  151. package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/vite/recorder/assets/index-l_lX622x.css +1 -0
  152. package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/vite/recorder/index.html +29 -0
  153. package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/vite/recorder/playwright-logo.svg +9 -0
  154. package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/vite/traceViewer/assets/codeMirrorModule-BSEO6m_i.js +32 -0
  155. package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/vite/traceViewer/assets/defaultSettingsView-CT5oRh4X.js +181 -0
  156. package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/vite/traceViewer/assets/urlMatch-L3liM589.js +1 -0
  157. package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/vite/traceViewer/assets/xtermModule-BN2nOuEV.js +7 -0
  158. package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/vite/traceViewer/codeMirrorModule.-QdMvsKi.css +1 -0
  159. package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/vite/traceViewer/codicon.DCmgc-ay.ttf +0 -0
  160. package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/vite/traceViewer/defaultSettingsView.BLFoOugd.css +1 -0
  161. package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/vite/traceViewer/index.B_TqY17P.css +1 -0
  162. package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/vite/traceViewer/index.DLSGjmWZ.js +1 -0
  163. package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/vite/traceViewer/index.html +44 -0
  164. package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/vite/traceViewer/manifest.webmanifest +16 -0
  165. package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/vite/traceViewer/playwright-logo.svg +9 -0
  166. package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/vite/traceViewer/snapshot.B_Jk1wbt.js +1 -0
  167. package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/vite/traceViewer/snapshot.html +10 -0
  168. package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/vite/traceViewer/sw.bundle.js +4 -0
  169. package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/vite/traceViewer/uiMode.C7UW1sC9.css +1 -0
  170. package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/vite/traceViewer/uiMode.CZvydVOh.js +5 -0
  171. package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/vite/traceViewer/uiMode.html +18 -0
  172. package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/vite/traceViewer/xtermModule.kHJ-D0s7.css +1 -0
  173. package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/xdg-open +1267 -0
  174. package/node_modules/@playwright/mcp/node_modules/playwright-core/package.json +34 -0
  175. package/node_modules/@playwright/mcp/node_modules/playwright-core/types/protocol.d.ts +24842 -0
  176. package/node_modules/@playwright/mcp/node_modules/playwright-core/types/structs.d.ts +45 -0
  177. package/node_modules/@playwright/mcp/node_modules/playwright-core/types/types.d.ts +26088 -0
  178. package/node_modules/@playwright/mcp/package.json +51 -0
  179. package/package.json +3 -1
@@ -0,0 +1,908 @@
1
+ // This file is generated by /utils/generate_types/index.js
2
+ /**
3
+ * Copyright (c) Microsoft Corporation.
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */
17
+
18
+ import type { TestStatus, Metadata, PlaywrightTestOptions, PlaywrightWorkerOptions, ReporterDescription, FullConfig, FullProject, Location, WorkerInfo, TestAnnotation } from './test';
19
+ export type { FullConfig, FullProject, TestStatus, Location, WorkerInfo } from './test';
20
+
21
+ /**
22
+ * Result of the full test run.
23
+ */
24
+ export interface FullResult {
25
+ /**
26
+ * Status:
27
+ * - 'passed' - everything went as expected.
28
+ * - 'failed' - any test has failed.
29
+ * - 'timedout' - the global time has been reached.
30
+ * - 'interrupted' - interrupted by the user.
31
+ */
32
+ status: 'passed' | 'failed' | 'timedout' | 'interrupted';
33
+
34
+ /**
35
+ * Test start wall time.
36
+ */
37
+ startTime: Date;
38
+
39
+ /**
40
+ * Test duration in milliseconds.
41
+ */
42
+ duration: number;
43
+ }
44
+
45
+ /**
46
+ * Test runner notifies the reporter about various events during test execution. All methods of the reporter are
47
+ * optional.
48
+ *
49
+ * You can create a custom reporter by implementing a class with some of the reporter methods. Make sure to export
50
+ * this class as default.
51
+ *
52
+ * ```js
53
+ * // my-awesome-reporter.ts
54
+ * import type {
55
+ * Reporter, FullConfig, Suite, TestCase, TestResult, FullResult
56
+ * } from '@playwright/test/reporter';
57
+ *
58
+ * class MyReporter implements Reporter {
59
+ * constructor(options: { customOption?: string } = {}) {
60
+ * console.log(`my-awesome-reporter setup with customOption set to ${options.customOption}`);
61
+ * }
62
+ *
63
+ * onBegin(config: FullConfig, suite: Suite) {
64
+ * console.log(`Starting the run with ${suite.allTests().length} tests`);
65
+ * }
66
+ *
67
+ * onTestBegin(test: TestCase) {
68
+ * console.log(`Starting test ${test.title}`);
69
+ * }
70
+ *
71
+ * onTestEnd(test: TestCase, result: TestResult) {
72
+ * console.log(`Finished test ${test.title}: ${result.status}`);
73
+ * }
74
+ *
75
+ * onEnd(result: FullResult) {
76
+ * console.log(`Finished the run: ${result.status}`);
77
+ * }
78
+ * }
79
+ * export default MyReporter;
80
+ * ```
81
+ *
82
+ * Now use this reporter with
83
+ * [testConfig.reporter](https://playwright.dev/docs/api/class-testconfig#test-config-reporter). Learn more about
84
+ * [using reporters](https://playwright.dev/docs/test-reporters).
85
+ *
86
+ * ```js
87
+ * // playwright.config.ts
88
+ * import { defineConfig } from '@playwright/test';
89
+ *
90
+ * export default defineConfig({
91
+ * reporter: [['./my-awesome-reporter.ts', { customOption: 'some value' }]],
92
+ * });
93
+ * ```
94
+ *
95
+ * Here is a typical order of reporter calls:
96
+ * - [reporter.onBegin(config, suite)](https://playwright.dev/docs/api/class-reporter#reporter-on-begin) is called
97
+ * once with a root suite that contains all other suites and tests. Learn more about
98
+ * [suites hierarchy][Suite](https://playwright.dev/docs/api/class-suite).
99
+ * - [reporter.onTestBegin(test, result)](https://playwright.dev/docs/api/class-reporter#reporter-on-test-begin) is
100
+ * called for each test run. It is given a [TestCase](https://playwright.dev/docs/api/class-testcase) that is
101
+ * executed, and a [TestResult](https://playwright.dev/docs/api/class-testresult) that is almost empty. Test
102
+ * result will be populated while the test runs (for example, with steps and stdio) and will get final `status`
103
+ * once the test finishes.
104
+ * - [reporter.onStepBegin(test, result, step)](https://playwright.dev/docs/api/class-reporter#reporter-on-step-begin)
105
+ * and
106
+ * [reporter.onStepEnd(test, result, step)](https://playwright.dev/docs/api/class-reporter#reporter-on-step-end)
107
+ * are called for each executed step inside the test. When steps are executed, test run has not finished yet.
108
+ * - [reporter.onTestEnd(test, result)](https://playwright.dev/docs/api/class-reporter#reporter-on-test-end) is
109
+ * called when test run has finished. By this time, [TestResult](https://playwright.dev/docs/api/class-testresult)
110
+ * is complete and you can use
111
+ * [testResult.status](https://playwright.dev/docs/api/class-testresult#test-result-status),
112
+ * [testResult.error](https://playwright.dev/docs/api/class-testresult#test-result-error) and more.
113
+ * - [reporter.onEnd(result)](https://playwright.dev/docs/api/class-reporter#reporter-on-end) is called once after
114
+ * all tests that should run had finished.
115
+ * - [reporter.onExit()](https://playwright.dev/docs/api/class-reporter#reporter-on-exit) is called immediately
116
+ * before the test runner exits.
117
+ *
118
+ * Additionally,
119
+ * [reporter.onStdOut(chunk, test, result)](https://playwright.dev/docs/api/class-reporter#reporter-on-std-out) and
120
+ * [reporter.onStdErr(chunk, test, result)](https://playwright.dev/docs/api/class-reporter#reporter-on-std-err) are
121
+ * called when standard output is produced in the worker process, possibly during a test execution, and
122
+ * [reporter.onError(error[, workerInfo])](https://playwright.dev/docs/api/class-reporter#reporter-on-error) is called
123
+ * when something went wrong outside of the test execution.
124
+ *
125
+ * If your custom reporter does not print anything to the terminal, implement
126
+ * [reporter.printsToStdio()](https://playwright.dev/docs/api/class-reporter#reporter-prints-to-stdio) and return
127
+ * `false`. This way, Playwright will use one of the standard terminal reporters in addition to your custom reporter
128
+ * to enhance user experience.
129
+ *
130
+ * **Reporter errors**
131
+ *
132
+ * Playwright will swallow any errors thrown in your custom reporter methods. If you need to detect or fail on
133
+ * reporter errors, you must wrap and handle them yourself.
134
+ *
135
+ * **Merged report API notes**
136
+ *
137
+ * When merging multiple [`blob`](https://playwright.dev/docs/test-reporters#blob-reporter) reports via
138
+ * [`merge-reports`](https://playwright.dev/docs/test-sharding#merge-reports-cli) CLI command, the same
139
+ * [Reporter](https://playwright.dev/docs/api/class-reporter) API is called to produce final reports and all existing
140
+ * reporters should work without any changes. There some subtle differences though which might affect some custom
141
+ * reporters.
142
+ * - Projects from different shards are always kept as separate
143
+ * [TestProject](https://playwright.dev/docs/api/class-testproject) objects. E.g. if project 'Desktop Chrome' was
144
+ * sharded across 5 machines then there will be 5 instances of projects with the same name in the config passed to
145
+ * [reporter.onBegin(config, suite)](https://playwright.dev/docs/api/class-reporter#reporter-on-begin).
146
+ */
147
+ export interface Reporter {
148
+ /**
149
+ * Called after the configuration has been resolved and before
150
+ * [reporter.onBegin(config, suite)](https://playwright.dev/docs/api/class-reporter#reporter-on-begin). Allows a
151
+ * reporter to mark individual tests as skipped, excluded, fixed or failing.
152
+ * @param config Resolved configuration.
153
+ * @param suite The root suite that contains the projects, files and test cases that will run.
154
+ *
155
+ * The suite reflects `--project`, `--grep`/`--grep-invert` and `.only` filtering, so it only contains tests that
156
+ * match the current invocation. It contains only the top-level projects being run — setup and dependency projects are
157
+ * not included and cannot be excluded from here.
158
+ *
159
+ * The suite ignores the `--shard` argument: it always contains the full, un-sharded corpus. Playwright applies its
160
+ * built-in sharding after
161
+ * [reporter.preprocessSuite(config, suite)](https://playwright.dev/docs/api/class-reporter#reporter-preprocess-suite)
162
+ * returns, unless the returned `implementsSharding` is `true`.
163
+ */
164
+ preprocessSuite?(config: FullConfig, suite: Suite): Promise<{ implementsSharding?: boolean } | undefined | void> | { implementsSharding?: boolean } | void;
165
+ /**
166
+ * Called after all tests have been run, or testing has been interrupted. Note that this method may return a [Promise]
167
+ * and Playwright Test will await it. Reporter is allowed to override the status and hence affect the exit code of the
168
+ * test runner.
169
+ * @param result Result of the full test run, `status` can be one of:
170
+ * - `'passed'` - Everything went as expected.
171
+ * - `'failed'` - Any test has failed.
172
+ * - `'timedout'` - The
173
+ * [testConfig.globalTimeout](https://playwright.dev/docs/api/class-testconfig#test-config-global-timeout) has
174
+ * been reached.
175
+ * - `'interrupted'` - Interrupted by the user.
176
+ */
177
+ onEnd?(result: FullResult): Promise<{ status?: FullResult['status'] } | undefined | void> | void;
178
+ /**
179
+ * Called once before running tests. All tests have been already discovered and put into a hierarchy of
180
+ * [Suite](https://playwright.dev/docs/api/class-suite)s.
181
+ * @param config Resolved configuration.
182
+ * @param suite The root suite that contains all projects, files and test cases.
183
+ */
184
+ onBegin?(config: FullConfig, suite: Suite): void;
185
+
186
+ /**
187
+ * Called on some global error, for example unhandled exception in the worker process.
188
+ * @param error The error.
189
+ * @param workerInfo Contains information about the worker that produced this error. `undefined` for errors that are not associated with
190
+ * a specific worker.
191
+ */
192
+ onError?(error: TestError, workerInfo?: WorkerInfo): void;
193
+
194
+ /**
195
+ * Called immediately before test runner exists. At this point all the reporters have received the
196
+ * [reporter.onEnd(result)](https://playwright.dev/docs/api/class-reporter#reporter-on-end) signal, so all the reports
197
+ * should be build. You can run the code that uploads the reports in this hook.
198
+ */
199
+ onExit?(): Promise<void>;
200
+
201
+ /**
202
+ * Called when something has been written to the standard error in the worker process.
203
+ * @param chunk Output chunk.
204
+ * @param test Test that was running. Note that output may happen when no test is running, in which case this will be [void].
205
+ * @param result Result of the test run, this object gets populated while the test runs.
206
+ */
207
+ onStdErr?(chunk: string|Buffer, test: void|TestCase, result: void|TestResult): void;
208
+
209
+ /**
210
+ * Called when something has been written to the standard output in the worker process.
211
+ * @param chunk Output chunk.
212
+ * @param test Test that was running. Note that output may happen when no test is running, in which case this will be [void].
213
+ * @param result Result of the test run, this object gets populated while the test runs.
214
+ */
215
+ onStdOut?(chunk: string|Buffer, test: void|TestCase, result: void|TestResult): void;
216
+
217
+ /**
218
+ * Called when a test step started in the worker process.
219
+ * @param test Test that the step belongs to.
220
+ * @param result Result of the test run, this object gets populated while the test runs.
221
+ * @param step Test step instance that has started.
222
+ */
223
+ onStepBegin?(test: TestCase, result: TestResult, step: TestStep): void;
224
+
225
+ /**
226
+ * Called when a test step finished in the worker process.
227
+ * @param test Test that the step belongs to.
228
+ * @param result Result of the test run.
229
+ * @param step Test step instance that has finished.
230
+ */
231
+ onStepEnd?(test: TestCase, result: TestResult, step: TestStep): void;
232
+
233
+ /**
234
+ * Called after a test has been started in the worker process.
235
+ * @param test Test that has been started.
236
+ * @param result Result of the test run, this object gets populated while the test runs.
237
+ */
238
+ onTestBegin?(test: TestCase, result: TestResult): void;
239
+
240
+ /**
241
+ * Called after a test has been finished in the worker process.
242
+ * @param test Test that has been finished.
243
+ * @param result Result of the test run.
244
+ */
245
+ onTestEnd?(test: TestCase, result: TestResult): void;
246
+
247
+ /**
248
+ * Whether this reporter uses stdio for reporting. When it does not, Playwright Test could add some output to enhance
249
+ * user experience. If your reporter does not print to the terminal, it is strongly recommended to return `false`.
250
+ */
251
+ printsToStdio?(): boolean;
252
+ }
253
+
254
+ export interface JSONReport {
255
+ config: Omit<FullConfig, 'projects'> & {
256
+ projects: {
257
+ outputDir: string,
258
+ repeatEach: number,
259
+ retries: number,
260
+ metadata: Metadata,
261
+ id: string,
262
+ name: string,
263
+ testDir: string,
264
+ testIgnore: string[],
265
+ testMatch: string[],
266
+ timeout: number,
267
+ }[],
268
+ };
269
+ suites: JSONReportSuite[];
270
+ errors: TestError[];
271
+ stats: {
272
+ startTime: string; // Date in ISO 8601 format.
273
+ duration: number; // In milliseconds;
274
+ expected: number;
275
+ unexpected: number;
276
+ flaky: number;
277
+ skipped: number;
278
+ }
279
+ }
280
+
281
+ export interface JSONReportSuite {
282
+ title: string;
283
+ file: string;
284
+ column: number;
285
+ line: number;
286
+ specs: JSONReportSpec[];
287
+ suites?: JSONReportSuite[];
288
+ }
289
+
290
+ export interface JSONReportSpec {
291
+ tags: string[],
292
+ title: string;
293
+ ok: boolean;
294
+ tests: JSONReportTest[];
295
+ id: string;
296
+ file: string;
297
+ line: number;
298
+ column: number;
299
+ }
300
+
301
+ export interface JSONReportTest {
302
+ timeout: number;
303
+ annotations: TestAnnotation[],
304
+ expectedStatus: TestStatus;
305
+ projectName: string;
306
+ projectId: string;
307
+ results: JSONReportTestResult[];
308
+ status: 'skipped' | 'expected' | 'unexpected' | 'flaky';
309
+ }
310
+
311
+ export interface JSONReportError {
312
+ message: string;
313
+ location?: Location;
314
+ }
315
+
316
+ export interface JSONReportTestResult {
317
+ workerIndex: number;
318
+ parallelIndex: number;
319
+ shardIndex?: number;
320
+ status: TestStatus | undefined;
321
+ duration: number;
322
+ error: TestError | undefined;
323
+ errors: JSONReportError[];
324
+ stdout: JSONReportSTDIOEntry[];
325
+ stderr: JSONReportSTDIOEntry[];
326
+ retry: number;
327
+ steps?: JSONReportTestStep[];
328
+ startTime: string; // Date in ISO 8601 format.
329
+ attachments: {
330
+ name: string;
331
+ path?: string;
332
+ body?: string;
333
+ contentType: string;
334
+ }[];
335
+ annotations: TestAnnotation[];
336
+ errorLocation?: Location;
337
+ }
338
+
339
+ export interface JSONReportTestStep {
340
+ title: string;
341
+ duration: number;
342
+ error: TestError | undefined;
343
+ steps?: JSONReportTestStep[];
344
+ }
345
+
346
+ export type JSONReportSTDIOEntry = { text: string } | { buffer: string };
347
+
348
+ // This is required to not export everything by default. See https://github.com/Microsoft/TypeScript/issues/19545#issuecomment-340490459
349
+ export {};
350
+
351
+
352
+ /**
353
+ * `Suite` is a group of tests. All tests in Playwright Test form the following hierarchy:
354
+ * - Root suite has a child suite for each [FullProject](https://playwright.dev/docs/api/class-fullproject).
355
+ * - Project suite #1. Has a child suite for each test file in the project.
356
+ * - File suite #1
357
+ * - [TestCase](https://playwright.dev/docs/api/class-testcase) #1
358
+ * - [TestCase](https://playwright.dev/docs/api/class-testcase) #2
359
+ * - Suite corresponding to a
360
+ * [test.describe([title, details, callback])](https://playwright.dev/docs/api/class-test#test-describe)
361
+ * group
362
+ * - [TestCase](https://playwright.dev/docs/api/class-testcase) #1 in a group
363
+ * - [TestCase](https://playwright.dev/docs/api/class-testcase) #2 in a group
364
+ * - < more test cases ... >
365
+ * - File suite #2
366
+ * - < more file suites ... >
367
+ * - Project suite #2
368
+ * - < more project suites ... >
369
+ *
370
+ * Reporter is given a root suite in the
371
+ * [reporter.onBegin(config, suite)](https://playwright.dev/docs/api/class-reporter#reporter-on-begin) method.
372
+ */
373
+ export interface Suite {
374
+ /**
375
+ * Returns the list of all test cases in this suite and its descendants, as opposite to
376
+ * [suite.tests](https://playwright.dev/docs/api/class-suite#suite-tests).
377
+ */
378
+ allTests(): Array<TestCase>;
379
+
380
+ /**
381
+ * Test cases and suites defined directly in this suite. The elements are returned in their declaration order. You can
382
+ * differentiate between various entry types by using
383
+ * [testCase.type](https://playwright.dev/docs/api/class-testcase#test-case-type) and
384
+ * [suite.type](https://playwright.dev/docs/api/class-suite#suite-type).
385
+ */
386
+ entries(): Array<TestCase|Suite>;
387
+
388
+ /**
389
+ * Must be called from inside
390
+ * [reporter.preprocessSuite(config, suite)](https://playwright.dev/docs/api/class-reporter#reporter-preprocess-suite),
391
+ * exclude this suite from the run. Excluded tests do not appear in the report and their body is not executed.
392
+ */
393
+ exclude(): void;
394
+
395
+ /**
396
+ * Must be called from inside
397
+ * [reporter.preprocessSuite(config, suite)](https://playwright.dev/docs/api/class-reporter#reporter-preprocess-suite).
398
+ * Mark every [TestCase](https://playwright.dev/docs/api/class-testcase) of this suite as expected-to-fail, see
399
+ * [testCase.fail([reason])](https://playwright.dev/docs/api/class-testcase#test-case-fail).
400
+ * @param reason Optional explanation surfaced as the annotation description.
401
+ */
402
+ fail(reason?: string): void;
403
+
404
+ /**
405
+ * Must be called from inside
406
+ * [reporter.preprocessSuite(config, suite)](https://playwright.dev/docs/api/class-reporter#reporter-preprocess-suite).
407
+ * Mark every [TestCase](https://playwright.dev/docs/api/class-testcase) of this suite as fixme, see
408
+ * [testCase.fixme([reason])](https://playwright.dev/docs/api/class-testcase#test-case-fixme).
409
+ * @param reason Optional explanation surfaced as the annotation description.
410
+ */
411
+ fixme(reason?: string): void;
412
+
413
+ /**
414
+ * Configuration of the project this suite belongs to, or [void] for the root suite.
415
+ */
416
+ project(): FullProject|undefined;
417
+
418
+ /**
419
+ * Must be called from inside
420
+ * [reporter.preprocessSuite(config, suite)](https://playwright.dev/docs/api/class-reporter#reporter-preprocess-suite).
421
+ * Mark every [TestCase](https://playwright.dev/docs/api/class-testcase) of this suite as skipped, see
422
+ * [testCase.skip([reason])](https://playwright.dev/docs/api/class-testcase#test-case-skip).
423
+ * @param reason Optional explanation surfaced as the annotation description.
424
+ */
425
+ skip(reason?: string): void;
426
+
427
+ /**
428
+ * Returns a list of titles from the root down to this suite.
429
+ */
430
+ titlePath(): Array<string>;
431
+
432
+ /**
433
+ * Location in the source where the suite is defined. Missing for root and project suites.
434
+ */
435
+ location?: Location;
436
+
437
+ /**
438
+ * Parent suite, missing for the root suite.
439
+ */
440
+ parent?: Suite;
441
+
442
+ /**
443
+ * Child suites. See [Suite](https://playwright.dev/docs/api/class-suite) for the hierarchy of suites.
444
+ */
445
+ suites: Array<Suite>;
446
+
447
+ /**
448
+ * Test cases in the suite. Note that only test cases defined directly in this suite are in the list. Any test cases
449
+ * defined in nested
450
+ * [test.describe([title, details, callback])](https://playwright.dev/docs/api/class-test#test-describe) groups are
451
+ * listed in the child [suite.suites](https://playwright.dev/docs/api/class-suite#suite-suites).
452
+ */
453
+ tests: Array<TestCase>;
454
+
455
+ /**
456
+ * Suite title.
457
+ * - Empty for root suite.
458
+ * - Project name for project suite.
459
+ * - File path for file suite.
460
+ * - Title passed to
461
+ * [test.describe([title, details, callback])](https://playwright.dev/docs/api/class-test#test-describe) for a
462
+ * group suite.
463
+ */
464
+ title: string;
465
+
466
+ /**
467
+ * Returns the type of the suite. The Suites form the following hierarchy: `root` -> `project` -> `file` -> `describe`
468
+ * -> ...`describe` -> `test`.
469
+ */
470
+ type: "root"|"project"|"file"|"describe";
471
+ }
472
+
473
+ /**
474
+ * `TestCase` corresponds to every
475
+ * [test.(call)(title[, details, body])](https://playwright.dev/docs/api/class-test#test-call) call in a test file.
476
+ * When a single [test.(call)(title[, details, body])](https://playwright.dev/docs/api/class-test#test-call) is
477
+ * running in multiple projects or repeated multiple times, it will have multiple `TestCase` objects in corresponding
478
+ * projects' suites.
479
+ */
480
+ export interface TestCase {
481
+ /**
482
+ * Must be called from inside
483
+ * [reporter.preprocessSuite(config, suite)](https://playwright.dev/docs/api/class-reporter#reporter-preprocess-suite),
484
+ * exclude this test from the run. Excluded tests do not appear in the report and their body is not executed.
485
+ */
486
+ exclude(): void;
487
+
488
+ /**
489
+ * Must be called from inside
490
+ * [reporter.preprocessSuite(config, suite)](https://playwright.dev/docs/api/class-reporter#reporter-preprocess-suite),
491
+ * mark this test as "should fail". Playwright runs the test and ensures it is actually failing, useful for
492
+ * documenting broken functionality until it is fixed.
493
+ * @param reason Optional explanation surfaced as the annotation description.
494
+ */
495
+ fail(reason?: string): void;
496
+
497
+ /**
498
+ * Must be called from inside
499
+ * [reporter.preprocessSuite(config, suite)](https://playwright.dev/docs/api/class-reporter#reporter-preprocess-suite),
500
+ * mark this test as fixme. The test body is not executed and the test is reported as skipped, with the intention to
501
+ * fix it.
502
+ * @param reason Optional explanation surfaced as the annotation description.
503
+ */
504
+ fixme(reason?: string): void;
505
+
506
+ /**
507
+ * Whether the test is considered running fine. Non-ok tests fail the test run with non-zero exit code.
508
+ */
509
+ ok(): boolean;
510
+
511
+ /**
512
+ * Testing outcome for this test. Note that outcome is not the same as
513
+ * [testResult.status](https://playwright.dev/docs/api/class-testresult#test-result-status):
514
+ * - Test that is expected to fail and actually fails is `'expected'`.
515
+ * - Test that passes on a second retry is `'flaky'`.
516
+ */
517
+ outcome(): "skipped"|"expected"|"unexpected"|"flaky";
518
+
519
+ /**
520
+ * Must be called from inside
521
+ * [reporter.preprocessSuite(config, suite)](https://playwright.dev/docs/api/class-reporter#reporter-preprocess-suite),
522
+ * skip this test. The test body is not executed and the test is reported as skipped.
523
+ * @param reason Optional explanation surfaced as the annotation description.
524
+ */
525
+ skip(reason?: string): void;
526
+
527
+ /**
528
+ * Returns a list of titles from the root down to this test.
529
+ */
530
+ titlePath(): Array<string>;
531
+
532
+ /**
533
+ * [testResult.annotations](https://playwright.dev/docs/api/class-testresult#test-result-annotations) of the last test
534
+ * run.
535
+ */
536
+ annotations: Array<{
537
+ /**
538
+ * Annotation type, for example `'skip'` or `'fail'`.
539
+ */
540
+ type: string;
541
+
542
+ /**
543
+ * Optional description.
544
+ */
545
+ description?: string;
546
+
547
+ /**
548
+ * Optional location in the source where the annotation is added.
549
+ */
550
+ location?: Location;
551
+ }>;
552
+
553
+ /**
554
+ * Expected test status.
555
+ * - Tests marked as
556
+ * [test.skip([title, details, body, condition, callback, description])](https://playwright.dev/docs/api/class-test#test-skip)
557
+ * or
558
+ * [test.fixme([title, details, body, condition, callback, description])](https://playwright.dev/docs/api/class-test#test-fixme)
559
+ * are expected to be `'skipped'`.
560
+ * - Tests marked as
561
+ * [test.fail([title, details, body, condition, callback, description])](https://playwright.dev/docs/api/class-test#test-fail)
562
+ * are expected to be `'failed'`.
563
+ * - Other tests are expected to be `'passed'`.
564
+ *
565
+ * See also [testResult.status](https://playwright.dev/docs/api/class-testresult#test-result-status) for the actual
566
+ * status.
567
+ */
568
+ expectedStatus: "passed"|"failed"|"timedOut"|"skipped"|"interrupted";
569
+
570
+ /**
571
+ * A test ID that is computed based on the test file name, test title and project name. The ID is unique within
572
+ * Playwright session.
573
+ */
574
+ id: string;
575
+
576
+ /**
577
+ * Location in the source where the test is defined.
578
+ */
579
+ location: Location;
580
+
581
+ /**
582
+ * Suite this test case belongs to.
583
+ */
584
+ parent: Suite;
585
+
586
+ /**
587
+ * Contains the repeat index when running in "repeat each" mode. This mode is enabled by passing `--repeat-each` to
588
+ * the [command line](https://playwright.dev/docs/test-cli).
589
+ */
590
+ repeatEachIndex: number;
591
+
592
+ /**
593
+ * Results for each run of this test.
594
+ */
595
+ results: Array<TestResult>;
596
+
597
+ /**
598
+ * The maximum number of retries given to this test in the configuration.
599
+ *
600
+ * Learn more about [test retries](https://playwright.dev/docs/test-retries#retries).
601
+ */
602
+ retries: number;
603
+
604
+ /**
605
+ * The list of tags defined on the test or suite via
606
+ * [test.(call)(title[, details, body])](https://playwright.dev/docs/api/class-test#test-call) or
607
+ * [test.describe([title, details, callback])](https://playwright.dev/docs/api/class-test#test-describe), as well as
608
+ * `@`-tokens extracted from test and suite titles.
609
+ *
610
+ * Learn more about [test tags](https://playwright.dev/docs/test-annotations#tag-tests).
611
+ */
612
+ tags: Array<string>;
613
+
614
+ /**
615
+ * The timeout given to the test. Affected by
616
+ * [testConfig.timeout](https://playwright.dev/docs/api/class-testconfig#test-config-timeout),
617
+ * [testProject.timeout](https://playwright.dev/docs/api/class-testproject#test-project-timeout),
618
+ * [test.setTimeout(timeout)](https://playwright.dev/docs/api/class-test#test-set-timeout),
619
+ * [test.slow([condition, callback, description])](https://playwright.dev/docs/api/class-test#test-slow) and
620
+ * [testInfo.setTimeout(timeout)](https://playwright.dev/docs/api/class-testinfo#test-info-set-timeout).
621
+ */
622
+ timeout: number;
623
+
624
+ /**
625
+ * Test title as passed to the
626
+ * [test.(call)(title[, details, body])](https://playwright.dev/docs/api/class-test#test-call) call.
627
+ */
628
+ title: string;
629
+
630
+ /**
631
+ * Returns "test". Useful for detecting test cases in
632
+ * [suite.entries()](https://playwright.dev/docs/api/class-suite#suite-entries).
633
+ */
634
+ type: "test";
635
+ }
636
+
637
+ /**
638
+ * Information about an error thrown during test execution.
639
+ */
640
+ export interface TestError {
641
+ /**
642
+ * Error cause. Set when there is a
643
+ * [cause](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error/cause) for the
644
+ * error. Will be `undefined` if there is no cause or if the cause is not an instance of [Error].
645
+ */
646
+ cause?: TestError;
647
+
648
+ /**
649
+ * Error location in the source code.
650
+ */
651
+ location?: Location;
652
+
653
+ /**
654
+ * Error message. Set when [Error] (or its subclass) has been thrown.
655
+ */
656
+ message?: string;
657
+
658
+ /**
659
+ * Source code snippet with highlighted error.
660
+ */
661
+ snippet?: string;
662
+
663
+ /**
664
+ * Error stack. Set when [Error] (or its subclass) has been thrown.
665
+ */
666
+ stack?: string;
667
+
668
+ /**
669
+ * The value that was thrown. Set when anything except the [Error] (or its subclass) has been thrown.
670
+ */
671
+ value?: string;
672
+ }
673
+
674
+ /**
675
+ * A result of a single [TestCase](https://playwright.dev/docs/api/class-testcase) run.
676
+ */
677
+ export interface TestResult {
678
+ /**
679
+ * The list of annotations applicable to the current test. Includes:
680
+ * - annotations defined on the test or suite via
681
+ * [test.(call)(title[, details, body])](https://playwright.dev/docs/api/class-test#test-call) and
682
+ * [test.describe([title, details, callback])](https://playwright.dev/docs/api/class-test#test-describe);
683
+ * - annotations implicitly added by methods
684
+ * [test.skip([title, details, body, condition, callback, description])](https://playwright.dev/docs/api/class-test#test-skip),
685
+ * [test.fixme([title, details, body, condition, callback, description])](https://playwright.dev/docs/api/class-test#test-fixme)
686
+ * and
687
+ * [test.fail([title, details, body, condition, callback, description])](https://playwright.dev/docs/api/class-test#test-fail);
688
+ * - annotations appended to
689
+ * [testInfo.annotations](https://playwright.dev/docs/api/class-testinfo#test-info-annotations) during the test
690
+ * execution.
691
+ *
692
+ * Annotations are available during test execution through
693
+ * [testInfo.annotations](https://playwright.dev/docs/api/class-testinfo#test-info-annotations).
694
+ *
695
+ * Learn more about [test annotations](https://playwright.dev/docs/test-annotations).
696
+ */
697
+ annotations: Array<{
698
+ /**
699
+ * Annotation type, for example `'skip'` or `'fail'`.
700
+ */
701
+ type: string;
702
+
703
+ /**
704
+ * Optional description.
705
+ */
706
+ description?: string;
707
+
708
+ /**
709
+ * Optional location in the source where the annotation is added.
710
+ */
711
+ location?: Location;
712
+ }>;
713
+
714
+ /**
715
+ * The list of files or buffers attached during the test execution through
716
+ * [testInfo.attachments](https://playwright.dev/docs/api/class-testinfo#test-info-attachments).
717
+ */
718
+ attachments: Array<{
719
+ /**
720
+ * Attachment name.
721
+ */
722
+ name: string;
723
+
724
+ /**
725
+ * Content type of this attachment to properly present in the report, for example `'application/json'` or
726
+ * `'image/png'`.
727
+ */
728
+ contentType: string;
729
+
730
+ /**
731
+ * Optional path on the filesystem to the attached file.
732
+ */
733
+ path?: string;
734
+
735
+ /**
736
+ * Optional attachment body used instead of a file.
737
+ */
738
+ body?: Buffer;
739
+ }>;
740
+
741
+ /**
742
+ * Running time in milliseconds.
743
+ */
744
+ duration: number;
745
+
746
+ /**
747
+ * First error thrown during test execution, if any. This is equal to the first element in
748
+ * [testResult.errors](https://playwright.dev/docs/api/class-testresult#test-result-errors).
749
+ */
750
+ error?: TestError;
751
+
752
+ /**
753
+ * Errors thrown during the test execution.
754
+ */
755
+ errors: Array<TestError>;
756
+
757
+ /**
758
+ * The index of the worker between `0` and `workers - 1`. It is guaranteed that workers running at the same time have
759
+ * a different `parallelIndex`.
760
+ */
761
+ parallelIndex: number;
762
+
763
+ /**
764
+ * When test is retried multiple times, each retry attempt is given a sequential number.
765
+ *
766
+ * Learn more about [test retries](https://playwright.dev/docs/test-retries#retries).
767
+ */
768
+ retry: number;
769
+
770
+ /**
771
+ * Start time of this particular test run.
772
+ */
773
+ startTime: Date;
774
+
775
+ /**
776
+ * The status of this test result. See also
777
+ * [testCase.expectedStatus](https://playwright.dev/docs/api/class-testcase#test-case-expected-status).
778
+ */
779
+ status: "passed"|"failed"|"timedOut"|"skipped"|"interrupted";
780
+
781
+ /**
782
+ * Anything written to the standard error during the test run.
783
+ */
784
+ stderr: Array<string|Buffer>;
785
+
786
+ /**
787
+ * Anything written to the standard output during the test run.
788
+ */
789
+ stdout: Array<string|Buffer>;
790
+
791
+ /**
792
+ * List of steps inside this test run.
793
+ */
794
+ steps: Array<TestStep>;
795
+
796
+ /**
797
+ * Index of the worker where the test was run. If the test was not run a single time, for example when the user
798
+ * interrupted testing, the only result will have a `workerIndex` equal to `-1`.
799
+ *
800
+ * Learn more about [parallelism and sharding](https://playwright.dev/docs/test-parallel) with Playwright Test.
801
+ */
802
+ workerIndex: number;
803
+ }
804
+
805
+ /**
806
+ * Represents a step in the [TestRun].
807
+ */
808
+ export interface TestStep {
809
+ /**
810
+ * Returns a list of step titles from the root step down to this step.
811
+ */
812
+ titlePath(): Array<string>;
813
+
814
+ /**
815
+ * The list of annotations applicable to the current test step.
816
+ */
817
+ annotations: Array<{
818
+ /**
819
+ * Annotation type, for example `'skip'`.
820
+ */
821
+ type: string;
822
+
823
+ /**
824
+ * Optional description.
825
+ */
826
+ description?: string;
827
+
828
+ /**
829
+ * Optional location in the source where the annotation is added.
830
+ */
831
+ location?: Location;
832
+ }>;
833
+
834
+ /**
835
+ * The list of files or buffers attached in the step execution through
836
+ * [testInfo.attach(name[, options])](https://playwright.dev/docs/api/class-testinfo#test-info-attach).
837
+ */
838
+ attachments: Array<{
839
+ /**
840
+ * Attachment name.
841
+ */
842
+ name: string;
843
+
844
+ /**
845
+ * Content type of this attachment to properly present in the report, for example `'application/json'` or
846
+ * `'image/png'`.
847
+ */
848
+ contentType: string;
849
+
850
+ /**
851
+ * Optional path on the filesystem to the attached file.
852
+ */
853
+ path?: string;
854
+
855
+ /**
856
+ * Optional attachment body used instead of a file.
857
+ */
858
+ body?: Buffer;
859
+ }>;
860
+
861
+ /**
862
+ * Step category to differentiate steps with different origin and verbosity. Built-in categories are:
863
+ * - `expect` for expect calls
864
+ * - `fixture` for fixtures setup and teardown
865
+ * - `hook` for hooks initialization and teardown
866
+ * - `pw:api` for Playwright API calls.
867
+ * - `test.step` for test.step API calls.
868
+ * - `test.attach` for testInfo.attach API calls.
869
+ */
870
+ category: string;
871
+
872
+ /**
873
+ * Running time in milliseconds.
874
+ */
875
+ duration: number;
876
+
877
+ /**
878
+ * Error thrown during the step execution, if any.
879
+ */
880
+ error?: TestError;
881
+
882
+ /**
883
+ * Optional location in the source where the step is defined.
884
+ */
885
+ location?: Location;
886
+
887
+ /**
888
+ * Parent step, if any.
889
+ */
890
+ parent?: TestStep;
891
+
892
+ /**
893
+ * Start time of this particular test step.
894
+ */
895
+ startTime: Date;
896
+
897
+ /**
898
+ * List of steps inside this step.
899
+ */
900
+ steps: Array<TestStep>;
901
+
902
+ /**
903
+ * User-friendly test step title.
904
+ */
905
+ title: string;
906
+ }
907
+
908
+