accessibility-checker
Version:
An automated testing tools for accessibility testing using Puppeteer, Selenium, or Zombie
110 lines (106 loc) • 5.05 kB
TypeScript
/******************************************************************************
Copyright:: 2020- IBM, Inc
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*****************************************************************************/
import { IConfigUnsupported } from "../api/IChecker";
import { IScanSummary } from "./ReportUtil";
/**
* This function is responsible for constructing the aChecker Reporter which will be used to, report
* the scan results, such as writing the page results and the summary to a JSON file. This reporter function
* is registered with Karma server and triggered based on events that are triggered by the karma communication.
*
* @param {Object} baseReporterDecorator - the base karma reporter, which had the base functions which we override
* @param {Object} this.Config - All the Karma this.Configuration, we will extract what we need from this over
* all object, we need the entire object so that we detect any changes in the object
* as other plugins are loaded and the object is updated dynamically.
* @param {Object} logger - logger object which is used to log debug/error/info messages
* @param {Object} emitter - emitter object which allows to listem on any event that is triggered and allow to execute
* custom code, to handle the event that was triggered.
*
* @return - N/A
*
* @memberOf this
*/
export declare class ACReporterXLSX {
storedScans: any;
resultStr: string;
Config: IConfigUnsupported;
ruleArchiveSet: any;
toolID: any;
deploymentDate: string;
accessibilityGuidelines: string;
constructor(config: IConfigUnsupported, scanSummary: IScanSummary);
preprocessReport(report: any, filter: any, scroll: any): any;
report(report1: any): Promise<void>;
/**
* This function is responsible for performing any action when the entire karma run is done.
* Overrides onRunComplete function from baseReporterDecorator
*
* @override
*
* @memberOf this
*/
onRunComplete(): void;
/**
* This function is responsible for saving a single scans results to a file as JSON. On a side note
* this function will also extract the label which will be the file names where the results will be
* saved.
*
* @param {Object} this.Config - Karma this.Config object, used to extrat the outputFolder from the ACthis.Config.
* @param {Object} results - Provide the scan results for a single page that should be saved.
*
* @memberOf this
*/
savePageResults(report: any): void;
/**
* This function is responsible for converting a javascript object into JSON and then writing that to a
* json file.
*
* @param {String} fileName - Full path of file where the JSON object should be stored
* @param {String} content - The javascript object which should be converted and saved to file as JSON.
*
* @memberOf this
*/
writeObjectToFile(fileName: any, content: any): void;
/**
* This function is responsible for saving the summary object of the while scan to a summary file.
*
* @param {Object} summary - The summary object that needs to be written to the summary file.
*
* @memberOf this
*/
saveSummary(): void;
/**
* This function is responsible for indexing the results into global spaces based on label.
*
* @param {Object} results - Results object which will be provided to the user/wroten to the file.
* Refer to aChecker.buildReport function's return to figure out what the object
* will look like.
*
* @return - N/A - Global object is updated with the results
*
* @memberOf this
*/
addResultsToGlobal(results: any): void;
/**
* This function is responsible for updating/creating the global violation summary for the engine karma run
* for browser that it is running on. Will take the pageCount object which is part of the page object and
* add extract the values for each of the levels and add them to the global object. This will provide an overall
* summary of violations for all testcases run and all scans done.
*
* @param {Object} pageCount - Provide the page count object, in the following format:
*
* @return N/A - Global summary object is updated with the counts
*
* @memberOf this
*/
addToSummaryCount(pageCount: any): void;
}