click measure and render before running axe

This commit is contained in:
Tessa Kelly 2022-12-21 16:33:46 -07:00
parent 3f4fa44ed9
commit a304446144

View File

@ -85,6 +85,20 @@ describe("UI tests", function () {
await callback(option);
};
const questionBoxProcessing = async (name, location) => {
await goTo(name, location);
const [button] = await page.$x("//button[contains(., 'Measure & render')]");
await button.click();
await percySnapshot(page, name);
const results = await new AxePuppeteer(page)
.disableRules(skippedRules[name] || [])
.analyze();
handleAxeResults(name, results);
};
const messageProcessing = async (name, location) => {
await goTo(name, location);
await percySnapshot(page, name);
@ -160,6 +174,7 @@ describe("UI tests", function () {
};
const specialProcessing = {
QuestionBox: questionBoxProcessing,
Message: messageProcessing,
Modal: modalProcessing,
Page: pageProcessing,