[Vega] Fix update vega spec in functional tests#216620
Conversation
|
Pinging @elastic/kibana-visualizations (Team:Visualizations) |
024d273 to
fd3bc7e
Compare
💚 Build Succeeded
Metrics [docs]
|
|
Starting backport for target branches: 7.17, 8.16, 8.17, 8.18, 8.x, 9.0 https://github.com/elastic/kibana/actions/runs/14199657841 |
## Summary This PR fixes a flaky test practice that was causing issues in 7.17 branch. The flakiness was introduced long ago when the choosen method to update/add more content to the Vega Spec was done by manually clicking in the Vega spec editor the left border (where the editor shows the line numbers) to select all the text in the editor and go to the last line but a char before the end of the text (right before the closing bracket). The failure highlighted by elastic#213646 where caused the added `config` text positioned in the wrong line/column due to the Konami Code like type of functional test operation. The fix instead provides a more robust method: it takes the written text in the editor, parse it to JSON, update the JSON and write it back again to the editor. Will fix the issue elastic#213646 when backported to 7.17. (cherry picked from commit 200ec10)
## Summary This PR fixes a flaky test practice that was causing issues in 7.17 branch. The flakiness was introduced long ago when the choosen method to update/add more content to the Vega Spec was done by manually clicking in the Vega spec editor the left border (where the editor shows the line numbers) to select all the text in the editor and go to the last line but a char before the end of the text (right before the closing bracket). The failure highlighted by elastic#213646 where caused the added `config` text positioned in the wrong line/column due to the Konami Code like type of functional test operation. The fix instead provides a more robust method: it takes the written text in the editor, parse it to JSON, update the JSON and write it back again to the editor. Will fix the issue elastic#213646 when backported to 7.17. (cherry picked from commit 200ec10)
## Summary This PR fixes a flaky test practice that was causing issues in 7.17 branch. The flakiness was introduced long ago when the choosen method to update/add more content to the Vega Spec was done by manually clicking in the Vega spec editor the left border (where the editor shows the line numbers) to select all the text in the editor and go to the last line but a char before the end of the text (right before the closing bracket). The failure highlighted by elastic#213646 where caused the added `config` text positioned in the wrong line/column due to the Konami Code like type of functional test operation. The fix instead provides a more robust method: it takes the written text in the editor, parse it to JSON, update the JSON and write it back again to the editor. Will fix the issue elastic#213646 when backported to 7.17. (cherry picked from commit 200ec10)
## Summary This PR fixes a flaky test practice that was causing issues in 7.17 branch. The flakiness was introduced long ago when the choosen method to update/add more content to the Vega Spec was done by manually clicking in the Vega spec editor the left border (where the editor shows the line numbers) to select all the text in the editor and go to the last line but a char before the end of the text (right before the closing bracket). The failure highlighted by elastic#213646 where caused the added `config` text positioned in the wrong line/column due to the Konami Code like type of functional test operation. The fix instead provides a more robust method: it takes the written text in the editor, parse it to JSON, update the JSON and write it back again to the editor. Will fix the issue elastic#213646 when backported to 7.17. (cherry picked from commit 200ec10)
## Summary This PR fixes a flaky test practice that was causing issues in 7.17 branch. The flakiness was introduced long ago when the choosen method to update/add more content to the Vega Spec was done by manually clicking in the Vega spec editor the left border (where the editor shows the line numbers) to select all the text in the editor and go to the last line but a char before the end of the text (right before the closing bracket). The failure highlighted by elastic#213646 where caused the added `config` text positioned in the wrong line/column due to the Konami Code like type of functional test operation. The fix instead provides a more robust method: it takes the written text in the editor, parse it to JSON, update the JSON and write it back again to the editor. Will fix the issue elastic#213646 when backported to 7.17. (cherry picked from commit 200ec10)
💔 Some backports could not be created
Note: Successful backport PRs will be merged automatically after passing CI. Manual backportTo create the backport manually run: Questions ?Please refer to the Backport tool documentation |
) # Backport This will backport the following commits from `main` to `9.0`: - [[Vega] Fix update vega spec in functional tests (#216620)](#216620) <!--- Backport version: 9.6.6 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sorenlouv/backport) <!--BACKPORT [{"author":{"name":"Marco Vettorello","email":"marco.vettorello@elastic.co"},"sourceCommit":{"committedDate":"2025-04-01T15:26:17Z","message":"[Vega] Fix update vega spec in functional tests (#216620)\n\n## Summary\n\nThis PR fixes a flaky test practice that was causing issues in 7.17\nbranch.\nThe flakiness was introduced long ago when the choosen method to\nupdate/add more content to the Vega Spec was done by manually clicking\nin the Vega spec editor the left border (where the editor shows the line\nnumbers) to select all the text in the editor and go to the last line\nbut a char before the end of the text (right before the closing\nbracket).\n\nThe failure highlighted by\nhttps://github.com//issues/213646 where caused the added\n`config` text positioned in the wrong line/column due to the Konami Code\nlike type of functional test operation.\n\n\nThe fix instead provides a more robust method: it takes the written text\nin the editor, parse it to JSON, update the JSON and write it back again\nto the editor.\n\nWill fix the issue #213646 when\nbackported to 7.17.","sha":"200ec10593480edc3ef7b0d0ea77b29c787d1382","branchLabelMapping":{"^v9.1.0$":"main","^v8.19.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["test","Team:Visualizations","release_note:skip","backport:all-open","v9.1.0"],"title":"[Vega] Fix update vega spec in functional tests","number":216620,"url":"https://github.com/elastic/kibana/pull/216620","mergeCommit":{"message":"[Vega] Fix update vega spec in functional tests (#216620)\n\n## Summary\n\nThis PR fixes a flaky test practice that was causing issues in 7.17\nbranch.\nThe flakiness was introduced long ago when the choosen method to\nupdate/add more content to the Vega Spec was done by manually clicking\nin the Vega spec editor the left border (where the editor shows the line\nnumbers) to select all the text in the editor and go to the last line\nbut a char before the end of the text (right before the closing\nbracket).\n\nThe failure highlighted by\nhttps://github.com//issues/213646 where caused the added\n`config` text positioned in the wrong line/column due to the Konami Code\nlike type of functional test operation.\n\n\nThe fix instead provides a more robust method: it takes the written text\nin the editor, parse it to JSON, update the JSON and write it back again\nto the editor.\n\nWill fix the issue #213646 when\nbackported to 7.17.","sha":"200ec10593480edc3ef7b0d0ea77b29c787d1382"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.1.0","branchLabelMappingKey":"^v9.1.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/216620","number":216620,"mergeCommit":{"message":"[Vega] Fix update vega spec in functional tests (#216620)\n\n## Summary\n\nThis PR fixes a flaky test practice that was causing issues in 7.17\nbranch.\nThe flakiness was introduced long ago when the choosen method to\nupdate/add more content to the Vega Spec was done by manually clicking\nin the Vega spec editor the left border (where the editor shows the line\nnumbers) to select all the text in the editor and go to the last line\nbut a char before the end of the text (right before the closing\nbracket).\n\nThe failure highlighted by\nhttps://github.com//issues/213646 where caused the added\n`config` text positioned in the wrong line/column due to the Konami Code\nlike type of functional test operation.\n\n\nThe fix instead provides a more robust method: it takes the written text\nin the editor, parse it to JSON, update the JSON and write it back again\nto the editor.\n\nWill fix the issue #213646 when\nbackported to 7.17.","sha":"200ec10593480edc3ef7b0d0ea77b29c787d1382"}}]}] BACKPORT--> Co-authored-by: Marco Vettorello <marco.vettorello@elastic.co>
## Summary This PR fixes a flaky test practice that was causing issues in 7.17 branch. The flakiness was introduced long ago when the choosen method to update/add more content to the Vega Spec was done by manually clicking in the Vega spec editor the left border (where the editor shows the line numbers) to select all the text in the editor and go to the last line but a char before the end of the text (right before the closing bracket). The failure highlighted by elastic#213646 where caused the added `config` text positioned in the wrong line/column due to the Konami Code like type of functional test operation. The fix instead provides a more robust method: it takes the written text in the editor, parse it to JSON, update the JSON and write it back again to the editor. Will fix the issue elastic#213646 when backported to 7.17. (cherry picked from commit 200ec10) # Conflicts: # test/functional/apps/visualize/_vega_chart.ts # test/functional/page_objects/vega_chart_page.ts # x-pack/test_serverless/functional/test_suites/common/visualizations/group1/vega_chart.ts
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
…6673) # Backport This will backport the following commits from `main` to `8.18`: - [[Vega] Fix update vega spec in functional tests (#216620)](#216620) <!--- Backport version: 9.6.6 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sorenlouv/backport) <!--BACKPORT [{"author":{"name":"Marco Vettorello","email":"marco.vettorello@elastic.co"},"sourceCommit":{"committedDate":"2025-04-01T15:26:17Z","message":"[Vega] Fix update vega spec in functional tests (#216620)\n\n## Summary\n\nThis PR fixes a flaky test practice that was causing issues in 7.17\nbranch.\nThe flakiness was introduced long ago when the choosen method to\nupdate/add more content to the Vega Spec was done by manually clicking\nin the Vega spec editor the left border (where the editor shows the line\nnumbers) to select all the text in the editor and go to the last line\nbut a char before the end of the text (right before the closing\nbracket).\n\nThe failure highlighted by\nhttps://github.com//issues/213646 where caused the added\n`config` text positioned in the wrong line/column due to the Konami Code\nlike type of functional test operation.\n\n\nThe fix instead provides a more robust method: it takes the written text\nin the editor, parse it to JSON, update the JSON and write it back again\nto the editor.\n\nWill fix the issue #213646 when\nbackported to 7.17.","sha":"200ec10593480edc3ef7b0d0ea77b29c787d1382","branchLabelMapping":{"^v9.1.0$":"main","^v8.19.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["test","Team:Visualizations","release_note:skip","backport:all-open","v9.1.0"],"title":"[Vega] Fix update vega spec in functional tests","number":216620,"url":"https://github.com/elastic/kibana/pull/216620","mergeCommit":{"message":"[Vega] Fix update vega spec in functional tests (#216620)\n\n## Summary\n\nThis PR fixes a flaky test practice that was causing issues in 7.17\nbranch.\nThe flakiness was introduced long ago when the choosen method to\nupdate/add more content to the Vega Spec was done by manually clicking\nin the Vega spec editor the left border (where the editor shows the line\nnumbers) to select all the text in the editor and go to the last line\nbut a char before the end of the text (right before the closing\nbracket).\n\nThe failure highlighted by\nhttps://github.com//issues/213646 where caused the added\n`config` text positioned in the wrong line/column due to the Konami Code\nlike type of functional test operation.\n\n\nThe fix instead provides a more robust method: it takes the written text\nin the editor, parse it to JSON, update the JSON and write it back again\nto the editor.\n\nWill fix the issue #213646 when\nbackported to 7.17.","sha":"200ec10593480edc3ef7b0d0ea77b29c787d1382"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.1.0","branchLabelMappingKey":"^v9.1.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/216620","number":216620,"mergeCommit":{"message":"[Vega] Fix update vega spec in functional tests (#216620)\n\n## Summary\n\nThis PR fixes a flaky test practice that was causing issues in 7.17\nbranch.\nThe flakiness was introduced long ago when the choosen method to\nupdate/add more content to the Vega Spec was done by manually clicking\nin the Vega spec editor the left border (where the editor shows the line\nnumbers) to select all the text in the editor and go to the last line\nbut a char before the end of the text (right before the closing\nbracket).\n\nThe failure highlighted by\nhttps://github.com//issues/213646 where caused the added\n`config` text positioned in the wrong line/column due to the Konami Code\nlike type of functional test operation.\n\n\nThe fix instead provides a more robust method: it takes the written text\nin the editor, parse it to JSON, update the JSON and write it back again\nto the editor.\n\nWill fix the issue #213646 when\nbackported to 7.17.","sha":"200ec10593480edc3ef7b0d0ea77b29c787d1382"}}]}] BACKPORT--> Co-authored-by: Marco Vettorello <marco.vettorello@elastic.co>
…6670) # Backport This will backport the following commits from `main` to `8.16`: - [[Vega] Fix update vega spec in functional tests (#216620)](#216620) <!--- Backport version: 9.6.6 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sorenlouv/backport) <!--BACKPORT [{"author":{"name":"Marco Vettorello","email":"marco.vettorello@elastic.co"},"sourceCommit":{"committedDate":"2025-04-01T15:26:17Z","message":"[Vega] Fix update vega spec in functional tests (#216620)\n\n## Summary\n\nThis PR fixes a flaky test practice that was causing issues in 7.17\nbranch.\nThe flakiness was introduced long ago when the choosen method to\nupdate/add more content to the Vega Spec was done by manually clicking\nin the Vega spec editor the left border (where the editor shows the line\nnumbers) to select all the text in the editor and go to the last line\nbut a char before the end of the text (right before the closing\nbracket).\n\nThe failure highlighted by\nhttps://github.com//issues/213646 where caused the added\n`config` text positioned in the wrong line/column due to the Konami Code\nlike type of functional test operation.\n\n\nThe fix instead provides a more robust method: it takes the written text\nin the editor, parse it to JSON, update the JSON and write it back again\nto the editor.\n\nWill fix the issue #213646 when\nbackported to 7.17.","sha":"200ec10593480edc3ef7b0d0ea77b29c787d1382","branchLabelMapping":{"^v9.1.0$":"main","^v8.19.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["test","Team:Visualizations","release_note:skip","backport:all-open","v9.1.0"],"title":"[Vega] Fix update vega spec in functional tests","number":216620,"url":"https://github.com/elastic/kibana/pull/216620","mergeCommit":{"message":"[Vega] Fix update vega spec in functional tests (#216620)\n\n## Summary\n\nThis PR fixes a flaky test practice that was causing issues in 7.17\nbranch.\nThe flakiness was introduced long ago when the choosen method to\nupdate/add more content to the Vega Spec was done by manually clicking\nin the Vega spec editor the left border (where the editor shows the line\nnumbers) to select all the text in the editor and go to the last line\nbut a char before the end of the text (right before the closing\nbracket).\n\nThe failure highlighted by\nhttps://github.com//issues/213646 where caused the added\n`config` text positioned in the wrong line/column due to the Konami Code\nlike type of functional test operation.\n\n\nThe fix instead provides a more robust method: it takes the written text\nin the editor, parse it to JSON, update the JSON and write it back again\nto the editor.\n\nWill fix the issue #213646 when\nbackported to 7.17.","sha":"200ec10593480edc3ef7b0d0ea77b29c787d1382"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.1.0","branchLabelMappingKey":"^v9.1.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/216620","number":216620,"mergeCommit":{"message":"[Vega] Fix update vega spec in functional tests (#216620)\n\n## Summary\n\nThis PR fixes a flaky test practice that was causing issues in 7.17\nbranch.\nThe flakiness was introduced long ago when the choosen method to\nupdate/add more content to the Vega Spec was done by manually clicking\nin the Vega spec editor the left border (where the editor shows the line\nnumbers) to select all the text in the editor and go to the last line\nbut a char before the end of the text (right before the closing\nbracket).\n\nThe failure highlighted by\nhttps://github.com//issues/213646 where caused the added\n`config` text positioned in the wrong line/column due to the Konami Code\nlike type of functional test operation.\n\n\nThe fix instead provides a more robust method: it takes the written text\nin the editor, parse it to JSON, update the JSON and write it back again\nto the editor.\n\nWill fix the issue #213646 when\nbackported to 7.17.","sha":"200ec10593480edc3ef7b0d0ea77b29c787d1382"}}]}] BACKPORT--> Co-authored-by: Marco Vettorello <marco.vettorello@elastic.co>
…6672) # Backport This will backport the following commits from `main` to `8.17`: - [[Vega] Fix update vega spec in functional tests (#216620)](#216620) <!--- Backport version: 9.6.6 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sorenlouv/backport) <!--BACKPORT [{"author":{"name":"Marco Vettorello","email":"marco.vettorello@elastic.co"},"sourceCommit":{"committedDate":"2025-04-01T15:26:17Z","message":"[Vega] Fix update vega spec in functional tests (#216620)\n\n## Summary\n\nThis PR fixes a flaky test practice that was causing issues in 7.17\nbranch.\nThe flakiness was introduced long ago when the choosen method to\nupdate/add more content to the Vega Spec was done by manually clicking\nin the Vega spec editor the left border (where the editor shows the line\nnumbers) to select all the text in the editor and go to the last line\nbut a char before the end of the text (right before the closing\nbracket).\n\nThe failure highlighted by\nhttps://github.com//issues/213646 where caused the added\n`config` text positioned in the wrong line/column due to the Konami Code\nlike type of functional test operation.\n\n\nThe fix instead provides a more robust method: it takes the written text\nin the editor, parse it to JSON, update the JSON and write it back again\nto the editor.\n\nWill fix the issue #213646 when\nbackported to 7.17.","sha":"200ec10593480edc3ef7b0d0ea77b29c787d1382","branchLabelMapping":{"^v9.1.0$":"main","^v8.19.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["test","Team:Visualizations","release_note:skip","backport:all-open","v9.1.0"],"title":"[Vega] Fix update vega spec in functional tests","number":216620,"url":"https://github.com/elastic/kibana/pull/216620","mergeCommit":{"message":"[Vega] Fix update vega spec in functional tests (#216620)\n\n## Summary\n\nThis PR fixes a flaky test practice that was causing issues in 7.17\nbranch.\nThe flakiness was introduced long ago when the choosen method to\nupdate/add more content to the Vega Spec was done by manually clicking\nin the Vega spec editor the left border (where the editor shows the line\nnumbers) to select all the text in the editor and go to the last line\nbut a char before the end of the text (right before the closing\nbracket).\n\nThe failure highlighted by\nhttps://github.com//issues/213646 where caused the added\n`config` text positioned in the wrong line/column due to the Konami Code\nlike type of functional test operation.\n\n\nThe fix instead provides a more robust method: it takes the written text\nin the editor, parse it to JSON, update the JSON and write it back again\nto the editor.\n\nWill fix the issue #213646 when\nbackported to 7.17.","sha":"200ec10593480edc3ef7b0d0ea77b29c787d1382"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.1.0","branchLabelMappingKey":"^v9.1.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/216620","number":216620,"mergeCommit":{"message":"[Vega] Fix update vega spec in functional tests (#216620)\n\n## Summary\n\nThis PR fixes a flaky test practice that was causing issues in 7.17\nbranch.\nThe flakiness was introduced long ago when the choosen method to\nupdate/add more content to the Vega Spec was done by manually clicking\nin the Vega spec editor the left border (where the editor shows the line\nnumbers) to select all the text in the editor and go to the last line\nbut a char before the end of the text (right before the closing\nbracket).\n\nThe failure highlighted by\nhttps://github.com//issues/213646 where caused the added\n`config` text positioned in the wrong line/column due to the Konami Code\nlike type of functional test operation.\n\n\nThe fix instead provides a more robust method: it takes the written text\nin the editor, parse it to JSON, update the JSON and write it back again\nto the editor.\n\nWill fix the issue #213646 when\nbackported to 7.17.","sha":"200ec10593480edc3ef7b0d0ea77b29c787d1382"}}]}] BACKPORT--> Co-authored-by: Marco Vettorello <marco.vettorello@elastic.co>
|
Looks like this PR has backport PRs but they still haven't been merged. Please merge them ASAP to keep the branches relatively in sync. |
2 similar comments
|
Looks like this PR has backport PRs but they still haven't been merged. Please merge them ASAP to keep the branches relatively in sync. |
|
Looks like this PR has backport PRs but they still haven't been merged. Please merge them ASAP to keep the branches relatively in sync. |
) # Backport This will backport the following commits from `main` to `8.x`: - [[Vega] Fix update vega spec in functional tests (#216620)](#216620) <!--- Backport version: 9.6.6 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sorenlouv/backport) <!--BACKPORT [{"author":{"name":"Marco Vettorello","email":"marco.vettorello@elastic.co"},"sourceCommit":{"committedDate":"2025-04-01T15:26:17Z","message":"[Vega] Fix update vega spec in functional tests (#216620)\n\n## Summary\n\nThis PR fixes a flaky test practice that was causing issues in 7.17\nbranch.\nThe flakiness was introduced long ago when the choosen method to\nupdate/add more content to the Vega Spec was done by manually clicking\nin the Vega spec editor the left border (where the editor shows the line\nnumbers) to select all the text in the editor and go to the last line\nbut a char before the end of the text (right before the closing\nbracket).\n\nThe failure highlighted by\nhttps://github.com//issues/213646 where caused the added\n`config` text positioned in the wrong line/column due to the Konami Code\nlike type of functional test operation.\n\n\nThe fix instead provides a more robust method: it takes the written text\nin the editor, parse it to JSON, update the JSON and write it back again\nto the editor.\n\nWill fix the issue #213646 when\nbackported to 7.17.","sha":"200ec10593480edc3ef7b0d0ea77b29c787d1382","branchLabelMapping":{"^v9.1.0$":"main","^v8.19.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["test","Team:Visualizations","release_note:skip","backport:all-open","v9.1.0"],"title":"[Vega] Fix update vega spec in functional tests","number":216620,"url":"https://github.com/elastic/kibana/pull/216620","mergeCommit":{"message":"[Vega] Fix update vega spec in functional tests (#216620)\n\n## Summary\n\nThis PR fixes a flaky test practice that was causing issues in 7.17\nbranch.\nThe flakiness was introduced long ago when the choosen method to\nupdate/add more content to the Vega Spec was done by manually clicking\nin the Vega spec editor the left border (where the editor shows the line\nnumbers) to select all the text in the editor and go to the last line\nbut a char before the end of the text (right before the closing\nbracket).\n\nThe failure highlighted by\nhttps://github.com//issues/213646 where caused the added\n`config` text positioned in the wrong line/column due to the Konami Code\nlike type of functional test operation.\n\n\nThe fix instead provides a more robust method: it takes the written text\nin the editor, parse it to JSON, update the JSON and write it back again\nto the editor.\n\nWill fix the issue #213646 when\nbackported to 7.17.","sha":"200ec10593480edc3ef7b0d0ea77b29c787d1382"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.1.0","branchLabelMappingKey":"^v9.1.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/216620","number":216620,"mergeCommit":{"message":"[Vega] Fix update vega spec in functional tests (#216620)\n\n## Summary\n\nThis PR fixes a flaky test practice that was causing issues in 7.17\nbranch.\nThe flakiness was introduced long ago when the choosen method to\nupdate/add more content to the Vega Spec was done by manually clicking\nin the Vega spec editor the left border (where the editor shows the line\nnumbers) to select all the text in the editor and go to the last line\nbut a char before the end of the text (right before the closing\nbracket).\n\nThe failure highlighted by\nhttps://github.com//issues/213646 where caused the added\n`config` text positioned in the wrong line/column due to the Konami Code\nlike type of functional test operation.\n\n\nThe fix instead provides a more robust method: it takes the written text\nin the editor, parse it to JSON, update the JSON and write it back again\nto the editor.\n\nWill fix the issue #213646 when\nbackported to 7.17.","sha":"200ec10593480edc3ef7b0d0ea77b29c787d1382"}}]}] BACKPORT--> Co-authored-by: Marco Vettorello <marco.vettorello@elastic.co>
Summary
This PR fixes a flaky test practice that was causing issues in 7.17 branch.
The flakiness was introduced long ago when the choosen method to update/add more content to the Vega Spec was done by manually clicking in the Vega spec editor the left border (where the editor shows the line numbers) to select all the text in the editor and go to the last line but a char before the end of the text (right before the closing bracket).
The failure highlighted by #213646 where caused the added
configtext positioned in the wrong line/column due to the Konami Code like type of functional test operation.The fix instead provides a more robust method: it takes the written text in the editor, parse it to JSON, update the JSON and write it back again to the editor.
Will fix the issue #213646 when backported to 7.17.