Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ensure baselayers display in region maps #22609

Merged
merged 7 commits into from
Nov 6, 2018
Merged
3 changes: 2 additions & 1 deletion src/core_plugins/region_map/public/region_map_vis.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,8 @@ provided base maps, or add your own. Darker colors represent higher values.' }),
text: i18n('regionMap.mapVis.regionMapEditorConfig.topRightText', { defaultMessage: 'top right' }),
}],
colorSchemas: Object.values(truncatedColorMaps).map(value => ({ id: value.id, label: value.label })),
vectorLayers: vectorLayers
vectorLayers: vectorLayers,
tmsLayers: []
},
schemas: new Schemas([
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -150,4 +150,4 @@
</div>
</div>

<wms-options options="editorState.params.wms"></wms-options>
<wms-options options="editorState.params.wms" collections="collections"></wms-options>
9 changes: 6 additions & 3 deletions test/functional/apps/visualize/_region_map.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ export default function ({ getService, getPageObjects }) {
const toTime = '2015-09-23 18:31:44.000';

const log = getService('log');
const find = getService('find');
const PageObjects = getPageObjects(['common', 'visualize', 'header', 'settings']);

before(async function () {
Expand Down Expand Up @@ -73,17 +74,19 @@ export default function ({ getService, getPageObjects }) {
await PageObjects.visualize.selectFieldById('Three letter abbreviation', 'joinField');
await PageObjects.visualize.selectFieldById('Country name', 'joinField');
await PageObjects.visualize.selectFieldById('Two letter abbreviation', 'joinField');

await PageObjects.common.sleep(2000);//need some time for the data to load

await PageObjects.visualize.openInspector();
const actualData = await PageObjects.visualize.getInspectorTableData();
const expectedData = [['CN', '2,592'], ['IN', '2,373'], ['US', '1,194'], ['ID', '489'], ['BR', '415']];
expect(actualData).to.eql(expectedData);


});

it('should contain a dropdown with the default road_map base layer as an option',
async () => {
const roadMapExists = await find.existsByCssSelector('[label="road_map"]');
expect(roadMapExists).to.be(true);
});
});
});

Expand Down