mirror of
https://github.com/microsoft/playwright.git
synced 2025-06-26 21:40:17 +00:00
fix(html reporter): do not print epilogue in list mode (#23822)
References #23817.
This commit is contained in:
parent
605dfde2be
commit
b154ff1190
@ -53,7 +53,8 @@ export class FullConfigInternal {
|
|||||||
testIdMatcher?: Matcher;
|
testIdMatcher?: Matcher;
|
||||||
defineConfigWasUsed = false;
|
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];
|
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 { yazl } from 'playwright-core/lib/zipBundle';
|
||||||
import { mime } from 'playwright-core/lib/utilsBundle';
|
import { mime } from 'playwright-core/lib/utilsBundle';
|
||||||
import type { HTMLReport, Stats, TestAttachment, TestCase, TestCaseSummary, TestFile, TestFileSummary, TestResult, TestStep } from '@html-reporter/types';
|
import type { HTMLReport, Stats, TestAttachment, TestCase, TestCaseSummary, TestFile, TestFileSummary, TestResult, TestStep } from '@html-reporter/types';
|
||||||
|
import { FullConfigInternal } from '../common/config';
|
||||||
|
|
||||||
type TestEntry = {
|
type TestEntry = {
|
||||||
testCase: TestCase;
|
testCase: TestCase;
|
||||||
@ -119,7 +120,7 @@ class HtmlReporter implements Reporter {
|
|||||||
const shouldOpen = this._open === 'always' || (!ok && this._open === 'on-failure');
|
const shouldOpen = this._open === 'always' || (!ok && this._open === 'on-failure');
|
||||||
if (shouldOpen) {
|
if (shouldOpen) {
|
||||||
await showHTMLReport(this._outputFolder, this._options.host, this._options.port, singleTestId);
|
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);
|
const relativeReportPath = this._outputFolder === standaloneDefaultFolder() ? '' : ' ' + path.relative(process.cwd(), this._outputFolder);
|
||||||
console.log('');
|
console.log('');
|
||||||
console.log('To open last HTML report run:');
|
console.log('To open last HTML report run:');
|
||||||
|
|||||||
@ -129,8 +129,7 @@ export class TeleReporterEmitter implements Reporter {
|
|||||||
rootDir: config.rootDir,
|
rootDir: config.rootDir,
|
||||||
version: config.version,
|
version: config.version,
|
||||||
workers: config.workers,
|
workers: config.workers,
|
||||||
|
listOnly: !!FullConfigInternal.from(config)?.cliListOnly,
|
||||||
listOnly: FullConfigInternal.from(config)?.cliListOnly,
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user