@ai-testing-tool/forge-jest 2.0.0 → 2.1.0

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.
package/README.md CHANGED
@@ -45,6 +45,12 @@ const { qa } = require('@ai-testing-tool/forge-jest/jest');
45
45
 
46
46
  test('AUTH-101 login', async () => {
47
47
  await qa.suite('Auth');
48
+ await qa.suiteId('suite-uuid');
49
+ await qa.planId('plan-uuid');
50
+ await qa.plan('Smoke');
51
+ await qa.fixVersion('2.4.0');
52
+ await qa.sprintName('Sprint 42');
53
+ await qa.labels('test-auto,flaky');
48
54
  await qa.step('open form', async () => {
49
55
  expect(true).toBe(true);
50
56
  });
package/dist/jest.d.ts CHANGED
@@ -14,6 +14,14 @@ export type QaHelpers = {
14
14
  title(value: string): Promise<void>;
15
15
  comment(value: string): Promise<void>;
16
16
  suite(value: string): Promise<void>;
17
+ suiteId(value: string): Promise<void>;
18
+ planId(value: string): Promise<void>;
19
+ /** Plan display name → `meta.qa.planName`. */
20
+ plan(value: string): Promise<void>;
21
+ fixVersion(value: string): Promise<void>;
22
+ sprintName(value: string): Promise<void>;
23
+ /** Comma-separated string or array → `meta.qa.labels`. */
24
+ labels(value: string | string[]): Promise<void>;
17
25
  fields(values: Record<string, string>): Promise<void>;
18
26
  parameters(values: Record<string, string>): Promise<void>;
19
27
  /** Explicit FR43 issue key (preferred over embedding in titles). */
package/dist/jest.js CHANGED
@@ -36,6 +36,24 @@ exports.qa = {
36
36
  async suite(value) {
37
37
  pushMeta('qa-suite', value);
38
38
  },
39
+ async suiteId(value) {
40
+ pushMeta('qa-suite-id', value);
41
+ },
42
+ async planId(value) {
43
+ pushMeta('qa-plan-id', value);
44
+ },
45
+ async plan(value) {
46
+ pushMeta('qa-plan', value);
47
+ },
48
+ async fixVersion(value) {
49
+ pushMeta('qa-fix-version', value);
50
+ },
51
+ async sprintName(value) {
52
+ pushMeta('qa-sprint-name', value);
53
+ },
54
+ async labels(value) {
55
+ pushMeta('qa-labels', value);
56
+ },
39
57
  async fields(values) {
40
58
  pushMeta('qa-fields', values);
41
59
  },
@@ -1,4 +1,4 @@
1
- import type { JestVitestJsonReport, QaMetaWire } from '@ai-testing-tool/forge-commons';
1
+ import { type JestVitestJsonReport, type QaMetaWire } from '@ai-testing-tool/forge-commons';
2
2
  /**
3
3
  * Minimal AggregatedResult / --json shapes accepted by the mapper.
4
4
  * Jest onRunComplete uses `testFilePath` + nested `testResults`;
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.toJestJsonReport = toJestJsonReport;
4
+ const forge_commons_1 = require("@ai-testing-tool/forge-commons");
4
5
  function mapAssertion(a, metaByFullName) {
5
6
  const fullName = a.fullName ?? a.title ?? '';
6
7
  // Suite hierarchy lives in meta.qa.suite (from qa helpers); omit Jest's
@@ -32,7 +33,7 @@ function toJestJsonReport(results, metaByFullName) {
32
33
  const rawAssertions = file.assertionResults ?? file.testResults ?? [];
33
34
  const assertionResults = rawAssertions.map((a) => mapAssertion(a, metaByFullName));
34
35
  return {
35
- name: file.name ?? file.testFilePath ?? 'unknown',
36
+ name: (0, forge_commons_1.normalizeReportFilePath)(file.name ?? file.testFilePath ?? 'unknown'),
36
37
  status: fileStatus(file, assertionResults),
37
38
  message: file.message,
38
39
  startTime: file.startTime,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ai-testing-tool/forge-jest",
3
- "version": "2.0.0",
3
+ "version": "2.1.0",
4
4
  "description": "AI Testing Tool Jest reporter — ingest or file modes via @ai-testing-tool/forge-commons",
5
5
  "keywords": [
6
6
  "ai-testing-tool",