with_content
and "sharp edges" during testing
#2264
Unanswered
phil-janeapp
asked this question in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
While taking a look at #2157 and after observing several cases in our own code I'm noticing some confusion around properly providing content to a component when testing. I've also noticed at least one error message that's definitely confusing.
Given the following (hopefully syntactically-correct code):
How do you populate the banner content in a test?
Based on documentation provided it seems intuitive that the following would work, but it doesn't:
You then may try the following, only to be greeted by a somewhat confusing error message:
Finally (after a long coffee/tea break to relax) you carefully think through how to handle this in a template, and realize that the following is how it needs to be done:
I don't have any immediate suggestions on improving the interface, but if anyone else feels this is confusing I'll gladly contribute some documentation improvements to make this behaviour more clear 👍
Beta Was this translation helpful? Give feedback.
All reactions