kiali / openshift-servicemesh-plugin

Webpack Plugin to integrate Kiali into OpenShift Console
Apache License 2.0
6 stars 15 forks source link

Add cypress support for the integration use cases #44

Open lucasponce opened 2 years ago

lucasponce commented 2 years ago

The plugin repo should have a cypress suite focused on the integration scenarios.

This effort is different from the regular functional test effort that happens in the main Kiali repo, it shouldn't overlap/duplicate areas of testing.

The scope should be the links between pages and some specific special rendering that happens in the plugin context.

To make it easier, we could follow what other plugins are doing like the KubeVirt one:

https://github.com/kubevirt-ui/kubevirt-plugin/tree/main/cypress

Also, it's out of the scope of this work to include them in any automation system (yet), the ideal would be to have something similar to other plugins, a local script that can launch these tests pointing them to a local cluster with OpenShift + Kiali + Plugin deployed.

PRs that belong to this issue:

Pending Test issues to be implememented:

lucasponce commented 2 years ago

I can start this task by adding a skeleton setup that allows adding initial coverage to the integration.

It would be out of the scope to "automate" it, this first step would help to run tests in a development scenario to avoid manual testing.

lucasponce commented 2 years ago

I've started an investigation on this task, and it seems that cypress has known limitations with cross-origin iframes , which is the current design that the plugin uses

https://docs.cypress.io/guides/guides/web-security#Cross-origin-iframes https://github.com/cypress-io/cypress/issues/136

I did some experiments based on those workarounds and comments from cypress users but don't work well on my tests (too many flaky tests).

So, this task may be put on hold until it can be dedicated more time and the cypress community show some progress.

I hit what most of the users reported in that thread.

ScriptingShrimp commented 9 months ago

I crated this draft https://github.com/kiali/kiali/pull/6892 Please lets discuss what is optimal way how to authorize into OCP web console. Preserving/triggering regular authorization for Kiali web app or a backed might be vital for overall testing.