fix(html reporter): do not print epilogue in list mode (#23822)
References #23817.
This commit is contained in:
Родитель
605dfde2be
Коммит
b154ff1190
|
@ -53,7 +53,8 @@ export class FullConfigInternal {
|
|||
testIdMatcher?: Matcher;
|
||||
defineConfigWasUsed = false;
|
||||
|
||||
static from(config: FullConfig): FullConfigInternal {
|
||||
// TODO: when merging reports, there could be no internal config. This is very unfortunate.
|
||||
static from(config: FullConfig): FullConfigInternal | undefined {
|
||||
return (config as any)[configInternalSymbol];
|
||||
}
|
||||
|
||||
|
|
|
@ -30,6 +30,7 @@ import type { ZipFile } from 'playwright-core/lib/zipBundle';
|
|||
import { yazl } from 'playwright-core/lib/zipBundle';
|
||||
import { mime } from 'playwright-core/lib/utilsBundle';
|
||||
import type { HTMLReport, Stats, TestAttachment, TestCase, TestCaseSummary, TestFile, TestFileSummary, TestResult, TestStep } from '@html-reporter/types';
|
||||
import { FullConfigInternal } from '../common/config';
|
||||
|
||||
type TestEntry = {
|
||||
testCase: TestCase;
|
||||
|
@ -119,7 +120,7 @@ class HtmlReporter implements Reporter {
|
|||
const shouldOpen = this._open === 'always' || (!ok && this._open === 'on-failure');
|
||||
if (shouldOpen) {
|
||||
await showHTMLReport(this._outputFolder, this._options.host, this._options.port, singleTestId);
|
||||
} else {
|
||||
} else if (!FullConfigInternal.from(this.config)?.cliListOnly) {
|
||||
const relativeReportPath = this._outputFolder === standaloneDefaultFolder() ? '' : ' ' + path.relative(process.cwd(), this._outputFolder);
|
||||
console.log('');
|
||||
console.log('To open last HTML report run:');
|
||||
|
|
|
@ -129,8 +129,7 @@ export class TeleReporterEmitter implements Reporter {
|
|||
rootDir: config.rootDir,
|
||||
version: config.version,
|
||||
workers: config.workers,
|
||||
|
||||
listOnly: FullConfigInternal.from(config)?.cliListOnly,
|
||||
listOnly: !!FullConfigInternal.from(config)?.cliListOnly,
|
||||
};
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче