Skip to content

Commit b138d89

Browse files
chrisdaviestsullivan
authored andcommitted
[WIP] Fix flaky reporting test that is failing due to a CSS animation (#23907) (#23942)
Add a wait for the reporting flyout menu to animate. This workaround should be removed if we figure out how to disable animations in our test suite.
1 parent fb89ffb commit b138d89

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

x-pack/test/functional/page_objects/reporting_page.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,11 @@ export function ReportingPageProvider({ getService, getPageObjects }) {
139139
}
140140

141141
async checkUsePrintLayout() {
142-
await retry.try(() => testSubjects.click('usePrintLayout'));
142+
// The print layout checkbox slides in as part of an animation, and tests can
143+
// attempt to click it too quickly, leading to flaky tests. The 500ms wait allows
144+
// the animation to complete before we attempt a click.
145+
const menuAnimationDelay = 500;
146+
await retry.tryForTime(menuAnimationDelay, () => testSubjects.click('usePrintLayout'));
143147
}
144148

145149
async clickGenerateReportButton() {

0 commit comments

Comments
 (0)