kiali
kiali copied to clipboard
[Cypress] Mismatched node type graph fix testing
This is a little test case related to this issue fix from 1.48.
It toggles the node graph on the services/
@matejnesuta there's a CI failure for the newly added test if you wouldn't mind looking into it: https://github.com/kiali/kiali/runs/8243955353?check_suite_focus=true
Looking at the screenshot right now. The page seems fine. My first guess is that the 'exist'
should be replaced with 'be.visible'
. @nrfox
And it failed again. I will investigate it tomorrow I think.
If you see the image from the failing test: https://github.com/kiali/kiali/suites/8198803432/artifacts/357005649
The node link is disabled because there is no service selected (No namespace is selected). When I run this test locally I don't have that error.
You are right. Didn't see that yesterday. The namespace is selected, but it takes time to load the graph. That's why it failed probably. The thing is, the tests are passing locally for me as well, so it's hard for me to predict what's gonna flake.
Added a codition that the mini-graph should be visible before the click happens. I hope everything will be good now.
Added a codition that the mini-graph should be visible before the click happens. I hope everything will be good now.
I think this is more related to the order in which the steps are performed. If you notice, the file is expecting to have an ordered list of steps (Given, when, then, and, ...). But when is breaking the sequence.
I think this is more related to the order in which the steps are performed. If you notice, the file is expecting to have an ordered list of steps (Given, when, then, and, ...). But when is breaking the sequence.
I don't think so. The preproccessor doesn't care about the gherkin keywords. For example, this gherkin line ( But user sees a minigraph
) can be translated with this typescript Then('user sees a minigraph', () => { ... });
, even though the keywords are different and it doesn't make much sense visually.
So, looking at the code, the "Show Node Graph" link action is using data from the xhr call to create the url params. It looks like it haven't finished (From the screenshot). So, I will add a condition to wait for the xhr call before perform the click action in that link. That could explain why this test is working in my environment (Is pretty quick), but not in CI.
I think I fixed the test and it looks like it's passing in the CI.