-
Notifications
You must be signed in to change notification settings - Fork 6
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
✨ - Use htmx to async update messages. #342
Conversation
Is it possible to unit test? (if not then should we really use it?) |
It uses the same logic as the previous implementation except async. The actual implementation is iirc 4 properties, testing those would just be retesting the htmx library. |
I still think this should be tested. If unit testing is not a good idea, end-to-end tests could be introduced |
Ok, let's see if I can add some webtest to test the integration. |
Codecov Report
@@ Coverage Diff @@
## develop #342 +/- ##
===========================================
+ Coverage 96.41% 96.45% +0.03%
===========================================
Files 433 433
Lines 13140 13354 +214
===========================================
+ Hits 12669 12880 +211
- Misses 471 474 +3
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
@annashamray I've added a selenium test for this. |
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.
Does seem like a bit of HTML magic, but lets try this out.
@annashamray see if you can help Sven with the requirements FIXME for adding selenium
@alextreme dependencies didn't compile because there was a version conflict between our |
Great thanks @annashamray ! |
@@ -9,6 +9,12 @@ | |||
{% if data_confirm_title %}data-confirm-title="{{ data_confirm_title }}"{% endif %} | |||
{% if data_confirm_cancel %}data-confirm-cancel="{{ data_confirm_cancel }}"{% endif %} | |||
{% if data_confirm_default %}data-confirm-default="{{ data_confirm_default }}"{% endif %} | |||
{% if async_selector %} | |||
hx-{{ method|lower }}="{{ action|default:"./" }}" |
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.
action
variable is not documented in template tags
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.
action
is not documented again
src/open_inwoner/components/templates/components/Form/Form.html
Outdated
Show resolved
Hide resolved
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 be merged after Anna's approval
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.
Polling doesn't work on my local machine. Does it work for you?
src/open_inwoner/components/templates/components/Messages/Messages.html
Outdated
Show resolved
Hide resolved
src/open_inwoner/components/templates/components/Messages/Messages.html
Outdated
Show resolved
Hide resolved
yes |
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 have one remark about documentation which is not resolved
Polling still doesn't work for me, but maybe the problem is in my config, so I'll approve after the template variable is documented
@@ -9,6 +9,12 @@ | |||
{% if data_confirm_title %}data-confirm-title="{{ data_confirm_title }}"{% endif %} | |||
{% if data_confirm_cancel %}data-confirm-cancel="{{ data_confirm_cancel }}"{% endif %} | |||
{% if data_confirm_default %}data-confirm-default="{{ data_confirm_default }}"{% endif %} | |||
{% if async_selector %} | |||
hx-{{ method|lower }}="{{ action|default:"./" }}" |
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.
action
is not documented again
@Bartvaderkin @svenvandescheur My steps:
|
I made screencapture: |
Thanks! I'll test it on our test env after deployment and will try to understand why it doesn't work locally for me |
No description provided.