From 43e319646000b22329620d3094ad7fa37de76b0d Mon Sep 17 00:00:00 2001 From: Rashmi Kulkarni Date: Wed, 3 Feb 2021 12:45:13 -0800 Subject: [PATCH] unskip maps functional tests --- x-pack/test/functional/apps/maps/layer_errors.js | 8 ++++++-- x-pack/test/functional/apps/maps/sample_data.js | 10 ++-------- 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/x-pack/test/functional/apps/maps/layer_errors.js b/x-pack/test/functional/apps/maps/layer_errors.js index d69955c26b9ed7..588fa202cf0058 100644 --- a/x-pack/test/functional/apps/maps/layer_errors.js +++ b/x-pack/test/functional/apps/maps/layer_errors.js @@ -70,7 +70,9 @@ export default function ({ getPageObjects }) { it('should diplay error message in layer panel', async () => { const errorMsg = await PageObjects.maps.getLayerErrorText(LAYER_NAME); - expect(errorMsg).to.contain(MISSING_EMS_ID); + expect(errorMsg).to.equal( + `Unable to find EMS vector shapes for id: ${MISSING_EMS_ID}. Kibana is unable to access Elastic Maps Service. Contact your systemadministrator.` + ); }); it('should allow deletion of layer', async () => { @@ -86,7 +88,9 @@ export default function ({ getPageObjects }) { it('should diplay error message in layer panel', async () => { const errorMsg = await PageObjects.maps.getLayerErrorText(LAYER_NAME); - expect(errorMsg).to.contain(MISSING_EMS_ID); + expect(errorMsg).to.equal( + `Unable to find EMS tile configuration for id: ${MISSING_EMS_ID}. Kibana is unable to access Elastic Maps Service. Contact your systemadministrator.` + ); }); it('should allow deletion of layer', async () => { diff --git a/x-pack/test/functional/apps/maps/sample_data.js b/x-pack/test/functional/apps/maps/sample_data.js index 692e4da30e5915..6a5c0368e50476 100644 --- a/x-pack/test/functional/apps/maps/sample_data.js +++ b/x-pack/test/functional/apps/maps/sample_data.js @@ -10,7 +10,6 @@ export default function ({ getPageObjects, getService, updateBaselines }) { const PageObjects = getPageObjects(['common', 'maps', 'header', 'home', 'timePicker']); const screenshot = getService('screenshots'); - // FLAKY: https://github.com/elastic/kibana/issues/38137 describe('maps loaded from sample data', () => { // Sample data is shifted to be relative to current time // This means that a static timerange will return different documents @@ -21,13 +20,9 @@ export default function ({ getPageObjects, getService, updateBaselines }) { past.setMonth(past.getMonth() - 6); const future = new Date(); future.setMonth(future.getMonth() + 6); - await PageObjects.maps.setAbsoluteRange( - PageObjects.timePicker.formatDateToAbsoluteTimeString(past), - PageObjects.timePicker.formatDateToAbsoluteTimeString(future) - ); + await PageObjects.maps.setAbsoluteRange(past.toISOString(), future.toISOString()); } - // Skipped because EMS vectors are not accessible in CI describe('ecommerce', () => { before(async () => { await PageObjects.common.navigateToUrl('home', '/tutorial_directory/sampleData', { @@ -59,7 +54,7 @@ export default function ({ getPageObjects, getService, updateBaselines }) { 'ecommerce_map', updateBaselines ); - expect(percentDifference).to.be.lessThan(0.05); + expect(percentDifference).to.be.lessThan(0.06); }); }); @@ -94,7 +89,6 @@ export default function ({ getPageObjects, getService, updateBaselines }) { }); }); - // Skipped because EMS vectors are not accessible in CI describe('web logs', () => { before(async () => { await PageObjects.common.navigateToUrl('home', '/tutorial_directory/sampleData', {