Closed lknop closed 7 years ago
Thanks for the PR. Could you also add a test for nested fragments please?
Sure, that's a good idea. I also have a fix to break out of recursion when there are mistakes in the definitions, I'll add that too.
I set the maximum level of nesting to 5. Unfortunately I needed to add a browser.wait
in the test since sometimes the browser did manage to load all the content but sometimes it did not, waiting makes it 100% reliable.
Thanks for this PR @lknop and apologies for the delay in getting around to looking at it. I've pushed back a slightly different implementation based on your submission:
thymeleaf-fragment.js
that adds a CSS class to the body. The tests then wait for this to be present before asserting. This has the advantages that it tests the holdReady
part of the implementation and that tests don't need custom wait conditions.Let me know if you encounter any problems with this implementation.
This PR fixes #2 adding support for nested fragments in the templates