@@ -9,28 +9,7 @@ import {
99} from './utils.js'
1010import { readFileSync , existsSync } from 'node:fs'
1111
12- // Store Cucumber pickle/scenario line numbers captured from hooks
13- // Key format: "cid:title" or "cid:uid"
14- const cucumberScenarioLines = new Map < string , { uri : string ; line : number } > ( )
15-
16- export function setCucumberScenarioLine (
17- key : string ,
18- uri : string ,
19- line : number
20- ) {
21- cucumberScenarioLines . set ( key , { uri, line } )
22- }
23-
24- export function getCucumberScenarioLine ( key : string ) {
25- return cucumberScenarioLines . get ( key )
26- }
27-
28- export function clearCucumberScenarioLines ( ) {
29- cucumberScenarioLines . clear ( )
30- }
31-
3212// Track test/suite occurrences within current run to handle duplicate signatures
33- // (e.g., Cucumber Scenario Outline example rows)
3413const signatureCounters = new Map < string , number > ( )
3514
3615// Generate stable UID based on test/suite metadata
@@ -201,7 +180,7 @@ export class TestReporter extends WebdriverIOReporter {
201180 }
202181 }
203182
204- // Override with stable UID
183+ // Generate stable UID for consistent identification across reruns
205184 const stableUid = generateStableUid ( suiteStats )
206185 ; ( suiteStats as any ) . uid = stableUid
207186
@@ -241,7 +220,7 @@ export class TestReporter extends WebdriverIOReporter {
241220 `${ ( testStats as any ) . file } :${ ( testStats as any ) . line } `
242221 }
243222
244- // Override with stable UID AFTER all metadata is enriched
223+ // Generate stable UID after enriching metadata for consistent test identification
245224 const stableUid = generateStableUid ( testStats )
246225 ; ( testStats as any ) . uid = stableUid
247226
0 commit comments