Fix flaky test saved objects tagging#250891
Conversation
| @@ -502,7 +496,7 @@ export class TagManagementPageObject extends FtrService { | |||
| * Return true if the bulk action menu is opened, false otherwise. | |||
| */ | |||
| async isActionMenuOpened() { | |||
| return this.testSubjects.exists('actionBar-contextMenuPopover'); | |||
| return this.testSubjects.exists('actionBar-contextMenu'); | |||
| } | |||
There was a problem hiding this comment.
It is the ActionBar component
<EuiContextMenu
initialPanelId={0}
panels={contextMenuPanels}
data-test-subj="actionBar-contextMenu"
/>
Flaky Test Runner Stats🎉 All tests passed! - kibana-flaky-test-suite-runner#10620[✅] x-pack/platform/test/saved_object_tagging/functional/config.ts: 150/150 tests passed. |
ElenaStoeva
left a comment
There was a problem hiding this comment.
I'm not sure why @elastic/kibana-management owns the changed file given that we don't own saved objects 🤔 Giving a rubber-stamp approval, but it would be nice if someone familiar with saved objects takes a look as well.
It looks like the name of the file satisfies our pattern |
💚 Build Succeeded
Metrics [docs]
History
|
Summary
This PR fixes Failing test: X-Pack Saved Object Tagging Functional Tests.x-pack/platform/test/saved_object_tagging/functional/tests/feature_control·ts - saved objects tagging - functional tests feature controls base write privileges can bulk delete tags issue.
This issue existed in the past, but was closed in August.
But it continued failing around once a month or so.
The
isBulkActionPresentmethod had a subtle timing issue that caused rare flaky failures (~once a month in CI).The method was checking for the menu button after toggling the menu closed. This usually worked because the close animation was slow enough that the DOM element still existed when the check ran. But occasionally under CI load, the animation finished first and the button was gone → false negative → test failed.
There was also an old typo in the selector (actionBar-contextMenuPopover instead of actionBar-contextMenu) that was masked by the code flow always re-opening the menu anyway.