-
Notifications
You must be signed in to change notification settings - Fork 39
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
WebGL canvas not included in Test.Html tests #210
Comments
Random notes:
It uses Which creates an actual Which is not pure and requires a DOM implementation, which no runner has, and does not want. Random guess: It’s not possible to fix this in elm-explorations/test. |
Maybe this is something that should be addressed in elm-explorations/webgl then? In other words, perhaps the implementation could be modified to be more test friendly? Edit: Fixed typo, had written elm-explorations/test instead of webgl 🤦♂️ |
Here elm-explorations/test converts Elm Virtual DOM nodes to JSON, I'm pretty sure it can be made to understand the
We do not need to evaluate this in order to write assertions. The |
My understanding of this might be off, but this is what a “custom” vdom node looks like: I thought calling that calling Do you mean that one could look into (The only other thing I know of that uses “custom” is elm-explorations/markdown: https://github.com/elm-explorations/markdown/blob/5fdbf4433c0d7942ec2bf7db22c6a19c3e1770f4/src/Elm/Kernel/Markdown.js#L15) |
I mean, in the simplest case it could deduce that a given custom node is a webgl one and just output I'm not sure how useful this would be for testing webgl. If the goal is to write assertions for webgl options and entities, then this could be somehow expanded in json too. |
How? |
By introspecting the |
In conclusion: Possible, but requires heuristics, higher effort than reward? |
For some larger context: |
Yes, for context, elm-pages shares the html-to-string logic from the elm-test codebase and I try to keep it in sync with the upstream code. Even if there isn't any useful content in the server-side rendered canvas, it would be nice to support this in the case of elm-pages for compatibility. The initial page hydrates from the server-rendered HTML and the goal is to have the exact same HTML in the server-rendered HTML and the initial |
If I write a test that expects for a canvas tag to be present, it will fail if the canvas tag was created with
WebGL.toHtml
(it will pass if the canvas was created withHtml.canvas
)SSCCE: https://ellie-app.com/kfR9HFsqPQDa1
The text was updated successfully, but these errors were encountered: