@sentinelqa/playwright-reporter 0.1.53 → 0.1.56

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/mode.d.ts ADDED
@@ -0,0 +1,2 @@
1
+ export type SentinelMode = "hosted" | "offline";
2
+ export declare const readSentinelMode: (env?: NodeJS.ProcessEnv) => SentinelMode;
package/dist/mode.js ADDED
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.readSentinelMode = void 0;
4
+ const readSentinelMode = (env = process.env) => {
5
+ const raw = env.SENTINEL_MODE?.trim();
6
+ if (!raw)
7
+ return "hosted";
8
+ if (raw === "hosted" || raw === "offline")
9
+ return raw;
10
+ throw new Error([
11
+ `Invalid SENTINEL_MODE value: "${raw}".`,
12
+ "Allowed values: hosted, offline.",
13
+ "Tip: remove SENTINEL_MODE to use the default hosted flow."
14
+ ].join(" "));
15
+ };
16
+ exports.readSentinelMode = readSentinelMode;
@@ -1,8 +1,34 @@
1
- type DiagnosisSignal = "timeout" | "assertion_mismatch" | "locator_not_found" | "actionability" | "network" | "runtime" | "infra" | "unknown";
1
+ type DiagnosisSignal = "setup" | "timeout" | "assertion_mismatch" | "locator_not_found" | "actionability" | "network" | "runtime" | "infra" | "unknown";
2
2
  export type QuickDiagnosis = {
3
3
  lines: string[];
4
4
  footer?: string[];
5
5
  };
6
+ export type DiagnosisIssue = {
7
+ title: string;
8
+ cause: string;
9
+ affectedTitles: string[];
10
+ where: string | null;
11
+ failingCode: string | null;
12
+ failingStep: string | null;
13
+ selector: string | null;
14
+ blocker: string | null;
15
+ targetState: string | null;
16
+ expected: string | null;
17
+ received: string | null;
18
+ whatChanged: string | null;
19
+ reason: string | null;
20
+ next: string;
21
+ impact: string;
22
+ clears: string;
23
+ };
24
+ export type DiagnosisSummary = {
25
+ mode: "new_failure" | "recurring_failure" | "failure";
26
+ headline: string | null;
27
+ failureCountLine: string;
28
+ collapseLine: string | null;
29
+ issues: DiagnosisIssue[];
30
+ footer: string[];
31
+ };
6
32
  type CodeContextCapture = {
7
33
  file?: string | null;
8
34
  line?: number | null;
@@ -20,6 +46,7 @@ type CodeContextCapture = {
20
46
  };
21
47
  type DomCapture = {
22
48
  locator?: string | null;
49
+ normalizedLocator?: string | null;
23
50
  expectedText?: string | null;
24
51
  observedText?: string | null;
25
52
  captureSource?: "live_page" | "error_fallback";
@@ -37,6 +64,7 @@ type DomCapture = {
37
64
  placeholder?: string | null;
38
65
  ariaLabel?: string | null;
39
66
  textAlternatives?: string[] | null;
67
+ ariaSnapshot?: string | null;
40
68
  matchedElements?: Array<{
41
69
  index: number;
42
70
  role: string | null;
@@ -45,6 +73,17 @@ type DomCapture = {
45
73
  enabled: boolean | null;
46
74
  text: string | null;
47
75
  }> | null;
76
+ recentConsoleErrors?: Array<{
77
+ type: string;
78
+ text: string;
79
+ }> | null;
80
+ recentPageErrors?: string[] | null;
81
+ recentRequests?: Array<{
82
+ method: string | null;
83
+ url: string | null;
84
+ status: number | null;
85
+ failure: string | null;
86
+ }> | null;
48
87
  };
49
88
  export type FailureFacts = {
50
89
  title: string;
@@ -83,6 +122,7 @@ export declare const parseFailureFacts: (title: string, titlePath: string[], mes
83
122
  export declare const collectFailureFacts: (playwrightJsonPath: string) => FailureFacts[];
84
123
  export declare const buildDebugSummary: (failure: FailureFacts) => string;
85
124
  export declare const buildSimilarityKey: (failure: FailureFacts) => string;
86
- export declare const summarizeSignal: (signal: DiagnosisSignal) => "timeout while waiting for UI or network conditions" | "assertion mismatch between expected and rendered UI state" | "missing or changed locator" | "target element was not actionable" | "network or API failure" | "runtime error thrown before the flow completed" | "browser or CI infrastructure failure" | "failure signal could not be classified cleanly";
125
+ export declare const summarizeSignal: (signal: DiagnosisSignal) => "Playwright setup or bootstrap error" | "timeout while waiting for UI or network conditions" | "assertion mismatch between expected and rendered UI state" | "missing or changed locator" | "target element was not actionable" | "network or API failure" | "runtime error thrown before the flow completed" | "browser or CI infrastructure failure" | "failure signal could not be classified cleanly";
126
+ export declare const buildQuickDiagnosisStructured: (playwrightJsonPath: string) => DiagnosisSummary | null;
87
127
  export declare const buildQuickDiagnosis: (playwrightJsonPath: string) => QuickDiagnosis | null;
88
128
  export {};