accessibility-checker 3.1.49 → 3.1.51

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.
Files changed (94) hide show
  1. package/README.md +75 -67
  2. package/bin/achecker.js +14 -17
  3. package/bin/achecker.js.map +1 -1
  4. package/index.d.ts +6 -4
  5. package/index.js +9 -8
  6. package/index.js.map +1 -1
  7. package/lib/ACBrowserManager.d.ts +2 -2
  8. package/lib/ACBrowserManager.js +2 -3
  9. package/lib/ACBrowserManager.js.map +1 -1
  10. package/lib/ACEngineManager.d.ts +1 -12
  11. package/lib/ACEngineManager.js +72 -40
  12. package/lib/ACEngineManager.js.map +1 -1
  13. package/lib/ACHelper.js +126 -137
  14. package/lib/ACHelper.js.map +1 -1
  15. package/lib/api/IChecker.d.ts +3 -114
  16. package/lib/api/IChecker.js +1 -1
  17. package/lib/api/IChecker.js.map +1 -1
  18. package/lib/common/api-ext/Fetch.d.ts +16 -0
  19. package/lib/common/api-ext/Fetch.js +83 -0
  20. package/lib/common/api-ext/Fetch.js.map +1 -0
  21. package/lib/common/api-ext/IAbstractAPI.d.ts +34 -0
  22. package/lib/common/api-ext/IAbstractAPI.js +18 -0
  23. package/lib/common/api-ext/IAbstractAPI.js.map +1 -0
  24. package/lib/common/config/ACConfigManager.d.ts +7 -0
  25. package/lib/{ACConfigManager.js → common/config/ACConfigManager.js} +28 -19
  26. package/lib/common/config/ACConfigManager.js.map +1 -0
  27. package/lib/{ACConstants.d.ts → common/config/ACConstants.d.ts} +2 -2
  28. package/lib/{ACConstants.js → common/config/ACConstants.js} +7 -5
  29. package/lib/common/config/ACConstants.js.map +1 -0
  30. package/lib/common/config/IArchive.d.ts +37 -0
  31. package/lib/{reporters/multiScanReportUtil.d.ts → common/config/IArchive.js} +4 -5
  32. package/lib/common/config/IArchive.js.map +1 -0
  33. package/lib/common/config/IConfig.d.ts +146 -0
  34. package/lib/common/config/IConfig.js +36 -0
  35. package/lib/common/config/IConfig.js.map +1 -0
  36. package/lib/common/report/ACReporterCSV.d.ts +27 -0
  37. package/lib/common/report/ACReporterCSV.js +105 -0
  38. package/lib/common/report/ACReporterCSV.js.map +1 -0
  39. package/lib/common/report/ACReporterHTML.d.ts +26 -0
  40. package/lib/common/report/ACReporterHTML.js +94 -0
  41. package/lib/common/report/ACReporterHTML.js.map +1 -0
  42. package/lib/common/report/ACReporterJSON.d.ts +46 -0
  43. package/lib/common/report/ACReporterJSON.js +140 -0
  44. package/lib/common/report/ACReporterJSON.js.map +1 -0
  45. package/lib/{log/ACMetricsLogger.d.ts → common/report/ACReporterMetrics.d.ts} +11 -6
  46. package/lib/{log/ACMetricsLogger.js → common/report/ACReporterMetrics.js} +85 -70
  47. package/lib/common/report/ACReporterMetrics.js.map +1 -0
  48. package/lib/common/report/ACReporterXLSX.d.ts +37 -0
  49. package/lib/common/report/ACReporterXLSX.js +1004 -0
  50. package/lib/common/report/ACReporterXLSX.js.map +1 -0
  51. package/lib/common/report/BaselineManager.d.ts +169 -0
  52. package/lib/common/report/BaselineManager.js +355 -0
  53. package/lib/common/report/BaselineManager.js.map +1 -0
  54. package/lib/common/report/ReporterManager.d.ts +79 -0
  55. package/lib/common/report/ReporterManager.js +552 -0
  56. package/lib/common/report/ReporterManager.js.map +1 -0
  57. package/lib/common/report/genReport.js.map +1 -0
  58. package/package.json +1 -1
  59. package/lib/ACConfigManager.d.ts +0 -7
  60. package/lib/ACConfigManager.js.map +0 -1
  61. package/lib/ACConstants.js.map +0 -1
  62. package/lib/ACReportManager.d.ts +0 -590
  63. package/lib/ACReportManager.js +0 -1201
  64. package/lib/ACReportManager.js.map +0 -1
  65. package/lib/api/IEngine.d.ts +0 -129
  66. package/lib/api/IEngine.js +0 -110
  67. package/lib/api/IEngine.js.map +0 -1
  68. package/lib/log/ACMetricsLogger.js.map +0 -1
  69. package/lib/reporters/ACReporterCSV.d.ts +0 -103
  70. package/lib/reporters/ACReporterCSV.js +0 -193
  71. package/lib/reporters/ACReporterCSV.js.map +0 -1
  72. package/lib/reporters/ACReporterHTML.d.ts +0 -114
  73. package/lib/reporters/ACReporterHTML.js +0 -360
  74. package/lib/reporters/ACReporterHTML.js.map +0 -1
  75. package/lib/reporters/ACReporterJSON.d.ts +0 -114
  76. package/lib/reporters/ACReporterJSON.js +0 -277
  77. package/lib/reporters/ACReporterJSON.js.map +0 -1
  78. package/lib/reporters/ACReporterXLSX.d.ts +0 -109
  79. package/lib/reporters/ACReporterXLSX.js +0 -405
  80. package/lib/reporters/ACReporterXLSX.js.map +0 -1
  81. package/lib/reporters/ReportUtil.d.ts +0 -33
  82. package/lib/reporters/ReportUtil.js +0 -65
  83. package/lib/reporters/ReportUtil.js.map +0 -1
  84. package/lib/reporters/genReport.js.map +0 -1
  85. package/lib/reporters/multiScanData.d.ts +0 -27
  86. package/lib/reporters/multiScanData.js +0 -190
  87. package/lib/reporters/multiScanData.js.map +0 -1
  88. package/lib/reporters/multiScanReport.d.ts +0 -25
  89. package/lib/reporters/multiScanReport.js +0 -1729
  90. package/lib/reporters/multiScanReport.js.map +0 -1
  91. package/lib/reporters/multiScanReportUtil.js +0 -49
  92. package/lib/reporters/multiScanReportUtil.js.map +0 -1
  93. /package/lib/{reporters → common/report}/genReport.d.ts +0 -0
  94. /package/lib/{reporters → common/report}/genReport.js +0 -0
