(test)
| 3112 | } |
| 3113 | |
| 3114 | async _passed(test) { |
| 3115 | if (this.options.recordVideo && this.page && this.page.video()) { |
| 3116 | if (this.options.keepVideoForPassedTests) { |
| 3117 | test.artifacts.video = saveVideoForPage(this.page, `${test.title}.passed`) |
| 3118 | for (const sessionName of Object.keys(this.sessionPages)) { |
| 3119 | if (sessionName === '') continue |
| 3120 | test.artifacts[`video_${sessionName}`] = saveVideoForPage(this.sessionPages[sessionName], `${sessionName}_${test.title}.passed`) |
| 3121 | } |
| 3122 | } else { |
| 3123 | this.page |
| 3124 | .video() |
| 3125 | .delete() |
| 3126 | .catch(e => {}) |
| 3127 | } |
| 3128 | } |
| 3129 | |
| 3130 | if (this.options.trace) { |
| 3131 | if (this.options.keepTraceForPassedTests) { |
| 3132 | if (this.options.trace) { |
| 3133 | test.artifacts.trace = await saveTraceForContext(this.browserContext, `${test.title}.passed`) |
| 3134 | for (const sessionName in this.sessionPages) { |
| 3135 | if (sessionName === '') continue |
| 3136 | const sessionPage = this.sessionPages[sessionName] |
| 3137 | const sessionContext = sessionPage.context() |
| 3138 | if (!sessionContext || !sessionContext.tracing) continue |
| 3139 | test.artifacts[`trace_${sessionName}`] = await saveTraceForContext(sessionContext, `${sessionName}_${test.title}.passed`) |
| 3140 | } |
| 3141 | } |
| 3142 | } else { |
| 3143 | await this.browserContext.tracing.stop() |
| 3144 | } |
| 3145 | } |
| 3146 | |
| 3147 | if (this.options.recordHar) { |
| 3148 | test.artifacts.har = this.currentRunningTest.artifacts.har |
| 3149 | } |
| 3150 | } |
| 3151 | |
| 3152 | /** |
| 3153 | * {{> wait }} |
nothing calls this directly
no test coverage detected