Skip to content

[8.x] [Vega] Fix update vega spec in functional tests (#216620)#216675

Merged
kibanamachine merged 3 commits intoelastic:8.xfrom
kibanamachine:backport/8.x/pr-216620
Apr 8, 2025
Merged

[8.x] [Vega] Fix update vega spec in functional tests (#216620)#216675
kibanamachine merged 3 commits intoelastic:8.xfrom
kibanamachine:backport/8.x/pr-216620

Conversation

@kibanamachine
Copy link
Contributor

Backport

This will backport the following commits from main to 8.x:

Questions ?

Please refer to the Backport tool documentation

## 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)
@kibanamachine kibanamachine added the backport This PR is a backport of another PR label Apr 1, 2025
@kibanamachine kibanamachine enabled auto-merge (squash) April 1, 2025 15:46
@kibanamachine kibanamachine merged commit 470455c into elastic:8.x Apr 8, 2025
8 checks passed
@elasticmachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

✅ unchanged

History

cc @markov00

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport This PR is a backport of another PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants