accessibility-checker
Advanced tools
Comparing version 3.1.48 to 3.1.49
@@ -1109,4 +1109,2 @@ "use strict"; | ||
ACReportManager.ignoreExtraBaselineViolations = function (actualReport, baselineReport) { | ||
var result = null; | ||
var existingRuleIDs = []; | ||
// Using for loop to make is sync code | ||
@@ -1118,42 +1116,43 @@ var ignoredCount = 0; | ||
// a report exists in the baseline for the iframe | ||
var legacyBaseline = false; | ||
if (currentBaselineReport && currentBaselineReport.length === 1) { | ||
var legacyBaseline = !!currentBaselineReport[0].issues; | ||
var _loop_2 = function (issue) { | ||
var currentRuleID = issue.ruleId; | ||
var currentLevel = issue.level; | ||
var currentXPATH = issue.path.dom; | ||
//check if the issue exists in baseline already | ||
var result_1 = legacyBaseline && currentBaselineReport[0].issues.filter(function (issue) { return issue.ruleId in __1.ruleIdToLegacyId && __1.ruleIdToLegacyId[issue.ruleId] === currentRuleID && issue.level === currentLevel && issue.xpath === currentXPATH; }) | ||
|| !legacyBaseline && currentBaselineReport.results.filter(function (issue) { return issue.ruleId === currentRuleID && issue.level === currentLevel && issue.dom.path === currentXPATH; }); | ||
if (result_1 && result_1.length !== 0) { | ||
//violation exists in baseline, add ignore:true | ||
issue.ignored = true; | ||
ignoredCount++; | ||
if (issue.level === "violation") { | ||
changedCounts.violation--; | ||
} | ||
if (issue.level === "potentialviolation") { | ||
changedCounts.potentialviolation--; | ||
} | ||
if (issue.level === "recommendation") { | ||
changedCounts.recommendation--; | ||
} | ||
if (issue.level === "potentialrecommendation") { | ||
changedCounts.potentialrecommendation--; | ||
} | ||
if (issue.level === "manual") { | ||
changedCounts.manual--; | ||
} | ||
if (issue.level === "pass") { | ||
changedCounts.pass--; | ||
} | ||
legacyBaseline = !!currentBaselineReport[0].issues; | ||
} | ||
var _loop_2 = function (issue) { | ||
var currentRuleID = issue.ruleId; | ||
var currentLevel = issue.level; | ||
var currentXPATH = issue.path.dom; | ||
//check if the issue exists in baseline already | ||
var result = legacyBaseline && currentBaselineReport[0].issues.filter(function (issue) { return issue.ruleId in __1.ruleIdToLegacyId && __1.ruleIdToLegacyId[issue.ruleId] === currentRuleID && issue.level === currentLevel && issue.xpath === currentXPATH; }) | ||
|| !legacyBaseline && currentBaselineReport.results.filter(function (issue) { return issue.ruleId === currentRuleID && issue.level === currentLevel && issue.path.dom === currentXPATH; }); | ||
if (result && result.length !== 0) { | ||
//violation exists in baseline, add ignore:true | ||
issue.ignored = true; | ||
ignoredCount++; | ||
if (issue.level === "violation") { | ||
changedCounts.violation--; | ||
} | ||
else { | ||
issue.ignored = false; | ||
if (issue.level === "potentialviolation") { | ||
changedCounts.potentialviolation--; | ||
} | ||
}; | ||
for (var _i = 0, currentActualReport_1 = currentActualReport; _i < currentActualReport_1.length; _i++) { | ||
var issue = currentActualReport_1[_i]; | ||
_loop_2(issue); | ||
if (issue.level === "recommendation") { | ||
changedCounts.recommendation--; | ||
} | ||
if (issue.level === "potentialrecommendation") { | ||
changedCounts.potentialrecommendation--; | ||
} | ||
if (issue.level === "manual") { | ||
changedCounts.manual--; | ||
} | ||
if (issue.level === "pass") { | ||
changedCounts.pass--; | ||
} | ||
} | ||
else { | ||
issue.ignored = false; | ||
} | ||
}; | ||
for (var _i = 0, currentActualReport_1 = currentActualReport; _i < currentActualReport_1.length; _i++) { | ||
var issue = currentActualReport_1[_i]; | ||
_loop_2(issue); | ||
} | ||
@@ -1160,0 +1159,0 @@ // adding ignore count to summary |
{ | ||
"name": "accessibility-checker", | ||
"version": "3.1.48", | ||
"version": "3.1.49", | ||
"description": "An automated testing tools for accessibility testing using Puppeteer, Selenium, or Zombie", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1760322
13234