(unit)testing htmx templates #1
lissa3
started this conversation in
Blog post discussion
Replies: 1 comment 1 reply
-
Hi @lissa3 Thank you for reaching out! I do not have much experience with HTMX, however, I can already tell you that you can't test HTMX with the Django test client or with BeautifulSoup: HTMX is a sort of syntax sugar for a collection of javascript written utilities which transforms HTMX to dynamic actions and it heavily depends on browser capabilities. It might be tested with a server side implementation of a DOM (eg NodeJS), but I'd suggest that you look into real browser territory with Microsoft Playwright . I could be that one of my following blog posts is about Playwright and Django, so that might be of help. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Have you any experience with htmx?
Would be great if you could share it. In particular, hx-put or templates rendered after triggers (onload).
Thank you very much.
Beta Was this translation helpful? Give feedback.
All reactions