@@ -239,7 +239,7 @@ const playwrightFixtures: Fixtures<TestFixtures, WorkerFixtures> = ({
239
239
240
240
_snapshotSuffix : [ process . platform , { scope : 'worker' } ] ,
241
241
242
- _setupContextOptionsAndArtifacts : [ async ( { playwright, _snapshotSuffix, _combinedContextOptions, _artifactsDir, trace, screenshot, actionTimeout, navigationTimeout, testIdAttribute } , use , testInfo ) => {
242
+ _setupContextOptionsAndArtifacts : [ async ( { playwright, _contextReuseMode , _snapshotSuffix, _combinedContextOptions, _artifactsDir, trace, screenshot, actionTimeout, navigationTimeout, testIdAttribute } , use , testInfo ) => {
243
243
if ( testIdAttribute )
244
244
playwrightLibrary . selectors . setTestIdAttribute ( testIdAttribute ) ;
245
245
testInfo . snapshotSuffix = _snapshotSuffix ;
@@ -251,7 +251,7 @@ const playwrightFixtures: Fixtures<TestFixtures, WorkerFixtures> = ({
251
251
const traceMode = normalizeTraceMode ( trace ) ;
252
252
const defaultTraceOptions = { screenshots : true , snapshots : true , sources : true } ;
253
253
const traceOptions = typeof trace === 'string' ? defaultTraceOptions : { ...defaultTraceOptions , ...trace , mode : undefined } ;
254
- const captureTrace = shouldCaptureTrace ( traceMode , testInfo ) ;
254
+ const captureTrace = shouldCaptureTrace ( traceMode , testInfo ) && ! process . env . PW_TEST_DISABLE_TRACING ;
255
255
const temporaryTraceFiles : string [ ] = [ ] ;
256
256
const temporaryScreenshots : string [ ] = [ ] ;
257
257
const testInfoImpl = testInfo as TestInfoImpl ;
@@ -603,7 +603,7 @@ type ParsedStackTrace = {
603
603
apiName : string ;
604
604
} ;
605
605
606
- export function normalizeVideoMode ( video : VideoMode | 'retry-with-video' | { mode : VideoMode } | undefined ) : VideoMode {
606
+ function normalizeVideoMode ( video : VideoMode | 'retry-with-video' | { mode : VideoMode } | undefined ) : VideoMode {
607
607
if ( ! video )
608
608
return 'off' ;
609
609
let videoMode = typeof video === 'string' ? video : video . mode ;
@@ -616,7 +616,7 @@ function shouldCaptureVideo(videoMode: VideoMode, testInfo: TestInfo) {
616
616
return ( videoMode === 'on' || videoMode === 'retain-on-failure' || ( videoMode === 'on-first-retry' && testInfo . retry === 1 ) ) ;
617
617
}
618
618
619
- export function normalizeTraceMode ( trace : TraceMode | 'retry-with-trace' | { mode : TraceMode } | undefined ) : TraceMode {
619
+ function normalizeTraceMode ( trace : TraceMode | 'retry-with-trace' | { mode : TraceMode } | undefined ) : TraceMode {
620
620
if ( ! trace )
621
621
return 'off' ;
622
622
let traceMode = typeof trace === 'string' ? trace : trace . mode ;
0 commit comments