Skip to content

Commit

Permalink
fix anomaly functional test (elastic#100504)
Browse files Browse the repository at this point in the history
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
  • Loading branch information
2 people authored and ecezalp committed May 26, 2021
1 parent 86ac35c commit 6815d3f
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions x-pack/test/functional/apps/infra/metrics_anomalies.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export default ({ getPageObjects, getService }: FtrProviderContext) => {
const infraSourceConfigurationForm = getService('infraSourceConfigurationForm');

// Failing: See https://github.com/elastic/kibana/issues/100445
describe.skip('Metrics UI Anomaly Flyout', function () {
describe('Metrics UI Anomaly Flyout', function () {
before(async () => {
await esArchiver.load('empty_kibana');
});
Expand Down Expand Up @@ -62,16 +62,20 @@ export default ({ getPageObjects, getService }: FtrProviderContext) => {
await esArchiver.unload('infra/metrics_anomalies');
});
it('renders the anomaly table with anomalies', async () => {
// default threshold should already be 50 but trying to prevent unknown flakiness by setting it
// https://github.com/elastic/kibana/issues/100445
await pageObjects.infraHome.goToSettings();
await pageObjects.infraHome.setAnomaliesThreshold('50');
await infraSourceConfigurationForm.saveConfiguration();
await pageObjects.infraHome.goToInventory();
await pageObjects.infraHome.openAnomalyFlyout();
await pageObjects.infraHome.goToAnomaliesTab();
await pageObjects.infraHome.clickHostsAnomaliesDropdown();
await pageObjects.infraHome.setAnomaliesDate('Apr 21, 2021 @ 00:00:00.000');
const hostAnomalies = await pageObjects.infraHome.findAnomalies();
// expect 2 anomalies with default Anomaly Severity Threshold setting (50)
expect(hostAnomalies.length).to.be(2);
await pageObjects.infraHome.clickK8sAnomaliesDropdown();
const k8sAnomalies = await pageObjects.infraHome.findAnomalies();
// expect 3 anomalies with default Anomaly Severity Threshold setting (50)
expect(k8sAnomalies.length).to.be(1);
await pageObjects.infraHome.closeFlyout();
});
Expand All @@ -93,6 +97,7 @@ export default ({ getPageObjects, getService }: FtrProviderContext) => {
await pageObjects.infraHome.openAnomalyFlyout();
await pageObjects.infraHome.goToAnomaliesTab();
await pageObjects.infraHome.clickHostsAnomaliesDropdown();
await pageObjects.infraHome.setAnomaliesDate('Apr 21, 2021 @ 00:00:00.000');
const hostAnomalies = await pageObjects.infraHome.findAnomalies();
expect(hostAnomalies.length).to.be(4);
await pageObjects.infraHome.clickK8sAnomaliesDropdown();
Expand Down

0 comments on commit 6815d3f

Please sign in to comment.