Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: add workaround for target-size test failure in Firefox 131 nightly #4557

Merged
merged 1 commit into from
Aug 7, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
61 changes: 33 additions & 28 deletions test/integration/rules/runner.js
Original file line number Diff line number Diff line change
Expand Up @@ -110,34 +110,39 @@
before(done => {
fixture.innerHTML = testObj.content;
waitForFrames(fixture, () => {
axe.run(
fixture,
{
/**
* The debug flag helps log errors in a fairly detailed fashion,
* when tests fail in webdriver
*/
debug: true,
performanceTimer: false,
runOnly: { type: 'rule', values: [ruleId] }
},
(err, r) => {
// assert that there are no errors - if error exists a stack trace is logged.
const errStack = err && err.stack ? err.stack : '';
assert.isNull(err, 'Error should be null. ' + errStack);
// assert that result is defined
assert.isDefined(r, 'Results are defined.');
// assert that result has certain keys
assert.hasAnyKeys(r, ['incomplete', 'violations', 'passes']);
// assert incomplete(s) does not have error
r.incomplete.forEach(incomplete => {
assert.isUndefined(incomplete.error);
});
// flatten results
results = flattenResult(r);
done();
}
);
// The setTimeout is a workaround for a Firefox bug. See:
// - https://github.com/dequelabs/axe-core/issues/4556
// - https://bugzilla.mozilla.org/show_bug.cgi?id=1912115
setTimeout(() => {
axe.run(
fixture,
{
/**
* The debug flag helps log errors in a fairly detailed fashion,
* when tests fail in webdriver
*/
debug: true,
performanceTimer: false,
runOnly: { type: 'rule', values: [ruleId] }
},
(err, r) => {
// assert that there are no errors - if error exists a stack trace is logged.
const errStack = err && err.stack ? err.stack : '';
assert.isNull(err, 'Error should be null. ' + errStack);
// assert that result is defined
assert.isDefined(r, 'Results are defined.');
// assert that result has certain keys
assert.hasAnyKeys(r, ['incomplete', 'violations', 'passes']);
// assert incomplete(s) does not have error
r.incomplete.forEach(incomplete => {
assert.isUndefined(incomplete.error);
});
// flatten results
results = flattenResult(r);
done();
}
);
}, 0);
});
});
runTest(testObj, 'passes');
Expand Down
Loading