Skip to content
This repository has been archived by the owner on Nov 27, 2023. It is now read-only.

Fix flaky code-editor-actions actions test #1836

Merged
merged 1 commit into from
May 24, 2023

Conversation

tplevko
Copy link
Contributor

@tplevko tplevko commented May 23, 2023

Found the source of instabilities for code-editor-actions tests in Chrome and Edge. The backend updates the yaml in editor on save - changing the indentation. This change is sometimes detected, sometimes not by the monaco editor, but only on these two browsers - didn't see this error in FF. I also didn't find too much about the "undo" function. The alert is therefor a bit unpredictable, however the test was adjusted to verify the alert after the second "undo" invocation, where the alert fires regularly.

@tplevko tplevko requested a review from a team May 23, 2023 15:46
@sonarcloud
Copy link

sonarcloud bot commented May 23, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
1.5% 1.5% Duplication

Copy link
Member

@lordrip lordrip left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for investigating this @tplevko 💪

@lordrip lordrip merged commit 7fbe3a8 into KaotoIO:main May 24, 2023
@lordrip
Copy link
Member

lordrip commented May 24, 2023

I also didn't find too much about the "undo" function. The alert is therefor a bit unpredictable, however the test was adjusted to verify the alert after the second "undo" invocation, where the alert fires regularly.

Expanding a bit on what you're mentioning @tplevko, does this mean that the very first undo click doesn't work? If that's the case maybe there's a bug on the UI side then 🤔

@tplevko
Copy link
Contributor Author

tplevko commented May 24, 2023

@lordrip actually yes - this is however related to the way the editor handles the imported integration from file - e.g. the EipAction.yaml get's imported - is a valid yaml, but it actually contains indentination and some characters (e.g. double quotes instead of single quotes), which are actually replaced in the UI after the roundtrip to the backend, where the integration is parsed and the result is sent to the UI.

In this case - the first "undo" click really does nothing besides reverting the integration to the one which was imported.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants