[8.x] [ES|QL] Fixes the field controls FT flakiness (#216747) (#216837)

# Backport

This will backport the following commits from `main` to `8.x`:
- [[ES|QL] Fixes the field controls FT flakiness
(#216747)](https://github.com/elastic/kibana/pull/216747)

<!--- Backport version: 9.6.6 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sorenlouv/backport)

<!--BACKPORT [{"author":{"name":"Stratoula
Kalafateli","email":"efstratia.kalafateli@elastic.co"},"sourceCommit":{"committedDate":"2025-04-02T13:31:48Z","message":"[ES|QL]
Fixes the field controls FT flakiness (#216747)\n\n## Summary\n\nCloses
https://github.com/elastic/kibana/issues/216398\n\nI also stabilized the
values FT as it was also flaky 🤞 \n\n### Checklist\n\n- [ ] [Unit or
functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere
updated or added to match the most common
scenarios","sha":"cf289cbd1e18a3b0798d00f866e446ce3753d8e9","branchLabelMapping":{"^v9.1.0$":"main","^v8.19.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","Feature:ES|QL","backport:version","v9.1.0","v8.19.0"],"title":"[ES|QL]
Fixes the field controls FT
flakiness","number":216747,"url":"https://github.com/elastic/kibana/pull/216747","mergeCommit":{"message":"[ES|QL]
Fixes the field controls FT flakiness (#216747)\n\n## Summary\n\nCloses
https://github.com/elastic/kibana/issues/216398\n\nI also stabilized the
values FT as it was also flaky 🤞 \n\n### Checklist\n\n- [ ] [Unit or
functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere
updated or added to match the most common
scenarios","sha":"cf289cbd1e18a3b0798d00f866e446ce3753d8e9"}},"sourceBranch":"main","suggestedTargetBranches":["8.x"],"targetPullRequestStates":[{"branch":"main","label":"v9.1.0","branchLabelMappingKey":"^v9.1.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/216747","number":216747,"mergeCommit":{"message":"[ES|QL]
Fixes the field controls FT flakiness (#216747)\n\n## Summary\n\nCloses
https://github.com/elastic/kibana/issues/216398\n\nI also stabilized the
values FT as it was also flaky 🤞 \n\n### Checklist\n\n- [ ] [Unit or
functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere
updated or added to match the most common
scenarios","sha":"cf289cbd1e18a3b0798d00f866e446ce3753d8e9"}},{"branch":"8.x","label":"v8.19.0","branchLabelMappingKey":"^v8.19.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

Co-authored-by: Stratoula Kalafateli <efstratia.kalafateli@elastic.co>
This commit is contained in:
Kibana Machine 2025-04-02 18:20:33 +02:00 committed by GitHub
parent 37f5562b73
commit 0ccb82963a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 15 additions and 4 deletions

View file

@ -46,6 +46,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
await dashboardAddPanel.clickEditorMenuButton();
await dashboardAddPanel.clickAddNewPanelFromUIActionLink('ES|QL');
await dashboard.waitForRenderComplete();
await elasticChart.setNewChartUiDebugFlag(true);
await retry.try(async () => {
const panelCount = await dashboard.getPanelCount();
@ -87,13 +88,14 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
});
it('should update the Lens chart accordingly', async () => {
await elasticChart.setNewChartUiDebugFlag(true);
// change the control value
await comboBox.set('esqlControlValuesDropdown', 'clientip');
await dashboard.waitForRenderComplete();
const data = await elasticChart.getChartDebugData('xyVisChart');
expect(data?.axes?.x[0]?.title).to.be('clientip');
await retry.try(async () => {
const data = await elasticChart.getChartDebugData('xyVisChart');
expect(data?.axes?.x[0]?.title).to.be('clientip');
});
});
});
}

View file

@ -14,11 +14,12 @@ import { FtrProviderContext } from '../../../ftr_provider_context';
export default function ({ getService, getPageObjects }: FtrProviderContext) {
const retry = getService('retry');
const kibanaServer = getService('kibanaServer');
const { dashboard, timePicker, common, dashboardControls } = getPageObjects([
const { dashboard, timePicker, common, dashboardControls, header } = getPageObjects([
'dashboard',
'timePicker',
'common',
'dashboardControls',
'header',
]);
const find = getService('find');
const testSubjects = getService('testSubjects');
@ -26,6 +27,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
const dashboardAddPanel = getService('dashboardAddPanel');
const browser = getService('browser');
const comboBox = getService('comboBox');
const dashboardPanelActions = getService('dashboardPanelActions');
// Failing: See https://github.com/elastic/kibana/issues/213288
describe.skip('dashboard - add a value type ES|QL control', function () {
@ -87,9 +89,14 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
// Check Lens editor has been updated accordingly
const editorValue = await esql.getEsqlEditorQuery();
expect(editorValue).to.contain('FROM logstash-* | WHERE geo.dest == ?geo_dest');
await testSubjects.click('applyFlyoutButton');
await dashboard.waitForRenderComplete();
});
it('should update the Lens chart accordingly', async () => {
// now edit the panel and click on Cancel
await dashboardPanelActions.clickInlineEdit();
// change the table to keep only the column with the control
await esql.setEsqlEditorQuery(
'FROM logstash-* | WHERE geo.dest == ?geo_dest | KEEP geo.dest'
@ -97,10 +104,12 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
// run the query
await testSubjects.click('ESQLEditor-run-query-button');
await dashboard.waitForRenderComplete();
await header.waitUntilLoadingHasFinished();
// save the changes
await testSubjects.click('applyFlyoutButton');
await dashboard.waitForRenderComplete();
await header.waitUntilLoadingHasFinished();
// change the control value
await comboBox.set('esqlControlValuesDropdown', 'AO');
await dashboard.waitForRenderComplete();