Add unit tests and tests for UI elements #230
Comments
First pull request, #261 |
@j4qfrost how can I help? |
@jamespotz I took a peak at your github profile to tailor my advice a bit. Hopefully I gauged your level appropriately and didn't come off as patronizing. If you are beyond the basics for writing tests, you can ignore this section. Here are some nodejs libraries that might give you a bit of familiarity with what I want to do: Unfortunately, the testing libraries for rust are still in the early stages, but if you want to get better overall at testing, you can practice with your own projects using those libraries, if you just want to jump right into writing tests for neovide, below are some starting points. These are some of the easier files to write tests for: You can use these as a reference: Feel free to rewrite or improve some of the tests as practice. There may be some cases I missed. If you get stuck, make notes about what confuses you and how you might approach the problem conceptually. Ping me on gitter and I'll respond when I'm free. |
@jamespotz I'd like in on this too can I work on a component? |
@zacck I can't give you a great answer, since I need to refamiliarize myself with the codebase, but aside from OS specific and dependency issues, the most issues that arise in the code are in the font and windowing. Windowing is often out of our hands and has changed a lot over time, so I don't think that writing tests for windowing are too productive currently. This might be a good starting point. https://github.com/Kethku/neovide/blob/main/src/renderer/fonts/caching_shaper.rs |
@j4qfrost I can start there, thank you so much |
One of the difficulties I see with testing this is getting a render of the app which can be compared to an expected output. I'm not sure how that would work, and without it I'm not sure how we would write a full end to end test for the UI portions/windowing problems |
I want to preemptively start this thread to survey for suggestions. A cursory search lead me to this promising repository https://github.com/enigo-rs/enigo
Since closing the window is a common point of failure, that will be the focus for the first pass of testing as I learn how to use the library.
Components for testing:
The text was updated successfully, but these errors were encountered: