nyxt icon indicating copy to clipboard operation
nyxt copied to clipboard

Allow dummy renderer to load HTML, then use it in tests

Open Ambrevar opened this issue 2 years ago • 2 comments

As pointed out in https://github.com/atlas-engineer/nyxt/pull/2906#issuecomment-1519710870, the fundamental reason why we need to load GTK to run tests that rely on testing URL and HTML loading is because we heavily depend on on-signal-decide-policy and friends in our core logic, which is only to be found in the GTK renderer.

Indeed, the dummy renderer makes no call to it.

This is problematic in particular with tests, because GTK tests are more cumbersome to write and slower to run (because of all the setup / teardown). Most importantly, we currently cannot run it in the CI.

We could fix it all in one go if we allowed our dummy renderer to do more. After all, loading an HTML file into memory is trivial. Then we already have the dexador dependency to load URLs. So really, it should be just some easy refactoring.

Ambrevar avatar Apr 26 '23 08:04 Ambrevar

I like the approach! When should we tackle this one? Post 3.0 release?

aadcg avatar Apr 26 '23 09:04 aadcg

It's not critical for 3.0, but would make our life easier for sure! :)

Ambrevar avatar Apr 26 '23 09:04 Ambrevar