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

[maps] fix x-pack/test/functional/apps/maps/documents_source/top_hits.js test #122276

Merged
merged 2 commits into from
Jan 4, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 17 additions & 7 deletions x-pack/test/functional/apps/maps/documents_source/top_hits.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ export default function ({ getPageObjects, getService }) {
const inspector = getService('inspector');
const find = getService('find');
const security = getService('security');
const retry = getService('retry');

describe('geo top hits', () => {
describe('split on string field', () => {
Expand Down Expand Up @@ -42,13 +43,22 @@ export default function ({ getPageObjects, getService }) {
describe('configuration', () => {
before(async () => {
await PageObjects.maps.openLayerPanel('logstash');
// Can not use testSubjects because data-test-subj is placed range input and number input
const sizeInput = await find.byCssSelector(
`input[data-test-subj="layerPanelTopHitsSize"][type='number']`
);
await sizeInput.click();
await sizeInput.clearValue();
await sizeInput.type('3');

await retry.try(async () => {
// Can not use testSubjects because data-test-subj is placed range input and number input
const sizeInput = await find.byCssSelector(
`input[data-test-subj="layerPanelTopHitsSize"][type='number']`
);
await sizeInput.click();
await sizeInput.clearValue();
await sizeInput.type('3');

const sizeValue = await sizeInput.getAttribute('value');
if (sizeValue !== '3') {
throw new Error('layerPanelTopHitsSize not set to 3');
}
});

await PageObjects.maps.waitForLayersToLoad();
});

Expand Down