@@ -1,277 +0,0 @@
1
- "use strict";
2
- /******************************************************************************
3
- Copyright:: 2020- IBM, Inc
4
-
5
- Licensed under the Apache License, Version 2.0 (the "License");
6
- you may not use this file except in compliance with the License.
7
- You may obtain a copy of the License at
8
-
9
- http://www.apache.org/licenses/LICENSE-2.0
10
-
11
- Unless required by applicable law or agreed to in writing, software
12
- distributed under the License is distributed on an "AS IS" BASIS,
13
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
- See the License for the specific language governing permissions and
15
- limitations under the License.
16
- *****************************************************************************/
17
- Object.defineProperty(exports, "__esModule", { value: true });
18
- exports.ACReporterJSON = void 0;
19
- // Load all the modules that are needed
20
- var pathLib = require("path");
21
- var fs = require("fs");
22
- /**
23
- * This function is responsible for constructing the aChecker Reporter which will be used to, report
24
- * the scan results, such as writing the page results and the summary to a JSON file. This reporter function
25
- * is registered with Karma server and triggered based on events that are triggered by the karma communication.
26
- *
27
- * @param {Object} baseReporterDecorator - the base karma reporter, which had the base functions which we override
28
- * @param {Object} config - All the Karma configuration, we will extract what we need from this over
29
- * all object, we need the entire object so that we detect any changes in the object
30
- * as other plugins are loaded and the object is updated dynamically.
31
- * @param {Object} logger - logger object which is used to log debug/error/info messages
32
- * @param {Object} emitter - emitter object which allows to listem on any event that is triggered and allow to execute
33
- * custom code, to handle the event that was triggered.
34
- *
35
- * @return - N/A
36
- *
37
- * @memberOf this
38
- */
39
- var ACReporterJSON = /** @class */ (function () {
40
- function ACReporterJSON(Config, scanSummary) {
41
- this.Config = Config;
42
- this.scanSummary = JSON.parse(JSON.stringify(scanSummary));
43
- this.Config.DEBUG && console.log("START ACReporter Constructor");
44
- var myThis = this;
45
- if (typeof (after) !== "undefined") {
46
- after(function (done) {
47
- myThis.onRunComplete();
48
- done && done();
49
- });
50
- }
51
- else {
52
- process.on('beforeExit', function () {
53
- myThis.onRunComplete();
54
- });
55
- }
56
- this.Config.DEBUG && console.log("END ACReporter Constructor");
57
- }
58
- // This emitter function is responsible for calling this function when the info event is detected
59
- ACReporterJSON.prototype.report = function (info) {
60
- this.Config.DEBUG && console.log("START 'info' emitter function");
61
- // Save the results of a single scan to a JSON file based on the label provided
62
- this.savePageResults(info);
63
- // Update the overall summary object count object to include the new scan that was performed
64
- this.addToSummaryCount(info.summary.counts);
65
- // Save the summary of this scan into global space of this reporter, to be logged
66
- // once the whole scan is done.
67
- this.addResultsToGlobal(info);
68
- this.Config.DEBUG && console.log("END 'info' emitter function");
69
- };
70
- ;
71
- /**
72
- * This function is responsible for performing any action when the entire karma run is done.
73
- * Overrides onRunComplete function from baseReporterDecorator
74
- *
75
- * @override
76
- *
77
- * @memberOf this
78
- */
79
- ACReporterJSON.prototype.onRunComplete = function () {
80
- this.Config.DEBUG && console.log("START 'ACReporterJSON:onRunComplete' function");
81
- // Add End time when the whole karma run is done
82
- // End time will be in milliseconds elapsed since 1 January 1970 00:00:00 UTC up until now.
83
- this.scanSummary.endReport = Date.now();
84
- // Save summary object to a JSON file.
85
- this.saveSummary(this.scanSummary);
86
- this.Config.DEBUG && console.log("END 'ACReporterJSON:onRunComplete' function");
87
- };
88
- ;
89
- /**
90
- * This function is responsible for saving a single scans results to a file as JSON. On a side note
91
- * this function will also extract the label which will be the file names where the results will be
92
- * saved.
93
- *
94
- * @param {Object} config - Karma config object, used to extrat the outputFolder from the ACConfig.
95
- * @param {Object} results - Provide the scan results for a single page that should be saved.
96
- *
97
- * @memberOf this
98
- */
99
- ACReporterJSON.prototype.savePageResults = function (results) {
100
- this.Config.DEBUG && console.log("START 'savePageResults' function");
101
- // Extract the outputFolder from the ACConfig (this is the user config that they provid)
102
- var resultDir = this.Config.outputFolder;
103
- this.Config.DEBUG && console.log("Results are going to be stored under results directory: \"" + resultDir + "\"");
104
- // Build the full file name based on the label provide in the results and also the results dir specified in the
105
- // configuration.
106
- var resultsFileName = pathLib.join(resultDir, results.label.replace(/[:?&=]/g, "_") + '.json');
107
- /**************************************************** DEBUG INFORMATION ***************************************************************
108
- // Debug example which has label which has unix "/" in them.
109
- let resultsFileName = pathLib.join(resultDir, "dependencies/tools-rules-html/v2/a11y/test/g471/Table-layoutMultiple.html.json");
110
-
111
- // Debug example which has a label which has Windows "\" in them.
112
- let resultsFileName = pathLib.join(resultDir, "dependencies\\tools-rules-html\\v2\\a11y\\test\\g471\\Table-layoutMultiple.html.json");
113
- ***************************************************************************************************************************************/
114
- // Write the results object as JSON to a file.
115
- this.writeObjectToFileAsJSON(resultsFileName, results);
116
- this.Config.DEBUG && console.log("END 'savePageResults' function");
117
- };
118
- /**
119
- * This function is responsible for converting a javascript object into JSON and then writing that to a
120
- * json file.
121
- *
122
- * @param {String} fileName - Full path of file where the JSON object should be stored
123
- * @param {String} content - The javascript object which should be converted and saved to file as JSON.
124
- *
125
- * @memberOf this
126
- */
127
- ACReporterJSON.prototype.writeObjectToFileAsJSON = function (fileName, content) {
128
- this.Config.DEBUG && console.log("START 'writeObjectToFileAsJSON' function");
129
- // Extract the parent directory of the file name that is provided
130
- var parentDir = pathLib.dirname(fileName);
131
- this.Config.DEBUG && console.log("Parent Directoy: \"" + parentDir + "\"");
132
- // In the case that the parent directoy does not exist, create the directories
133
- if (!fs.existsSync(parentDir)) {
134
- // Create the parent directory recerseivly if it does not exist.
135
- fs.mkdirSync(parentDir, { recursive: true });
136
- }
137
- this.Config.DEBUG && console.log("Object will be written to file: \"" + fileName + "\"");
138
- // Convert the Object into JSON string and write that to the file
139
- // Make sure to use utf-8 encoding to avoid an issues specify to OS.
140
- // In terms of the JSON string that is constructed use 4 spaces to format the JSON object, before
141
- // writing it to the file.
142
- fs.writeFileSync(fileName, JSON.stringify(content, null, ' '), { encoding: 'utf-8' });
143
- this.Config.DEBUG && console.log("END 'writeObjectToFileAsJSON' function");
144
- };
145
- /**
146
- * This function is responsible for saving the summary object of the while scan to a summary file.
147
- *
148
- * @param {Object} summary - The summary object that needs to be written to the summary file.
149
- *
150
- * @memberOf this
151
- */
152
- ACReporterJSON.prototype.saveSummary = function (summary) {
153
- if (this.Config.outputFormat.indexOf("json") === -1) {
154
- return;
155
- }
156
- this.Config.DEBUG && console.log("START 'saveSummary' function");
157
- // Fetch the start time of the report from the summary object
158
- var startReportTime = summary.startReport;
159
- // Extract the outputFolder from the ACConfig (this is the user config that they provid)
160
- var resultDir = this.Config.outputFolder;
161
- this.Config.DEBUG && console.log("Converting: " + startReportTime);
162
- // Now we need to take the from epoch format date and convert it to readable data
163
- // Construct a new Data object with the start report time
164
- var formattedData = new Date(startReportTime);
165
- // Extract all the date fields which are needed to construct the filename
166
- var year = this.datePadding(formattedData.getUTCFullYear());
167
- var month = this.datePadding(formattedData.getUTCMonth() + 1); // UTC Month is provid in a range of A Number, from 0-11, representing the month
168
- var date = this.datePadding(formattedData.getUTCDate());
169
- var hour = this.datePadding(formattedData.getHours());
170
- var minute = this.datePadding(formattedData.getMinutes());
171
- var seconds = this.datePadding(formattedData.getUTCSeconds());
172
- this.Config.DEBUG && console.log("Year: " + year);
173
- this.Config.DEBUG && console.log("Month: " + month);
174
- this.Config.DEBUG && console.log("Date: " + date);
175
- this.Config.DEBUG && console.log("Hour: " + hour);
176
- this.Config.DEBUG && console.log("Minute: " + minute);
177
- this.Config.DEBUG && console.log("Seconds: " + seconds);
178
- // Build the summary file name based on the following format: summary_2016-06-20-13-26-45GMT.json
179
- // summary_<year>-<month>-<date>-<hour>-<minute>-<seconds>GMT.json
180
- var filename = "summary_" + year + "-" + month + "-" + date + "-" + hour + "-" + minute + "-" + seconds + "GMT.json";
181
- // Add the results dir to the filename so that all the summary files can be saved under the output folder
182
- filename = pathLib.join(resultDir, filename);
183
- this.Config.DEBUG && console.log("Filename Constructed: " + filename);
184
- // Write the summary object as json to the summary file.
185
- this.writeObjectToFileAsJSON(filename, summary);
186
- this.Config.DEBUG && console.log("END 'saveSummary' function");
187
- };
188
- /**
189
- * This function is responsible for checking if a number needs a leading 0, and if it is needed
190
- * add the leading 0 and return that as the new number.
191
- *
192
- * @param {int} number - Provide a number to check if a leading 0 needs to be added or not.
193
- *
194
- * @return {String} number - Return the number with the leading 0 added back
195
- *
196
- * @memberOf this
197
- */
198
- ACReporterJSON.prototype.datePadding = function (number) {
199
- this.Config.DEBUG && console.log("START 'datePadding' function");
200
- // In the case that the number is less then 10 we need to add the leading '0' to the number.
201
- number = number < 10 ? '0' + number : number;
202
- this.Config.DEBUG && console.log("END 'datePadding' function");
203
- return number;
204
- };
205
- /**
206
- * This function is responsible for indexing the results into global spaces based on label.
207
- *
208
- * @param {Object} results - Results object which will be provided to the user/wroten to the file.
209
- * Refer to aChecker.buildReport function's return to figure out what the object
210
- * will look like.
211
- *
212
- * @return - N/A - Global object is updated with the results
213
- *
214
- * @memberOf this
215
- */
216
- ACReporterJSON.prototype.addResultsToGlobal = function (results) {
217
- this.Config.DEBUG && console.log("START 'addResultsToGlobal' function");
218
- // Build the single page summary object to follow the following format:
219
- // "label": "dependencies/tools-rules-html/v2/a11y/test/g471/Table-DataNoSummaryARIA.html",
220
- // "counts": {
221
- // "violation": 1,
222
- // "potentialviolation": 0,
223
- // "recommendation": 0,
224
- // "potentialrecommendation": 0,
225
- // "manual": 0
226
- // }
227
- var pageSummaryObject = {
228
- label: results.label,
229
- counts: results.summary.counts
230
- };
231
- this.Config.DEBUG && console.log("Adding following object to scanSummary.pageScanSummary: ");
232
- this.Config.DEBUG && console.log(pageSummaryObject);
233
- // Add the summary count for this scan to the pageScanSummary object which is in the global space
234
- // Index this by the label.
235
- this.scanSummary.pageScanSummary.push(pageSummaryObject);
236
- this.Config.DEBUG && console.log("END 'addResultsToGlobal' function");
237
- };
238
- /**
239
- * This function is responsible for updating/creating the global violation summary for the engine karma run
240
- * for browser that it is running on. Will take the pageCount object which is part of the page object and
241
- * add extract the values for each of the levels and add them to the global object. This will provide an overall
242
- * summary of violations for all testcases run and all scans done.
243
- *
244
- * @param {Object} pageCount - Provide the page count object, in the following format:
245
- *
246
- * @return N/A - Global summary object is updated with the counts
247
- *
248
- * @memberOf this
249
- */
250
- ACReporterJSON.prototype.addToSummaryCount = function (pageCount) {
251
- // Variable Decleration
252
- var ACScanSummary = this.scanSummary.counts || {};
253
- var addedToSummary = false;
254
- // In the case ACScanSummary is empty, simply assign pageCount to ACScanSummary
255
- if (Object.keys(ACScanSummary).length === 0) {
256
- // Set pageCount as the summary count
257
- ACScanSummary = pageCount;
258
- addedToSummary = true;
259
- }
260
- // In the case that this is not first scan, handle adding up the summary
261
- if (!addedToSummary) {
262
- // Go through the pageCount object and for each of the levels, extract the value
263
- // and add it to the aChecker violation summary object.
264
- // This will keep track of an overall summary of the violations for all testscases, that
265
- // were run for a single karma run.
266
- for (var level in pageCount) {
267
- ACScanSummary[level] += pageCount[level];
268
- }
269
- }
270
- // Assign the new violation summary back to the global object
271
- this.scanSummary.counts = ACScanSummary;
272
- };
273
- return ACReporterJSON;
274
- }());
275
- exports.ACReporterJSON = ACReporterJSON;
276
- ;
277
- //# sourceMappingURL=ACReporterJSON.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ACReporterJSON.js","sourceRoot":"","sources":["../../../src-ts/lib/reporters/ACReporterJSON.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;gFAcgF;;;AAEhF,uCAAuC;AACvC,8BAAgC;AAChC,uBAAyB;AAMzB;;;;;;;;;;;;;;;;GAgBG;AACH;IAGI,wBAAY,MAA0B,EAAE,WAAyB;QAC7D,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,WAAW,CAAC,CAAC,CAAC;QAC3D,IAAI,CAAC,MAAM,CAAC,KAAK,IAAI,OAAO,CAAC,GAAG,CAAC,8BAA8B,CAAC,CAAC;QAEjE,IAAI,MAAM,GAAG,IAAI,CAAC;QAClB,IAAI,OAAM,CAAC,KAAK,CAAC,KAAK,WAAW,EAAE;YAC/B,KAAK,CAAC,UAAS,IAAI;gBACf,MAAM,CAAC,aAAa,EAAE,CAAC;gBACvB,IAAI,IAAI,IAAI,EAAE,CAAC;YACnB,CAAC,CAAC,CAAC;SACN;aAAM;YACH,OAAO,CAAC,EAAE,CAAC,YAAY,EAAE;gBACrB,MAAM,CAAC,aAAa,EAAE,CAAC;YAC3B,CAAC,CAAC,CAAC;SACN;QACD,IAAI,CAAC,MAAM,CAAC,KAAK,IAAI,OAAO,CAAC,GAAG,CAAC,4BAA4B,CAAC,CAAC;IACnE,CAAC;IAED,iGAAiG;IACjG,+BAAM,GAAN,UAAO,IAAI;QACP,IAAI,CAAC,MAAM,CAAC,KAAK,IAAI,OAAO,CAAC,GAAG,CAAC,+BAA+B,CAAC,CAAC;QAElE,+EAA+E;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AC;YAE1B,cAAc,GAAG,IAAI,CAAC;SACzB;QAED,wEAAwE;QACxE,IAAI,CAAC,cAAc,EAAE;YACjB,gFAAgF;YAChF,uDAAuD;YACvD,wFAAwF;YACxF,mCAAmC;YACnC,KAAK,IAAI,KAAK,IAAI,SAAS,EAAE;gBACzB,aAAa,CAAC,KAAK,CAAC,IAAI,SAAS,CAAC,KAAK,CAAC,CAAC;aAC5C;SACJ;QAED,6DAA6D;QAC7D,IAAI,CAAC,WAAW,CAAC,MAAM,GAAG,aAAa,CAAC;IAC5C,CAAC;IAEL,qBAAC;AAAD,CAAC,AA/RD,IA+RC;AA/RY,wCAAc;AA+R1B,CAAC"}
@@ -1,109 +0,0 @@
1
- /******************************************************************************
2
- Copyright:: 2020- IBM, Inc
3
-
4
- Licensed under the Apache License, Version 2.0 (the "License");
5
- you may not use this file except in compliance with the License.
6
- You may obtain a copy of the License at
7
-
8
- http://www.apache.org/licenses/LICENSE-2.0
9
-
10
- Unless required by applicable law or agreed to in writing, software
11
- distributed under the License is distributed on an "AS IS" BASIS,
12
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- See the License for the specific language governing permissions and
14
- limitations under the License.
15
- *****************************************************************************/
16
- import { IConfigUnsupported } from "../api/IChecker";
17
- import { IScanSummary } from "./ReportUtil";
18
- /**
19
- * This function is responsible for constructing the aChecker Reporter which will be used to, report
20
- * the scan results, such as writing the page results and the summary to a JSON file. This reporter function
21
- * is registered with Karma server and triggered based on events that are triggered by the karma communication.
22
- *
23
- * @param {Object} baseReporterDecorator - the base karma reporter, which had the base functions which we override
24
- * @param {Object} this.Config - All the Karma this.Configuration, we will extract what we need from this over
25
- * all object, we need the entire object so that we detect any changes in the object
26
- * as other plugins are loaded and the object is updated dynamically.
27
- * @param {Object} logger - logger object which is used to log debug/error/info messages
28
- * @param {Object} emitter - emitter object which allows to listem on any event that is triggered and allow to execute
29
- * custom code, to handle the event that was triggered.
30
- *
31
- * @return - N/A
32
- *
33
- * @memberOf this
34
- */
35
- export declare class ACReporterXLSX {
36
- storedScans: any;
37
- resultStr: string;
38
- Config: IConfigUnsupported;
39
- ruleArchiveSet: any;
40
- toolID: any;
41
- deploymentDate: string;
42
- accessibilityGuidelines: string;
43
- constructor(config: IConfigUnsupported, scanSummary: IScanSummary);
44
- preprocessReport(report: any, filter: any, scroll: any): any;
45
- report(report1: any): Promise<void>;
46
- /**
47
- * This function is responsible for performing any action when the entire karma run is done.
48
- * Overrides onRunComplete function from baseReporterDecorator
49
- *
50
- * @override
51
- *
52
- * @memberOf this
53
- */
54
- onRunComplete(): void;
55
- /**
56
- * This function is responsible for saving a single scans results to a file as JSON. On a side note
57
- * this function will also extract the label which will be the file names where the results will be
58
- * saved.
59
- *
60
- * @param {Object} this.Config - Karma this.Config object, used to extrat the outputFolder from the ACthis.Config.
61
- * @param {Object} results - Provide the scan results for a single page that should be saved.
62
- *
63
- * @memberOf this
64
- */
65
- savePageResults(report: any): void;
66
- /**
67
- * This function is responsible for converting a javascript object into JSON and then writing that to a
68
- * json file.
69
- *
70
- * @param {String} fileName - Full path of file where the JSON object should be stored
71
- * @param {String} content - The javascript object which should be converted and saved to file as JSON.
72
- *
73
- * @memberOf this
74
- */
75
- writeObjectToFile(fileName: any, content: any): void;
76
- /**
77
- * This function is responsible for saving the summary object of the while scan to a summary file.
78
- *
79
- * @param {Object} summary - The summary object that needs to be written to the summary file.
80
- *
81
- * @memberOf this
82
- */
83
- saveSummary(): void;
84
- /**
85
- * This function is responsible for indexing the results into global spaces based on label.
86
- *
87
- * @param {Object} results - Results object which will be provided to the user/wroten to the file.
88
- * Refer to aChecker.buildReport function's return to figure out what the object
89
- * will look like.
90
- *
91
- * @return - N/A - Global object is updated with the results
92
- *
93
- * @memberOf this
94
- */
95
- addResultsToGlobal(results: any): void;
96
- /**
97
- * This function is responsible for updating/creating the global violation summary for the engine karma run
98
- * for browser that it is running on. Will take the pageCount object which is part of the page object and
99
- * add extract the values for each of the levels and add them to the global object. This will provide an overall
100
- * summary of violations for all testcases run and all scans done.
101
- *
102
- * @param {Object} pageCount - Provide the page count object, in the following format:
103
- *
104
- * @return N/A - Global summary object is updated with the counts
105
- *
106
- * @memberOf this
107
- */
108
- addToSummaryCount(pageCount: any): void;
109
- }