feat(playwright): add on-first-failure as valid trace mode
This commit is contained in:
parent
06de29af56
commit
d69736767d
|
|
@ -16,25 +16,24 @@
|
|||
|
||||
/* eslint-disable no-console */
|
||||
|
||||
import type { Command } from 'playwright-core/lib/utilsBundle';
|
||||
import fs from 'fs';
|
||||
import path from 'path';
|
||||
import { Runner } from './runner/runner';
|
||||
import { stopProfiling, startProfiling, gracefullyProcessExitDoNotHang } from 'playwright-core/lib/utils';
|
||||
import { serializeError } from './util';
|
||||
import { showHTMLReport } from './reporters/html';
|
||||
import { createMergedReport } from './reporters/merge';
|
||||
import { program } from 'playwright-core/lib/cli/program';
|
||||
import { gracefullyProcessExitDoNotHang, startProfiling, stopProfiling } from 'playwright-core/lib/utils';
|
||||
import type { Command } from 'playwright-core/lib/utilsBundle';
|
||||
import type { ReporterDescription, TraceMode } from '../types/test';
|
||||
import type { FullResult, TestError } from '../types/testReporter';
|
||||
import { builtInReporters, defaultReporter, defaultTimeout } from './common/config';
|
||||
import { loadConfigFromFileRestartIfNeeded, loadEmptyConfigForMergeReports } from './common/configLoader';
|
||||
import type { ConfigCLIOverrides } from './common/ipc';
|
||||
import type { FullResult, TestError } from '../types/testReporter';
|
||||
import type { TraceMode } from '../types/test';
|
||||
import { builtInReporters, defaultReporter, defaultTimeout } from './common/config';
|
||||
import { program } from 'playwright-core/lib/cli/program';
|
||||
export { program } from 'playwright-core/lib/cli/program';
|
||||
import type { ReporterDescription } from '../types/test';
|
||||
import { prepareErrorStack } from './reporters/base';
|
||||
import { cacheDir } from './transform/compilationCache';
|
||||
import { showHTMLReport } from './reporters/html';
|
||||
import { createMergedReport } from './reporters/merge';
|
||||
import { Runner } from './runner/runner';
|
||||
import { runTestServer } from './runner/testServer';
|
||||
import { cacheDir } from './transform/compilationCache';
|
||||
import { serializeError } from './util';
|
||||
export { program } from 'playwright-core/lib/cli/program';
|
||||
|
||||
function addTestCommand(program: Command) {
|
||||
const command = program.command('test [test-filter...]');
|
||||
|
|
@ -290,7 +289,7 @@ function resolveReporter(id: string) {
|
|||
return require.resolve(id, { paths: [process.cwd()] });
|
||||
}
|
||||
|
||||
const kTraceModes: TraceMode[] = ['on', 'off', 'on-first-retry', 'on-all-retries', 'retain-on-failure'];
|
||||
const kTraceModes: TraceMode[] = ['on', 'off', 'on-first-retry', 'on-all-retries', 'retain-on-failure', 'on-first-failure'];
|
||||
|
||||
const testOptions: [string, string][] = [
|
||||
['--browser <browser>', `Browser to use for tests, one of "all", "chromium", "firefox" or "webkit" (default: "chromium")`],
|
||||
|
|
|
|||
Loading…
Reference in a new issue