Skip to content

Commit

Permalink
Merge pull request #575 from IBMa/custom-rs-bug
Browse files Browse the repository at this point in the history
Bug with custom rulesets
  • Loading branch information
tombrunet authored Dec 14, 2021
2 parents c5375ec + c8ea3f7 commit dac6cd2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions accessibility-checker/src-ts/lib/ACHelper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ let policies = ${JSON.stringify(Config.policies)};
let checker = new window.ace.Checker();
let customRulesets = ${JSON.stringify(ACEngineManager.customRulesets)};
customRulesets.map((rs) => checker.addRuleset(rs));
customRulesets.forEach((rs) => checker.addRuleset(rs));
setTimeout(function() {
checker.check(document, policies).then(function(report) {
for (const result of report.results) {
Expand All @@ -256,7 +256,7 @@ cb(e);
const getPolicies = "return new window.ace.Checker().rulesetIds;";
if (curPol != null && !checkPolicy) {
checkPolicy = true;
const valPolicies = ACEngineManager.customRulesets.concat(await browser.executeScript(getPolicies));
const valPolicies = ACEngineManager.customRulesets.map(rs => rs.id).concat(await browser.executeScript(getPolicies));
areValidPolicy(valPolicies, curPol);
}

Expand Down Expand Up @@ -331,7 +331,7 @@ async function getComplianceHelperPuppeteer(label, parsed, curPol) : Promise<ICh
}, Config.policies, ACEngineManager.customRulesets);
report = ACReportManager.setLevels(report);
if (curPol != null && !checkPolicy) {
const valPolicies = ACEngineManager.customRulesets.concat(await page.evaluate("new window.ace.Checker().rulesetIds"));
const valPolicies = ACEngineManager.customRulesets.map(rs => rs.id).concat(await page.evaluate("new window.ace.Checker().rulesetIds"));
checkPolicy = true;
areValidPolicy(valPolicies, curPol);
}
Expand Down

0 comments on commit dac6cd2

Please sign in to comment.