@nsxbet/playwright-orchestrator 0.5.2 → 0.5.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -34,6 +34,10 @@ export default class OrchestratorReporter implements Reporter {
34
34
  * Format: {relative-file}::{describe}::{test-title}
35
35
  *
36
36
  * This must match the format generated by the orchestrator.
37
+ *
38
+ * Note: titlePath() returns [projectName?, fileName, ...describes, testTitle]
39
+ * We need to filter out projectName and fileName since we already have
40
+ * the full relative file path.
37
41
  */
38
42
  private buildTestId;
39
43
  }
@@ -1 +1 @@
1
- {"version":3,"file":"reporter.d.ts","sourceRoot":"","sources":["../src/reporter.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAIH,OAAO,KAAK,EACV,UAAU,EACV,QAAQ,EACR,KAAK,EACL,QAAQ,EACT,MAAM,2BAA2B,CAAC;AAEnC,MAAM,CAAC,OAAO,OAAO,oBAAqB,YAAW,QAAQ;IAC3D,OAAO,CAAC,cAAc,CAA4B;IAClD,OAAO,CAAC,KAAK,CAA0C;IAEvD,OAAO,CAAC,OAAO,EAAE,UAAU,EAAE,MAAM,EAAE,KAAK;IAsB1C,WAAW,CAAC,IAAI,EAAE,QAAQ;IAa1B;;;;;OAKG;IACH,OAAO,CAAC,WAAW;CAMpB"}
1
+ {"version":3,"file":"reporter.d.ts","sourceRoot":"","sources":["../src/reporter.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAIH,OAAO,KAAK,EACV,UAAU,EACV,QAAQ,EACR,KAAK,EACL,QAAQ,EACT,MAAM,2BAA2B,CAAC;AAEnC,MAAM,CAAC,OAAO,OAAO,oBAAqB,YAAW,QAAQ;IAC3D,OAAO,CAAC,cAAc,CAA4B;IAClD,OAAO,CAAC,KAAK,CAA0C;IAEvD,OAAO,CAAC,OAAO,EAAE,UAAU,EAAE,MAAM,EAAE,KAAK;IAsB1C,WAAW,CAAC,IAAI,EAAE,QAAQ;IAa1B;;;;;;;;;OASG;IACH,OAAO,CAAC,WAAW;CAiBpB"}
package/dist/reporter.js CHANGED
@@ -62,12 +62,25 @@ export default class OrchestratorReporter {
62
62
  * Format: {relative-file}::{describe}::{test-title}
63
63
  *
64
64
  * This must match the format generated by the orchestrator.
65
+ *
66
+ * Note: titlePath() returns [projectName?, fileName, ...describes, testTitle]
67
+ * We need to filter out projectName and fileName since we already have
68
+ * the full relative file path.
65
69
  */
66
70
  buildTestId(test) {
67
71
  const file = path
68
72
  .relative(process.cwd(), test.location.file)
69
73
  .replace(/\\/g, '/');
70
- return [file, ...test.titlePath()].join('::');
74
+ const fileName = path.basename(test.location.file);
75
+ // Filter titlePath to exclude project name and filename
76
+ // titlePath typically starts with [projectName, fileName, ...describes, testTitle]
77
+ const titlePath = test.titlePath();
78
+ const filteredTitles = titlePath.filter((title) => {
79
+ // Skip if it's the project name (first element, usually matches project config)
80
+ // Skip if it matches the filename
81
+ return title !== fileName && title !== test.parent?.project()?.name;
82
+ });
83
+ return [file, ...filteredTitles].join('::');
71
84
  }
72
85
  }
73
86
  //# sourceMappingURL=reporter.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"reporter.js","sourceRoot":"","sources":["../src/reporter.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAEH,OAAO,KAAK,EAAE,MAAM,SAAS,CAAC;AAC9B,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAQlC,MAAM,CAAC,OAAO,OAAO,oBAAoB;IAC/B,cAAc,GAAuB,IAAI,CAAC;IAC1C,KAAK,GAAG,OAAO,CAAC,GAAG,CAAC,kBAAkB,KAAK,GAAG,CAAC;IAEvD,OAAO,CAAC,OAAmB,EAAE,MAAa;QACxC,MAAM,SAAS,GAAG,OAAO,CAAC,GAAG,CAAC,uBAAuB,CAAC;QAEtD,IAAI,CAAC,SAAS,IAAI,CAAC,EAAE,CAAC,UAAU,CAAC,SA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"version": "0.5.2",
3
+ "version": "0.5.3",
4
4
  "description": "Intelligent Playwright test distribution across CI shards using historical timing data",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",