forked from elastic/kibana
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Maps] fix point to point source regression (elastic#60930)
* [Maps] fix pew pew regression * add functional test for pew pew source
- Loading branch information
Showing
4 changed files
with
46 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License; | ||
* you may not use this file except in compliance with the Elastic License. | ||
*/ | ||
|
||
import expect from '@kbn/expect'; | ||
|
||
export default function({ getPageObjects, getService }) { | ||
const PageObjects = getPageObjects(['maps']); | ||
const inspector = getService('inspector'); | ||
|
||
const VECTOR_SOURCE_ID = '67c1de2c-2fc5-4425-8983-094b589afe61'; | ||
|
||
describe('point to point source', () => { | ||
before(async () => { | ||
await PageObjects.maps.loadSavedMap('pew pew demo'); | ||
}); | ||
|
||
it('should request source clusters for destination locations', async () => { | ||
await inspector.open(); | ||
await inspector.openInspectorRequestsView(); | ||
const requestStats = await inspector.getTableData(); | ||
const hits = PageObjects.maps.getInspectorStatRowHit(requestStats, 'Hits'); | ||
const totalHits = PageObjects.maps.getInspectorStatRowHit(requestStats, 'Hits (total)'); | ||
await inspector.close(); | ||
|
||
expect(hits).to.equal('0'); | ||
expect(totalHits).to.equal('4'); | ||
}); | ||
|
||
it('should render lines', async () => { | ||
const mapboxStyle = await PageObjects.maps.getMapboxStyle(); | ||
const features = mapboxStyle.sources[VECTOR_SOURCE_ID].data.features; | ||
expect(features.length).to.equal(2); | ||
expect(features[0].geometry.type).to.equal('LineString'); | ||
}); | ||
}); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters