-
Notifications
You must be signed in to change notification settings - Fork 28
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
Conversation
3355132
to
61a57e4
Compare
packages/ui-tests/cypress/e2e/designer/catalogs/quarkusCatalog.cy.ts
Outdated
Show resolved
Hide resolved
6ee573f
to
1bba1ab
Compare
1bba1ab
to
de831a3
Compare
19c7447
to
ee0457c
Compare
cy.checkCatalogVersion(elementVersion); | ||
}); | ||
|
||
cy.chooseFromCatalog('component', 'as2'); |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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', |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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 👍
There was a problem hiding this comment.
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'); |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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
01caf3f
to
84f4625
Compare
84f4625
to
311b0dd
Compare
There was a problem hiding this 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
fix: #1109