-
Notifications
You must be signed in to change notification settings - Fork 3
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
feat: add e2e tests for config-import. #700
Conversation
Additionally: * added `translation` getter in `mapeoProject` * `deleteAll(translation)` in import config
…onfigImporte2eTests
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'll give this a more thorough review on Monday, but found a few small things for now.
* make `deleteTranslations` a closure, pass the logger * `deleteTranslations` avoid for loop, use Promise.all(map) * make failing test case instead of logging
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.
Looks like tests are failing. Could you fix those?
So, the issue with the failing test is the following:
|
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 like the way you've enforced that imports only happen sequentially. Just a few more little things from me.
Co-authored-by: Evan Hahn <[email protected]>
…core-next into feat/configImporte2eTests
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 once we move to this.$translation.dataType
(happy to discuss alternatives) and fix the failing test.
I've changed the failing tests so that it now expects an error being throwed. Despite that, the test still fails... |
Co-authored-by: Evan Hahn <[email protected]>
…onfigImporte2eTests
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 once we fix tests.
should close #482
Additionally this adds code to
MapeoProject
. Specifically:translation
as a getter (only used in tests, but may be useful in the future)There's a test case where I try to load the default config twice in parallel that results in - what I think - unwanted expectations. Basically we get double the presets, fields and translations since when each config is loaded there's no docs to delete.
We should think if this is a valid (possible) case and how we can fix the code to avoid this?