diff --git a/x-pack/test/functional/page_objects/infra_hosts_view.ts b/x-pack/test/functional/page_objects/infra_hosts_view.ts index 1cd0cf15996ec..152440d349067 100644 --- a/x-pack/test/functional/page_objects/infra_hosts_view.ts +++ b/x-pack/test/functional/page_objects/infra_hosts_view.ts @@ -4,7 +4,12 @@ * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ -import { AlertStatus, ALERT_STATUS_ACTIVE, ALERT_STATUS_RECOVERED } from '@kbn/rule-data-utils'; +import { + ALERT_STATUS_ACTIVE, + ALERT_STATUS_RECOVERED, + ALERT_STATUS_UNTRACKED, + AlertStatus, +} from '@kbn/rule-data-utils'; import { WebElementWrapper } from '../../../../test/functional/services/lib/web_element_wrapper'; import { FtrProviderContext } from '../ftr_provider_context'; @@ -200,8 +205,10 @@ export function InfraHostsViewProvider({ getService }: FtrProviderContext) { await alertsTab.click(); }, - setAlertStatusFilter(alertStatus?: AlertStatus) { - const buttons = { + setAlertStatusFilter(alertStatus?: Exclude) { + const buttons: { + [key in Exclude | 'all']: string; + } = { [ALERT_STATUS_ACTIVE]: 'hostsView-alert-status-filter-active-button', [ALERT_STATUS_RECOVERED]: 'hostsView-alert-status-filter-recovered-button', all: 'hostsView-alert-status-filter-show-all-button',