Skip to content

Commit ec2f025

Browse files
authored
[WIP] Fix flaky reporting test that is failing due to a CSS animation (#23907)
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 c722e41 commit ec2f025

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
@@ -134,7 +134,11 @@ export function ReportingPageProvider({ getService, getPageObjects }) {
134134
}
135135

136136
async checkUsePrintLayout() {
137-
await retry.try(() => testSubjects.click('usePrintLayout'));
137+
// The print layout checkbox slides in as part of an animation, and tests can
138+
// attempt to click it too quickly, leading to flaky tests. The 500ms wait allows
139+
// the animation to complete before we attempt a click.
140+
const menuAnimationDelay = 500;
141+
await retry.tryForTime(menuAnimationDelay, () => testSubjects.click('usePrintLayout'));
138142
}
139143

140144
async clickGenerateReportButton() {

0 commit comments

Comments
 (0)