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

e2e for selecting catalog versions #1212

Merged
merged 1 commit into from
Jul 22, 2024
Merged

Conversation

tplevko
Copy link
Contributor

@tplevko tplevko commented Jun 27, 2024

fix: #1109

@tplevko tplevko force-pushed the e2e_catalog_version branch 2 times, most recently from 3355132 to 61a57e4 Compare June 27, 2024 13:00
@tplevko tplevko marked this pull request as ready for review June 27, 2024 13:32
@tplevko tplevko force-pushed the e2e_catalog_version branch 2 times, most recently from 6ee573f to 1bba1ab Compare July 1, 2024 10:51
@tplevko tplevko marked this pull request as draft July 1, 2024 10:54
@tplevko tplevko force-pushed the e2e_catalog_version branch from 1bba1ab to de831a3 Compare July 1, 2024 10:57
@tplevko tplevko marked this pull request as ready for review July 1, 2024 11:33
@tplevko tplevko marked this pull request as draft July 2, 2024 07:09
@tplevko tplevko force-pushed the e2e_catalog_version branch 6 times, most recently from 19c7447 to ee0457c Compare July 2, 2024 11:11
@tplevko tplevko marked this pull request as ready for review July 2, 2024 11:30
cy.checkCatalogVersion(elementVersion);
});

cy.chooseFromCatalog('component', 'as2');
Copy link
Member

Choose a reason for hiding this comment

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

What do you think about testing with a component which is available only in SpringBoot catalog? It would ensure that the correct catalog is loaded.
I'm not sure that there is one unfortunately. But maybe a component not available in Quarkus, such as spring-event

Copy link
Contributor Author

Choose a reason for hiding this comment

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

this is a good point - changed to spring-event

cy.openSettings();
cy.interactWithConfigInputObject(
'catalogUrl',
'https://raw.githubusercontent.com/tplevko/kaoto-catalog-test/main/index.json',
Copy link
Member

Choose a reason for hiding this comment

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

I think this should be hosted either in a src test folder of this repository or its own repository in KaotoIO.
Also usually a good idea to point to a tag so that the test does not break on main branch here because of changes on the other repository

Copy link
Member

Choose a reason for hiding this comment

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

By default, we're not setting a catalog URL, so what about testing adding http://localhost:5173/camel-catalog/index.json instead? The advantage would be that while we are still checking that we can set a URL, we benefit from using what's already provided.

Copy link
Member

Choose a reason for hiding this comment

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

Update: I tested it and it works 👍

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yes, this should be also usable - changed the test to use http://localhost:5173/camel-catalog/index.json by default

// Wait for the element to become visible
cy.get('[data-testid="visualization-empty-state"]').should('be.visible');
Copy link
Member

Choose a reason for hiding this comment

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

I do not see an explicit wait. So etiher there is no wait or it is by default of the cy.get and in both cases I think we can remove the comment

Copy link
Contributor Author

Choose a reason for hiding this comment

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

thanks for pointing this out - removed the comment

@tplevko tplevko force-pushed the e2e_catalog_version branch 2 times, most recently from 01caf3f to 84f4625 Compare July 22, 2024 09:19
@tplevko tplevko force-pushed the e2e_catalog_version branch from 84f4625 to 311b0dd Compare July 22, 2024 10:19
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.

Awesome, thanks a lot @tplevko

@lordrip lordrip merged commit db7d71a into KaotoIO:main Jul 22, 2024
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support different Camel catalog versions
3 participants