@supatest/playwright-reporter 0.0.6 → 0.0.8
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 +68 -12
- package/dist/index.cjs +5675 -226
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +5 -18
- package/dist/index.d.ts +5 -18
- package/dist/index.js +5671 -193
- package/dist/index.js.map +1 -1
- package/package.json +15 -7
package/dist/index.d.cts
CHANGED
|
@@ -16,7 +16,7 @@ type ErrorSummary = {
|
|
|
16
16
|
byCategory: Record<ErrorCategory, number>;
|
|
17
17
|
errors: ReporterError[];
|
|
18
18
|
};
|
|
19
|
-
type
|
|
19
|
+
type BaseReporterOptions = {
|
|
20
20
|
projectId: string;
|
|
21
21
|
apiKey: string;
|
|
22
22
|
apiUrl?: string;
|
|
@@ -44,6 +44,8 @@ declare class ErrorCollector {
|
|
|
44
44
|
private formatError;
|
|
45
45
|
}
|
|
46
46
|
|
|
47
|
+
type ReporterOptions = BaseReporterOptions;
|
|
48
|
+
|
|
47
49
|
declare class SupatestPlaywrightReporter implements Reporter {
|
|
48
50
|
private readonly options;
|
|
49
51
|
private client;
|
|
@@ -63,8 +65,10 @@ declare class SupatestPlaywrightReporter implements Reporter {
|
|
|
63
65
|
private sourceReader?;
|
|
64
66
|
constructor(options?: ReporterOptions);
|
|
65
67
|
onBegin(config: FullConfig, suite: Suite): Promise<void>;
|
|
68
|
+
private _onBegin;
|
|
66
69
|
onTestEnd(test: TestCase, result: TestResult): void;
|
|
67
70
|
onEnd(result: FullResult): Promise<void>;
|
|
71
|
+
private _onEnd;
|
|
68
72
|
private processTestResult;
|
|
69
73
|
private buildTestPayload;
|
|
70
74
|
private serializeSteps;
|
|
@@ -82,33 +86,16 @@ declare class SupatestPlaywrightReporter implements Reporter {
|
|
|
82
86
|
private mapRunStatus;
|
|
83
87
|
/**
|
|
84
88
|
* Compute a stable test ID for tracking across runs.
|
|
85
|
-
* Priority:
|
|
86
|
-
* 1. Explicit @id:XXX tag (e.g., @id:TC-001)
|
|
87
|
-
* 2. Annotation with type 'id' (e.g., test.info().annotations.push({ type: 'id', description: 'TC-001' }))
|
|
88
|
-
* 3. Fallback: hash of file + titlePath + projectName (like Allure's historyId)
|
|
89
|
-
*
|
|
90
|
-
* Note: Does NOT include line number, so tests can move within a file without losing history.
|
|
91
89
|
*/
|
|
92
90
|
private getTestId;
|
|
93
91
|
private getResultId;
|
|
94
92
|
/**
|
|
95
93
|
* Parse metadata from test tags and annotations.
|
|
96
|
-
* Supports formats:
|
|
97
|
-
* - Tags: @owner:team-name, @priority:high, @feature:auth, @ticket:PROJ-123, @test_type:e2e
|
|
98
|
-
* - Boolean tags: @slow, @flaky
|
|
99
|
-
* - Annotations: { type: 'owner', description: 'team-name' }
|
|
100
94
|
*/
|
|
101
95
|
private parseTestMetadata;
|
|
102
|
-
private hashKey;
|
|
103
|
-
private relativePath;
|
|
104
|
-
private getFileSize;
|
|
105
96
|
private getAttachmentSize;
|
|
106
97
|
private getAttachmentKind;
|
|
107
98
|
private getGitInfo;
|
|
108
|
-
private getCIInfo;
|
|
109
|
-
private getErrorMessage;
|
|
110
|
-
private logInfo;
|
|
111
|
-
private logWarn;
|
|
112
99
|
}
|
|
113
100
|
|
|
114
101
|
export { type ErrorCategory, ErrorCollector, type ErrorSummary, type ReporterOptions, SupatestPlaywrightReporter as default };
|
package/dist/index.d.ts
CHANGED
|
@@ -16,7 +16,7 @@ type ErrorSummary = {
|
|
|
16
16
|
byCategory: Record<ErrorCategory, number>;
|
|
17
17
|
errors: ReporterError[];
|
|
18
18
|
};
|
|
19
|
-
type
|
|
19
|
+
type BaseReporterOptions = {
|
|
20
20
|
projectId: string;
|
|
21
21
|
apiKey: string;
|
|
22
22
|
apiUrl?: string;
|
|
@@ -44,6 +44,8 @@ declare class ErrorCollector {
|
|
|
44
44
|
private formatError;
|
|
45
45
|
}
|
|
46
46
|
|
|
47
|
+
type ReporterOptions = BaseReporterOptions;
|
|
48
|
+
|
|
47
49
|
declare class SupatestPlaywrightReporter implements Reporter {
|
|
48
50
|
private readonly options;
|
|
49
51
|
private client;
|
|
@@ -63,8 +65,10 @@ declare class SupatestPlaywrightReporter implements Reporter {
|
|
|
63
65
|
private sourceReader?;
|
|
64
66
|
constructor(options?: ReporterOptions);
|
|
65
67
|
onBegin(config: FullConfig, suite: Suite): Promise<void>;
|
|
68
|
+
private _onBegin;
|
|
66
69
|
onTestEnd(test: TestCase, result: TestResult): void;
|
|
67
70
|
onEnd(result: FullResult): Promise<void>;
|
|
71
|
+
private _onEnd;
|
|
68
72
|
private processTestResult;
|
|
69
73
|
private buildTestPayload;
|
|
70
74
|
private serializeSteps;
|
|
@@ -82,33 +86,16 @@ declare class SupatestPlaywrightReporter implements Reporter {
|
|
|
82
86
|
private mapRunStatus;
|
|
83
87
|
/**
|
|
84
88
|
* Compute a stable test ID for tracking across runs.
|
|
85
|
-
* Priority:
|
|
86
|
-
* 1. Explicit @id:XXX tag (e.g., @id:TC-001)
|
|
87
|
-
* 2. Annotation with type 'id' (e.g., test.info().annotations.push({ type: 'id', description: 'TC-001' }))
|
|
88
|
-
* 3. Fallback: hash of file + titlePath + projectName (like Allure's historyId)
|
|
89
|
-
*
|
|
90
|
-
* Note: Does NOT include line number, so tests can move within a file without losing history.
|
|
91
89
|
*/
|
|
92
90
|
private getTestId;
|
|
93
91
|
private getResultId;
|
|
94
92
|
/**
|
|
95
93
|
* Parse metadata from test tags and annotations.
|
|
96
|
-
* Supports formats:
|
|
97
|
-
* - Tags: @owner:team-name, @priority:high, @feature:auth, @ticket:PROJ-123, @test_type:e2e
|
|
98
|
-
* - Boolean tags: @slow, @flaky
|
|
99
|
-
* - Annotations: { type: 'owner', description: 'team-name' }
|
|
100
94
|
*/
|
|
101
95
|
private parseTestMetadata;
|
|
102
|
-
private hashKey;
|
|
103
|
-
private relativePath;
|
|
104
|
-
private getFileSize;
|
|
105
96
|
private getAttachmentSize;
|
|
106
97
|
private getAttachmentKind;
|
|
107
98
|
private getGitInfo;
|
|
108
|
-
private getCIInfo;
|
|
109
|
-
private getErrorMessage;
|
|
110
|
-
private logInfo;
|
|
111
|
-
private logWarn;
|
|
112
99
|
}
|
|
113
100
|
|
|
114
101
|
export { type ErrorCategory, ErrorCollector, type ErrorSummary, type ReporterOptions, SupatestPlaywrightReporter as default };
|