@@ -132,6 +132,10 @@ export default class DevToolsHookService implements Services.ServiceInstance {
132132 #currentStepUid?: string
133133 /** Per-scenario step counter for stable, collision-free step uids. */
134134 #currentStepIndex = 0
135+ /** True when @wdio/allure-reporter is in the WDIO config (detected in
136+ * beforeSession) — auto-enables the artifacts manifest even if the option
137+ * isn't set, since session/spec-scoped Allure attach reads it. */
138+ #allureReporterConfigured = false
135139
136140 /** Wall-clock ms at the current test's start, set in beforeTest/beforeScenario;
137141 * the lower bound of that test's video frame window (per-test slicing). */
@@ -266,7 +270,8 @@ export default class DevToolsHookService implements Services.ServiceInstance {
266270 resolveOutputDir : ( ) => this . #outputDir,
267271 prepareSnapshots : dedupeSnapshotsByTimestamp ,
268272 log : ( level , msg ) => log [ level ] ( msg ) ,
269- emitManifest : true ,
273+ emitManifest :
274+ this . #options. emitArtifactsManifest ?? this . #allureReporterConfigured,
270275 collectedArtifacts : this . #artifacts,
271276 onArtifact : ( a ) => this . #artifacts. push ( a )
272277 }
@@ -389,6 +394,12 @@ export default class DevToolsHookService implements Services.ServiceInstance {
389394 }
390395
391396 if ( 'reporters' in config ) {
397+ // Detect the Allure reporter (before we append our own) so the artifacts
398+ // manifest auto-enables for session/spec-scoped Allure attach.
399+ this . #allureReporterConfigured = ( config . reporters || [ ] ) . some ( ( r ) => {
400+ const name = Array . isArray ( r ) ? r [ 0 ] : r
401+ return typeof name === 'string' && name . includes ( 'allure' )
402+ } )
392403 const self = this
393404 config . reporters = [
394405 ...( config . reporters || [ ] ) ,
0 commit comments