-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
[18.0][MIG] web_datetime_picker_default_time: Migration to 18.0 #3024
base: 18.0
Are you sure you want to change the base?
[18.0][MIG] web_datetime_picker_default_time: Migration to 18.0 #3024
Conversation
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.
Seems good.
It's a shame we don't have unit tests, though.
How do you feel about adding some?
5b6b95e
to
39dc87c
Compare
Hi @ivantodorovich , I added some test cases for this module. |
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 a lot!
As far as I remember, and as far as I can see on the CI logs, we need to explicitly execute these tests from a python test.
Here's an example on a 16.0 module: https://github.com/OCA/web/blob/16.0/web_domain_field/tests/test_qunit.py
@@ -191,7 +191,7 @@ const config = [{ | |||
}, | |||
|
|||
}, { | |||
files: ["**/*.esm.js"], |
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.
These files are synchronized from time to time from the https://github.com/oca/oca-addons-repo-template
This change will then be lost..
I recommend to simply use the .test.esm.js
suffix on your filename, then it'd be selected by this existing pattern
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 tried using the suffix .test.esm.js
, but Hoot doesn't work with this file extension. The guy in this video mentioned that test files must end with .test.js
.
Test your JS Code with Hoot
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 good but setting of default time while entering manually the date with keyboard does not work. (it used to in v16.0)
92c62f1
to
95bd7a9
Compare
Hi @grindtildeath , I resolved issue |
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.
The code has gotten a lot more complicated than before. But I think it's mostly due to the amount of full overwrites we have in here, which should be avoided as much as possible
If you could try to reduce them, that'd be great
} | ||
}; | ||
|
||
const onInputChange = (ev) => { |
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.
Can we avoid re-defining methods that we don't want to override/change?
If the method is exactly the same as the original, then you can probably reference the one in originalService
|
||
const listenedElements = new WeakSet(); | ||
|
||
// OVERRIDE: |
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.
See my other comment about trying to keep here only the methods that are actually overriden
95bd7a9
to
39dc87c
Compare
No description provided.