@qanalyzer/forge-playwright 1.1.2 → 1.2.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/dist/helpers.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Programmatic helpers for Playwright tests (FR111).
3
- * Prefer Jira issue keys in `test('AUTH-101 ...')` titles (FR43).
3
+ * Prefer `qa.issueKey()` / `qa.issueKeys()` for FR43 (title keys remain a fallback).
4
4
  *
5
5
  * Steps: use Playwright native `test.step()` — do **not** use `qa.step` (FR112).
6
6
  *
@@ -16,6 +16,10 @@ export type QaHelpers = {
16
16
  suite(value: string): void;
17
17
  fields(values: Record<string, string>): void;
18
18
  parameters(values: Record<string, string>): void;
19
+ /** Explicit FR43 issue key (preferred over embedding in titles). */
20
+ issueKey(key: string): void;
21
+ /** Explicit FR43 issue keys (preferred over embedding in titles). */
22
+ issueKeys(keys: string[]): void;
19
23
  ignore(): void;
20
24
  /** Attach metadata; with content/path, attempts Forge upload (FR119). */
21
25
  attach(attach: {
package/dist/helpers.js CHANGED
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  /**
3
3
  * Programmatic helpers for Playwright tests (FR111).
4
- * Prefer Jira issue keys in `test('AUTH-101 ...')` titles (FR43).
4
+ * Prefer `qa.issueKey()` / `qa.issueKeys()` for FR43 (title keys remain a fallback).
5
5
  *
6
6
  * Steps: use Playwright native `test.step()` — do **not** use `qa.step` (FR112).
7
7
  *
@@ -69,6 +69,12 @@ exports.qa = {
69
69
  parameters(values) {
70
70
  pushMeta('qa-parameters', values, { parameters: values });
71
71
  },
72
+ issueKey(key) {
73
+ pushMeta('qa-issue-key', key, { issueKeys: [key] });
74
+ },
75
+ issueKeys(keys) {
76
+ pushMeta('qa-issue-keys', keys, { issueKeys: keys });
77
+ },
72
78
  ignore() {
73
79
  pushMeta('qa-ignore', true, { ignore: true });
74
80
  },
@@ -32,6 +32,9 @@ function buildQaMetaFromResult(input) {
32
32
  if (message.parameters) {
33
33
  (0, forge_commons_1.applyQaAnnotation)(acc, { type: 'qa-parameters', body: message.parameters });
34
34
  }
35
+ if (message.issueKeys?.length) {
36
+ (0, forge_commons_1.applyQaAnnotation)(acc, { type: 'qa-issue-keys', body: message.issueKeys });
37
+ }
35
38
  if (message.ignore)
36
39
  (0, forge_commons_1.applyQaAnnotation)(acc, { type: 'qa-ignore', body: true });
37
40
  for (const att of message.attachments ?? []) {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@qanalyzer/forge-playwright",
3
- "version": "1.1.2",
4
- "description": "QAnalyzer Playwright reporter \u2014 ingest or file modes via @qanalyzer/forge-commons",
3
+ "version": "1.2.0",
4
+ "description": "QAnalyzer Playwright reporter ingest or file modes via @qanalyzer/forge-commons",
5
5
  "keywords": [
6
6
  "qanalyzer",
7
7
  "playwright",