Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Skipping the Gateway API tests when Gateway API is not enabled using Cypress hooks #6105

Merged
merged 1 commit into from May 23, 2023

Conversation

matejnesuta
Copy link
Contributor

@matejnesuta matejnesuta commented May 4, 2023

There has already been some usage of the tags in the gherkin code. However, you can also use Cypress hooks with these to allow for some specific setups or teardowns when needed. This PR is meant to be a PoC of this Cypress feature.

To demonstrate this:

  • setup Kiali without the Gateway API
  • run some of the feature files, which contains the @gateway-api tag
  • you should see those specific tests to be skipped/pending passing instead of running and failing due to the Gateway API not being enabled

This approach might be useful in the future for the multicluster testing or the parallel execution of the Cypress suite. I am also planning to resolve the #6073 issue in a similiar fashion.

Props to @ScriptingShrimp for guiding me through this.

@matejnesuta matejnesuta added the test: front-end/cypress PR adds/updates front-end tests (unit and/or cypress automation ) label May 4, 2023
Copy link
Collaborator

@jshaughn jshaughn left a comment

Choose a reason for hiding this comment

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

I think this looks OK to me now that tests are not being silently skipped, and instead the required CRD is getting installed prior to the test.

@jshaughn
Copy link
Collaborator

@ScriptingShrimp Do you approve, shall we merge this one?

Copy link
Contributor

@ScriptingShrimp ScriptingShrimp left a comment

Choose a reason for hiding this comment

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

LGTM!

@ScriptingShrimp ScriptingShrimp merged commit 962b6f2 into kiali:master May 23, 2023
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
test: front-end/cypress PR adds/updates front-end tests (unit and/or cypress automation )
Projects
Development

Successfully merging this pull request may close these issues.

None yet

3 participants