You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Right now, every time a new render tree is created during a test, the markup and DOM nodes are recreated. That causes some issues (#46, #47) and probably has an impact on performance.
A better solution is to do what Blazor does -- i.e. update the initially created DOM tree using the RenderBatch created after each render. Since AngleSharp more or less is a complete W3C implementation of the DOM api, it should be possible to port the Typescript logic from Blazor to C#, so wheels do not have to be reinvented.
The text was updated successfully, but these errors were encountered:
@FlorianRappl that would be awesome. This is one of the harder issues, and certainly one you would be ideally suited to tackle, so I would love any help I can get with this.
It would also enable other more advanced scenarios in the future, such as running component's JavaScript, and have a much better e2e testing experience of Blazor components, that rely heavily on JavaScript.
Besides that, and making things go faster, my goal with this is also to make elements in the DOM be reusable across renders, i.e. if an element is not removed during a test, the same element reference can be reused in a test to assert against during the test, across multiple renders. The hack right now is my AngleSharpWrappers, but they only work through my Find and FindAll extension methods.
Where to start
I remember hearing @SteveSandersonMS talking about actually using AngleSharp in the early days of Blazor, so maybe there is some C# code for updating a AngleSharp based DOM available somewhere, perhaps here.
If that is out of date, which is likely, then it looks as if the TypeScript that needs to be converted is centered around the BrowserRenderer.ts#updateComponent method.
Right now, every time a new render tree is created during a test, the markup and DOM nodes are recreated. That causes some issues (#46, #47) and probably has an impact on performance.
A better solution is to do what Blazor does -- i.e. update the initially created DOM tree using the
RenderBatch
created after each render. Since AngleSharp more or less is a complete W3C implementation of the DOM api, it should be possible to port the Typescript logic from Blazor to C#, so wheels do not have to be reinvented.The text was updated successfully, but these errors were encountered: