snap-ally 0.2.5-beta → 0.3.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/A11yReportAssets.d.ts +5 -12
- package/dist/A11yReportAssets.js +16 -82
- package/dist/A11yScanner.d.ts +2 -21
- package/dist/A11yScanner.js +16 -22
- package/dist/A11yTimeUtils.js +11 -23
- package/dist/A11yVisualReporter.d.ts +50 -0
- package/dist/A11yVisualReporter.js +188 -0
- package/dist/AccessibilityReporterOptions.d.ts +24 -0
- package/dist/AccessibilityReporterOptions.js +5 -0
- package/dist/ResolvedColors.d.ts +15 -0
- package/dist/ResolvedColors.js +20 -0
- package/dist/SnapAllyReporter.d.ts +12 -72
- package/dist/SnapAllyReporter.js +218 -329
- package/dist/core/A11yHtmlRenderer.d.ts +17 -0
- package/dist/core/A11yHtmlRenderer.js +118 -0
- package/dist/core/A11yReportAssets.d.ts +30 -0
- package/dist/core/A11yReportAssets.js +127 -0
- package/dist/core/A11yScanner.d.ts +8 -0
- package/dist/core/A11yScanner.js +178 -0
- package/dist/core/A11yVisualReporter.d.ts +50 -0
- package/dist/core/A11yVisualReporter.js +188 -0
- package/dist/core/HtmlRenderer.d.ts +14 -0
- package/dist/core/HtmlRenderer.js +106 -0
- package/dist/core/ReportAssets.d.ts +29 -0
- package/dist/core/ReportAssets.js +126 -0
- package/dist/core/Scanner.d.ts +7 -0
- package/dist/core/Scanner.js +162 -0
- package/dist/core/VisualReporter.d.ts +54 -0
- package/dist/core/VisualReporter.js +192 -0
- package/dist/index.d.ts +6 -6
- package/dist/index.js +13 -12
- package/dist/models/A11yDataSource.d.ts +15 -0
- package/dist/models/A11yDataSource.js +2 -0
- package/dist/models/A11yError.d.ts +34 -0
- package/dist/models/A11yError.js +11 -0
- package/dist/models/A11yScannerOptions.d.ts +24 -0
- package/dist/models/A11yScannerOptions.js +2 -0
- package/dist/models/AccessibilityReporterOptions.d.ts +24 -0
- package/dist/models/AccessibilityReporterOptions.js +5 -0
- package/dist/models/DataSource.d.ts +15 -0
- package/dist/models/DataSource.js +2 -0
- package/dist/models/ImagePath.d.ts +5 -0
- package/dist/models/ImagePath.js +3 -0
- package/dist/models/ReportData.d.ts +24 -0
- package/dist/models/ReportData.js +2 -0
- package/dist/models/ReporterOptions.d.ts +24 -0
- package/dist/models/ReporterOptions.js +5 -0
- package/dist/models/ResolvedColors.d.ts +16 -0
- package/dist/models/ResolvedColors.js +24 -0
- package/dist/models/ScannerOptions.d.ts +30 -0
- package/dist/models/ScannerOptions.js +2 -0
- package/dist/models/Severity.d.ts +7 -0
- package/dist/models/Severity.js +11 -0
- package/dist/models/Target.d.ts +10 -0
- package/dist/models/Target.js +3 -0
- package/dist/models/TestResults.d.ts +41 -0
- package/dist/models/TestResults.js +2 -0
- package/dist/models/TestStatusIcon.d.ts +8 -0
- package/dist/models/TestStatusIcon.js +12 -0
- package/dist/models/TestSummary.d.ts +34 -0
- package/dist/models/TestSummary.js +2 -0
- package/dist/models/Violation.d.ts +13 -0
- package/dist/models/Violation.js +2 -0
- package/dist/models/index.d.ts +12 -113
- package/dist/models/index.js +26 -16
- package/dist/templates/accessibility-report.html +75 -101
- package/dist/templates/execution-summary.html +37 -103
- package/dist/templates/global-report-styles.css +400 -9
- package/dist/templates/report-app.js +171 -73
- package/dist/templates/test-execution-report.html +84 -113
- package/dist/utils/A11yTimeUtils.d.ts +13 -0
- package/dist/utils/A11yTimeUtils.js +40 -0
- package/dist/utils/TimeUtils.d.ts +13 -0
- package/dist/utils/TimeUtils.js +39 -0
- package/package.json +2 -2
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { Violation } from './Violation';
|
|
2
|
+
/** Aggregated results for a single test run. */
|
|
3
|
+
export interface TestResults {
|
|
4
|
+
num: number;
|
|
5
|
+
folderName: string;
|
|
6
|
+
title: string;
|
|
7
|
+
fileName: string;
|
|
8
|
+
timeDuration: number;
|
|
9
|
+
duration: string;
|
|
10
|
+
description: string;
|
|
11
|
+
status: string;
|
|
12
|
+
pageUrl?: string;
|
|
13
|
+
browser: string;
|
|
14
|
+
adoOrganization?: string;
|
|
15
|
+
adoProject?: string;
|
|
16
|
+
adoAreaPath?: string;
|
|
17
|
+
timestamp?: string;
|
|
18
|
+
tags: string[];
|
|
19
|
+
preConditions: string[];
|
|
20
|
+
steps: string[];
|
|
21
|
+
postConditions: string[];
|
|
22
|
+
statusIcon: string;
|
|
23
|
+
/** Relative paths to videos for the test execution. */
|
|
24
|
+
videoPath: string | string[] | null;
|
|
25
|
+
screenshotPaths: string[];
|
|
26
|
+
attachments: {
|
|
27
|
+
path: string;
|
|
28
|
+
name: string;
|
|
29
|
+
}[];
|
|
30
|
+
errors: string[];
|
|
31
|
+
a11yReportPath?: string;
|
|
32
|
+
executionReportPath?: string;
|
|
33
|
+
a11yErrors?: Violation[];
|
|
34
|
+
a11yErrorCount?: number;
|
|
35
|
+
colors?: {
|
|
36
|
+
critical?: string;
|
|
37
|
+
serious?: string;
|
|
38
|
+
moderate?: string;
|
|
39
|
+
minor?: string;
|
|
40
|
+
};
|
|
41
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/** Standard icons for test statuses in the report. */
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.TestStatusIcon = void 0;
|
|
5
|
+
var TestStatusIcon;
|
|
6
|
+
(function (TestStatusIcon) {
|
|
7
|
+
TestStatusIcon["passed"] = "check_circle";
|
|
8
|
+
TestStatusIcon["failed"] = "cancel";
|
|
9
|
+
TestStatusIcon["skipped"] = "remove_circle";
|
|
10
|
+
TestStatusIcon["timedOut"] = "alarm_off";
|
|
11
|
+
TestStatusIcon["interrupted"] = "block";
|
|
12
|
+
})(TestStatusIcon || (exports.TestStatusIcon = TestStatusIcon = {}));
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { TestResults } from './TestResults';
|
|
2
|
+
/** Final execution summary data structure. */
|
|
3
|
+
export interface TestSummary {
|
|
4
|
+
date?: string;
|
|
5
|
+
duration: string;
|
|
6
|
+
status: string;
|
|
7
|
+
statusIcon: string;
|
|
8
|
+
total: number;
|
|
9
|
+
totalPassed: number;
|
|
10
|
+
totalFailed: number;
|
|
11
|
+
totalFlaky: number;
|
|
12
|
+
totalSkipped: number;
|
|
13
|
+
groupedResults: {
|
|
14
|
+
[key: string]: TestResults[];
|
|
15
|
+
};
|
|
16
|
+
wcagErrors: {
|
|
17
|
+
[key: string]: {
|
|
18
|
+
count: number;
|
|
19
|
+
severity: string;
|
|
20
|
+
helpUrl?: string;
|
|
21
|
+
description?: string;
|
|
22
|
+
};
|
|
23
|
+
};
|
|
24
|
+
totalA11yErrorCount: number;
|
|
25
|
+
browserSummaries?: {
|
|
26
|
+
[browser: string]: TestSummary;
|
|
27
|
+
};
|
|
28
|
+
colors?: {
|
|
29
|
+
critical?: string;
|
|
30
|
+
serious?: string;
|
|
31
|
+
moderate?: string;
|
|
32
|
+
minor?: string;
|
|
33
|
+
};
|
|
34
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Target } from './Target';
|
|
2
|
+
/** Grouped error entry for a specific accessibility violation. */
|
|
3
|
+
export interface Violation {
|
|
4
|
+
id: string;
|
|
5
|
+
description: string;
|
|
6
|
+
wcagRule: string;
|
|
7
|
+
severity: string;
|
|
8
|
+
help: string;
|
|
9
|
+
helpUrl: string;
|
|
10
|
+
guideline: string;
|
|
11
|
+
total: number;
|
|
12
|
+
target: Target[];
|
|
13
|
+
}
|
package/dist/models/index.d.ts
CHANGED
|
@@ -1,113 +1,12 @@
|
|
|
1
|
-
export
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
adoAreaPath?: string;
|
|
14
|
-
adoPat?: string;
|
|
15
|
-
timestamp?: string;
|
|
16
|
-
}
|
|
17
|
-
export interface A11yError {
|
|
18
|
-
id: string;
|
|
19
|
-
description: string;
|
|
20
|
-
wcagRule: string;
|
|
21
|
-
severity: string;
|
|
22
|
-
help: string;
|
|
23
|
-
helpUrl: string;
|
|
24
|
-
guideline: string;
|
|
25
|
-
total: number;
|
|
26
|
-
target: Target[];
|
|
27
|
-
}
|
|
28
|
-
export interface Target {
|
|
29
|
-
element: string;
|
|
30
|
-
snippet: string;
|
|
31
|
-
html: string;
|
|
32
|
-
screenshot: string;
|
|
33
|
-
steps: string[];
|
|
34
|
-
stepsJson: string;
|
|
35
|
-
screenshotBase64: string;
|
|
36
|
-
}
|
|
37
|
-
export interface ImagePath {
|
|
38
|
-
srcPath: string;
|
|
39
|
-
fileName: string;
|
|
40
|
-
}
|
|
41
|
-
export declare enum Severity {
|
|
42
|
-
minor = "minor",
|
|
43
|
-
moderate = "moderate",
|
|
44
|
-
serious = "serious",
|
|
45
|
-
critical = "critical"
|
|
46
|
-
}
|
|
47
|
-
export interface TestResults {
|
|
48
|
-
num: number;
|
|
49
|
-
folderName: string;
|
|
50
|
-
title: string;
|
|
51
|
-
fileName: string;
|
|
52
|
-
timeDuration: number;
|
|
53
|
-
duration: string;
|
|
54
|
-
description: string;
|
|
55
|
-
status: string;
|
|
56
|
-
pageUrl?: string;
|
|
57
|
-
browser: string;
|
|
58
|
-
tags: string[];
|
|
59
|
-
preConditions: string[];
|
|
60
|
-
steps: string[];
|
|
61
|
-
postConditions: string[];
|
|
62
|
-
statusIcon: string;
|
|
63
|
-
videoPath: string | null;
|
|
64
|
-
screenshotPaths: string[];
|
|
65
|
-
attachments: {
|
|
66
|
-
path: string;
|
|
67
|
-
name: string;
|
|
68
|
-
}[];
|
|
69
|
-
errors: string[];
|
|
70
|
-
a11yReportPath?: string;
|
|
71
|
-
executionReportPath?: string;
|
|
72
|
-
a11yErrors?: A11yError[];
|
|
73
|
-
a11yErrorCount?: number;
|
|
74
|
-
colors?: {
|
|
75
|
-
critical?: string;
|
|
76
|
-
serious?: string;
|
|
77
|
-
moderate?: string;
|
|
78
|
-
minor?: string;
|
|
79
|
-
};
|
|
80
|
-
}
|
|
81
|
-
export interface TestSummary {
|
|
82
|
-
date?: string;
|
|
83
|
-
duration: string;
|
|
84
|
-
status: string;
|
|
85
|
-
statusIcon: string;
|
|
86
|
-
total: number;
|
|
87
|
-
totalPassed: number;
|
|
88
|
-
totalFailed: number;
|
|
89
|
-
totalFlaky: number;
|
|
90
|
-
totalSkipped: number;
|
|
91
|
-
groupedResults: {
|
|
92
|
-
[key: string]: TestResults[];
|
|
93
|
-
};
|
|
94
|
-
wcagErrors: {
|
|
95
|
-
[key: string]: {
|
|
96
|
-
count: number;
|
|
97
|
-
severity: string;
|
|
98
|
-
helpUrl?: string;
|
|
99
|
-
description?: string;
|
|
100
|
-
};
|
|
101
|
-
};
|
|
102
|
-
totalA11yErrorCount: number;
|
|
103
|
-
browserSummaries?: {
|
|
104
|
-
[browser: string]: TestSummary;
|
|
105
|
-
};
|
|
106
|
-
}
|
|
107
|
-
export declare enum TestStatusIcon {
|
|
108
|
-
passed = "check_circle",
|
|
109
|
-
failed = "cancel",
|
|
110
|
-
skipped = "remove_circle",
|
|
111
|
-
timedOut = "alarm_off",
|
|
112
|
-
interrupted = "block"
|
|
113
|
-
}
|
|
1
|
+
export * from './Violation';
|
|
2
|
+
export * from './ReportData';
|
|
3
|
+
export * from './TestResults';
|
|
4
|
+
export * from './ScannerOptions';
|
|
5
|
+
export * from './DataSource';
|
|
6
|
+
export * from './ReporterOptions';
|
|
7
|
+
export * from './ResolvedColors';
|
|
8
|
+
export * from './Target';
|
|
9
|
+
export * from './Severity';
|
|
10
|
+
export * from './TestStatusIcon';
|
|
11
|
+
export * from './TestSummary';
|
|
12
|
+
export * from './ImagePath';
|
package/dist/models/index.js
CHANGED
|
@@ -1,18 +1,28 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
2
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
(
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
(
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
TestStatusIcon["skipped"] = "remove_circle";
|
|
16
|
-
TestStatusIcon["timedOut"] = "alarm_off";
|
|
17
|
-
TestStatusIcon["interrupted"] = "block";
|
|
18
|
-
})(TestStatusIcon || (exports.TestStatusIcon = TestStatusIcon = {}));
|
|
17
|
+
__exportStar(require("./Violation"), exports);
|
|
18
|
+
__exportStar(require("./ReportData"), exports);
|
|
19
|
+
__exportStar(require("./TestResults"), exports);
|
|
20
|
+
__exportStar(require("./ScannerOptions"), exports);
|
|
21
|
+
__exportStar(require("./DataSource"), exports);
|
|
22
|
+
__exportStar(require("./ReporterOptions"), exports);
|
|
23
|
+
__exportStar(require("./ResolvedColors"), exports);
|
|
24
|
+
__exportStar(require("./Target"), exports);
|
|
25
|
+
__exportStar(require("./Severity"), exports);
|
|
26
|
+
__exportStar(require("./TestStatusIcon"), exports);
|
|
27
|
+
__exportStar(require("./TestSummary"), exports);
|
|
28
|
+
__exportStar(require("./ImagePath"), exports);
|