Dashibase / lotion

An open-source Notion UI built with Vue 3
GNU General Public License v3.0
2.79k stars 132 forks source link

test: adding tests #47

Closed vvidday closed 2 years ago

vvidday commented 2 years ago

As more features are being added, it would be great if we can set up automated tests to verify the correctness of any changes and ensure new changes don't break current features.

This is a very rough draft using cypress which includes some basic tests for Lotion::split, Lotion::merge, Block::getCaretPos and Block::getCaretPosWithoutTags.

Would greatly appreciate any input/suggestions on the approach/organization etc or if anyone would like to suggest another testing library. Wanted to check on this approach before I proceed to write more tests covering the existing features.

Example run ![test-draft](https://user-images.githubusercontent.com/45852430/183296724-24001a50-d1e4-44ee-ac1c-c016f59d4da0.gif)
greentfrapp commented 2 years ago

Hey @vvidday thanks for looking into this! I've actually been meaning to add E2E tests via Playwright but I have limited experience with that at the moment. Would love to chat about this!

greentfrapp commented 2 years ago

Closing this - deprecated by #48