@supatest/cypress-reporter 0.0.2 → 0.0.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.
- package/dist/index.d.cts +44 -3
- package/dist/index.d.ts +44 -3
- package/package.json +4 -4
package/dist/index.d.cts
CHANGED
|
@@ -1,5 +1,46 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
type ErrorCategory = "RUN_CREATE" | "TEST_SUBMISSION" | "ATTACHMENT_SIGN" | "ATTACHMENT_UPLOAD" | "FILE_READ" | "RUN_COMPLETE";
|
|
2
|
+
type ReporterError = {
|
|
3
|
+
category: ErrorCategory;
|
|
4
|
+
message: string;
|
|
5
|
+
testId?: string;
|
|
6
|
+
testTitle?: string;
|
|
7
|
+
attachmentName?: string;
|
|
8
|
+
filePath?: string;
|
|
9
|
+
timestamp: string;
|
|
10
|
+
originalError?: string;
|
|
11
|
+
};
|
|
12
|
+
type ErrorSummary = {
|
|
13
|
+
totalErrors: number;
|
|
14
|
+
byCategory: Record<ErrorCategory, number>;
|
|
15
|
+
errors: ReporterError[];
|
|
16
|
+
};
|
|
17
|
+
type BaseReporterOptions = {
|
|
18
|
+
projectId: string;
|
|
19
|
+
apiKey: string;
|
|
20
|
+
apiUrl?: string;
|
|
21
|
+
uploadAssets?: boolean;
|
|
22
|
+
maxConcurrentUploads?: number;
|
|
23
|
+
retryAttempts?: number;
|
|
24
|
+
timeoutMs?: number;
|
|
25
|
+
dryRun?: boolean;
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
declare class ErrorCollector {
|
|
29
|
+
private errors;
|
|
30
|
+
recordError(category: ErrorCategory, message: string, context?: {
|
|
31
|
+
testId?: string;
|
|
32
|
+
testTitle?: string;
|
|
33
|
+
attachmentName?: string;
|
|
34
|
+
filePath?: string;
|
|
35
|
+
error?: unknown;
|
|
36
|
+
}): void;
|
|
37
|
+
getSummary(): ErrorSummary;
|
|
38
|
+
hasErrors(): boolean;
|
|
39
|
+
formatSummary(): string;
|
|
40
|
+
private getCategoryIcon;
|
|
41
|
+
private getCategoryLabel;
|
|
42
|
+
private formatError;
|
|
43
|
+
}
|
|
3
44
|
|
|
4
45
|
type ReporterOptions = BaseReporterOptions;
|
|
5
46
|
|
|
@@ -106,4 +147,4 @@ type CypressPluginEvents = {
|
|
|
106
147
|
type CypressPluginConfigOptions = Record<string, unknown>;
|
|
107
148
|
declare function supatestPlugin(on: CypressPluginEvents, config: CypressPluginConfigOptions, options?: SupatestCypressOptions): void;
|
|
108
149
|
|
|
109
|
-
export { type ReporterOptions, type SupatestCypressOptions, supatestPlugin as default };
|
|
150
|
+
export { type ErrorCategory, ErrorCollector, type ErrorSummary, type ReporterOptions, type SupatestCypressOptions, supatestPlugin as default };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,46 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
type ErrorCategory = "RUN_CREATE" | "TEST_SUBMISSION" | "ATTACHMENT_SIGN" | "ATTACHMENT_UPLOAD" | "FILE_READ" | "RUN_COMPLETE";
|
|
2
|
+
type ReporterError = {
|
|
3
|
+
category: ErrorCategory;
|
|
4
|
+
message: string;
|
|
5
|
+
testId?: string;
|
|
6
|
+
testTitle?: string;
|
|
7
|
+
attachmentName?: string;
|
|
8
|
+
filePath?: string;
|
|
9
|
+
timestamp: string;
|
|
10
|
+
originalError?: string;
|
|
11
|
+
};
|
|
12
|
+
type ErrorSummary = {
|
|
13
|
+
totalErrors: number;
|
|
14
|
+
byCategory: Record<ErrorCategory, number>;
|
|
15
|
+
errors: ReporterError[];
|
|
16
|
+
};
|
|
17
|
+
type BaseReporterOptions = {
|
|
18
|
+
projectId: string;
|
|
19
|
+
apiKey: string;
|
|
20
|
+
apiUrl?: string;
|
|
21
|
+
uploadAssets?: boolean;
|
|
22
|
+
maxConcurrentUploads?: number;
|
|
23
|
+
retryAttempts?: number;
|
|
24
|
+
timeoutMs?: number;
|
|
25
|
+
dryRun?: boolean;
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
declare class ErrorCollector {
|
|
29
|
+
private errors;
|
|
30
|
+
recordError(category: ErrorCategory, message: string, context?: {
|
|
31
|
+
testId?: string;
|
|
32
|
+
testTitle?: string;
|
|
33
|
+
attachmentName?: string;
|
|
34
|
+
filePath?: string;
|
|
35
|
+
error?: unknown;
|
|
36
|
+
}): void;
|
|
37
|
+
getSummary(): ErrorSummary;
|
|
38
|
+
hasErrors(): boolean;
|
|
39
|
+
formatSummary(): string;
|
|
40
|
+
private getCategoryIcon;
|
|
41
|
+
private getCategoryLabel;
|
|
42
|
+
private formatError;
|
|
43
|
+
}
|
|
3
44
|
|
|
4
45
|
type ReporterOptions = BaseReporterOptions;
|
|
5
46
|
|
|
@@ -106,4 +147,4 @@ type CypressPluginEvents = {
|
|
|
106
147
|
type CypressPluginConfigOptions = Record<string, unknown>;
|
|
107
148
|
declare function supatestPlugin(on: CypressPluginEvents, config: CypressPluginConfigOptions, options?: SupatestCypressOptions): void;
|
|
108
149
|
|
|
109
|
-
export { type ReporterOptions, type SupatestCypressOptions, supatestPlugin as default };
|
|
150
|
+
export { type ErrorCategory, ErrorCollector, type ErrorSummary, type ReporterOptions, type SupatestCypressOptions, supatestPlugin as default };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@supatest/cypress-reporter",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.3",
|
|
4
4
|
"description": "Supatest Cypress reporter - stream test results to Supatest dashboard",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -22,14 +22,14 @@
|
|
|
22
22
|
},
|
|
23
23
|
"dependencies": {
|
|
24
24
|
"p-limit": "^6.1.0",
|
|
25
|
-
"simple-git": "^3.21.0"
|
|
26
|
-
"@supatest/reporter-core": "0.0.1"
|
|
25
|
+
"simple-git": "^3.21.0"
|
|
27
26
|
},
|
|
28
27
|
"devDependencies": {
|
|
29
28
|
"@types/node": "^20.12.12",
|
|
30
29
|
"cypress": "^13.0.0",
|
|
31
30
|
"tsup": "^8.5.1",
|
|
32
|
-
"typescript": "^5.4.5"
|
|
31
|
+
"typescript": "^5.4.5",
|
|
32
|
+
"@supatest/reporter-core": "0.0.1"
|
|
33
33
|
},
|
|
34
34
|
"engines": {
|
|
35
35
|
"node": ">=18.0.0"
|