Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 16 additions & 5 deletions x-pack/test/functional/apps/infra/metrics_anomalies.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,17 @@ import { HOSTS_VIEW_PATH, ML_JOB_IDS } from './constants';
export default ({ getPageObjects, getService }: FtrProviderContext) => {
const esArchiver = getService('esArchiver');
const kibanaServer = getService('kibanaServer');
const pageObjects = getPageObjects(['assetDetails', 'common', 'infraHome', 'infraHostsView']);
const pageObjects = getPageObjects([
'assetDetails',
'common',
'infraHome',
'infraHostsView',
'header',
]);
const infraSourceConfigurationForm = getService('infraSourceConfigurationForm');
const testSubjects = getService('testSubjects');
const browser = getService('browser');
const retry = getService('retry');

describe('Metrics UI Anomaly Flyout', function () {
before(async () => {
Expand Down Expand Up @@ -144,10 +151,14 @@ export default ({ getPageObjects, getService }: FtrProviderContext) => {
await pageObjects.infraHome.setAnomaliesDate('Apr 21, 2021 @ 00:00:00.000');
const hostName = await pageObjects.infraHome.getAnomalyHostName();
await pageObjects.infraHome.clickShowAffectedHostsButton();
const currentUrl = await browser.getCurrentUrl();
expect(currentUrl).to.contain(
encodeURIComponent(`query:(terms:(host.name:!(${hostName})))`)
);
await pageObjects.header.waitUntilLoadingHasFinished();

await retry.tryForTime(5000, async () => {
const currentUrl = await browser.getCurrentUrl();
expect(currentUrl).to.contain(
encodeURIComponent(`query:(terms:(host.name:!(${hostName})))`)
);
});
});
});
});
Expand Down