Skip to content

Commit

Permalink
[Infra][Flaky Test Fix] Failing test: Single Host Flyout Tabs Metadat…
Browse files Browse the repository at this point in the history
…a Tab should render metadata tab, add and remove filter (elastic#191745)
  • Loading branch information
jennypavlova authored Aug 30, 2024
1 parent 0a99955 commit fbbed11
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ export const AddMetadataFilterButton = ({ item }: AddMetadataFilterButtonProps)
}

return (
<span>
<span data-test-subj={`infraAssetDetailsMetadataField.${item.name}`}>
<EuiToolTip
content={i18n.translate('xpack.infra.metadataEmbeddable.setFilterByValueTooltip', {
defaultMessage: 'Filter by value',
Expand Down
4 changes: 3 additions & 1 deletion x-pack/test/functional/page_objects/asset_details.ts
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,9 @@ export function AssetDetailsProvider({ getService }: FtrProviderContext) {
},

async clickAddMetadataFilter() {
return testSubjects.click('infraAssetDetailsMetadataAddFilterButton');
// Make this selector tied to the field to avoid flakiness
// https://github.com/elastic/kibana/issues/191565
return testSubjects.click('infraAssetDetailsMetadataField.host.name');
},

async clickRemoveMetadataFilter() {
Expand Down

0 comments on commit fbbed11

Please sign in to comment.