diff --git a/x-pack/test/functional/apps/maps/joins.js b/x-pack/test/functional/apps/maps/joins.js index 07d60871d52c9..1634bea47a69f 100644 --- a/x-pack/test/functional/apps/maps/joins.js +++ b/x-pack/test/functional/apps/maps/joins.js @@ -20,7 +20,7 @@ const EXPECTED_JOIN_VALUES = { const VECTOR_SOURCE_ID = 'n1t6f'; export default function ({ getPageObjects, getService }) { - const PageObjects = getPageObjects(['common', 'maps']); + const PageObjects = getPageObjects(['maps']); const inspector = getService('inspector'); describe('layer with joins', () => { @@ -32,7 +32,7 @@ export default function ({ getPageObjects, getService }) { await inspector.close(); }); - /*it('should re-fetch join with refresh timer', async () => { + it('should re-fetch join with refresh timer', async () => { async function getRequestTimestamp() { await PageObjects.maps.openInspectorRequest('meta_for_geo_shapes*.shape_name'); const requestStats = await inspector.getTableData(); @@ -106,19 +106,20 @@ export default function ({ getPageObjects, getService }) { }); expect(visibilitiesOfFeatures).to.eql([false, true, true, true]); - });*/ + }); describe('query bar', () => { before(async () => { - await PageObjects.maps.setAndSubmitQuery('prop1 < 10 or _index : "geo_shapes*"'); + await PageObjects.maps.setAndSubmitQuery('prop1 < 10'); }); - afterEach(async () => { + after(async () => { await inspector.close(); + await PageObjects.maps.setAndSubmitQuery(''); }); - it('should apply query to join request', async () => { + it('should not apply query to source and apply query to join', async () => { await PageObjects.maps.openInspectorRequest('meta_for_geo_shapes*.shape_name'); const requestStats = await inspector.getTableData(); const totalHits = PageObjects.maps.getInspectorStatRowHit(requestStats, 'Hits (total)'); @@ -128,22 +129,6 @@ export default function ({ getPageObjects, getService }) { const indexPatternName = PageObjects.maps.getInspectorStatRowHit(requestStats, 'Index pattern'); expect(indexPatternName).to.equal('meta_for_geo_shapes*'); }); - - it('should not apply query to join request when apply global query is disabled', async () => { - await PageObjects.maps.openLayerPanel('geo_shapes*'); - await PageObjects.common.sleep(10001); - await PageObjects.maps.disableApplyGlobalQuery(); - await PageObjects.common.sleep(10002); - - await PageObjects.maps.openInspectorRequest('meta_for_geo_shapes*.shape_name'); - const requestStats = await inspector.getTableData(); - const totalHits = PageObjects.maps.getInspectorStatRowHit(requestStats, 'Hits (total)'); - expect(totalHits).to.equal('6'); - const hits = PageObjects.maps.getInspectorStatRowHit(requestStats, 'Hits'); - expect(hits).to.equal('0'); // aggregation requests do not return any documents - const indexPatternName = PageObjects.maps.getInspectorStatRowHit(requestStats, 'Index pattern'); - expect(indexPatternName).to.equal('meta_for_geo_shapes*'); - }); }); describe('where clause', () => { diff --git a/x-pack/test/functional/es_archives/maps/kibana/data.json b/x-pack/test/functional/es_archives/maps/kibana/data.json index 52a454eeeb743..1291e3dd10cff 100644 --- a/x-pack/test/functional/es_archives/maps/kibana/data.json +++ b/x-pack/test/functional/es_archives/maps/kibana/data.json @@ -411,7 +411,7 @@ "type": "envelope" }, "description": "", - "layerListJSON": "[{\"id\":\"0hmz5\",\"label\":\"EMS base layer (road_map)\",\"sourceDescriptor\":{\"type\":\"EMS_TMS\",\"id\":\"road_map\"},\"visible\":true,\"temporary\":false,\"style\":{\"type\":\"TILE\",\"properties\":{}},\"type\":\"TILE\",\"minZoom\":0,\"maxZoom\":24},{\"id\":\"n1t6f\",\"label\":null,\"minZoom\":0,\"maxZoom\":24,\"sourceDescriptor\":{\"id\":\"62eca1fc-fe42-11e8-8eb2-f2801f1b9fd1\",\"type\":\"ES_SEARCH\",\"geoField\":\"geometry\",\"limit\":2048,\"filterByMapBounds\":false,\"showTooltip\":true,\"tooltipProperties\":[\"name\"],\"indexPatternRefName\":\"layer_1_source_index_pattern\"},\"visible\":true,\"temporary\":false,\"style\":{\"type\":\"VECTOR\",\"properties\":{\"fillColor\":{\"type\":\"DYNAMIC\",\"options\":{\"field\":{\"label\":\"max(prop1) group by meta_for_geo_shapes*.shape_name\",\"name\":\"__kbnjoin__max_of_prop1_groupby_meta_for_geo_shapes*.shape_name\",\"origin\":\"join\"},\"color\":\"Blues\"}},\"iconSize\":{\"type\":\"STATIC\",\"options\":{\"size\":10}}},\"temporary\":true,\"previousStyle\":null},\"type\":\"VECTOR\",\"joins\":[{\"leftField\":\"name\",\"right\":{\"id\":\"855ccb86-fe42-11e8-8eb2-f2801f1b9fd1\",\"indexPatternTitle\":\"meta_for_geo_shapes*\",\"term\":\"shape_name\",\"metrics\":[{\"type\":\"max\",\"field\":\"prop1\"}],\"indexPatternRefName\":\"layer_1_join_0_index_pattern\"}}]}]", + "layerListJSON" : "[{\"id\":\"0hmz5\",\"label\":\"EMS base layer (road_map)\",\"sourceDescriptor\":{\"type\":\"EMS_TMS\",\"id\":\"road_map\"},\"visible\":true,\"temporary\":false,\"style\":{\"type\":\"TILE\",\"properties\":{}},\"type\":\"VECTOR_TILE\",\"minZoom\":0,\"maxZoom\":24},{\"id\":\"n1t6f\",\"label\":null,\"minZoom\":0,\"maxZoom\":24,\"sourceDescriptor\":{\"id\":\"62eca1fc-fe42-11e8-8eb2-f2801f1b9fd1\",\"type\":\"ES_SEARCH\",\"geoField\":\"geometry\",\"limit\":2048,\"filterByMapBounds\":false,\"showTooltip\":true,\"tooltipProperties\":[\"name\"],\"applyGlobalQuery\":false,\"indexPatternRefName\":\"layer_1_source_index_pattern\"},\"visible\":true,\"temporary\":false,\"style\":{\"type\":\"VECTOR\",\"properties\":{\"fillColor\":{\"type\":\"DYNAMIC\",\"options\":{\"field\":{\"label\":\"max(prop1) group by meta_for_geo_shapes*.shape_name\",\"name\":\"__kbnjoin__max_of_prop1_groupby_meta_for_geo_shapes*.shape_name\",\"origin\":\"join\"},\"color\":\"Blues\"}},\"iconSize\":{\"type\":\"STATIC\",\"options\":{\"size\":10}}},\"temporary\":true,\"previousStyle\":null},\"type\":\"VECTOR\",\"joins\":[{\"leftField\":\"name\",\"right\":{\"id\":\"855ccb86-fe42-11e8-8eb2-f2801f1b9fd1\",\"indexPatternTitle\":\"meta_for_geo_shapes*\",\"term\":\"shape_name\",\"metrics\":[{\"type\":\"max\",\"field\":\"prop1\"}],\"applyGlobalQuery\":true,\"indexPatternRefName\":\"layer_1_join_0_index_pattern\"}}]}]", "mapStateJSON": "{\"zoom\":3.02,\"center\":{\"lon\":77.33426,\"lat\":-0.04647},\"timeFilters\":{\"from\":\"now-17m\",\"to\":\"now\",\"mode\":\"quick\"},\"refreshConfig\":{\"isPaused\":true,\"interval\":1000}}", "title": "join example", "uiStateJSON": "{\"isLayerTOCOpen\":true,\"openTOCDetails\":[\"n1t6f\"]}" @@ -430,7 +430,7 @@ } ], "migrationVersion" : { - "map" : "7.2.0" + "map" : "7.6.0" } } }