-
Notifications
You must be signed in to change notification settings - Fork 176
Adds missing callback functions in container #4257
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
base: main
Are you sure you want to change the base?
Conversation
…://github.com/SAP/luigi into 4249-container-add-missing-callback-functions
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.
there are still some missing callbacks, e.g. pathExist, getCurrentRoute, ...
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.
LGTM
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.
Extending the e2e test setup to check the whole flows could help a lot.
See https://github.com/SAP/luigi/blob/main/container/cypress/e2e/test-app/iframe/iframe-container.cy.js,
LuigiClient.linkManager().getCurrentRoute(); |
LuigiClient.linkManager().pathExists('/projects/pr2'); |
target.postMessage( | ||
{ | ||
msg: LuigiInternalMessageID.SEND_PATH_EXISTS_ANSWER, | ||
data: { exists } |
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.
correlationId
in the data object is missing.
Take a look here
LuigiClient expects a correlationId
to resolve the correct promise.
target.postMessage( | ||
{ | ||
msg: LuigiInternalMessageID.SEND_CURRENT_ROUTE_ANSWER, | ||
data: { route } |
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.
correlationId
in the data object is missing.
Take a look here.
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.
In addition I think it would make sense that we extend the current function https://github.com/SAP/luigi/blob/main/container/test-app/iframe/microfrontend.html#L210
using the promise and add a corresponding e2e test.
Same for pathExists
Description
Changes proposed in this pull request:
Related issue(s)
Resolves #4249