tetra-framework / tetra

Tetra - A full stack component framework for Django using Alpine.js
https://www.tetraframework.com
MIT License
540 stars 15 forks source link

Missing tests #32

Open nerdoc opened 1 year ago

nerdoc commented 1 year ago

There are no tests in tetra.

If you tell me what testing framework you prefer (Django unit tests, pytest/pytest-django, etc.) I can help at least with adding some backend tests, , e.g. using the demo site.

samwillis commented 1 year ago

Ha, yes. Thats a little embarrassing really...

PyTest (with Playwright for integration) are my preferred tools.

Something I want to do I provide a simple way for devs to setup PyTest/Playwright for their own Tetra components.

nerdoc commented 1 year ago

Do you want to include tests into the demosite, as there already is a django project to use for tests? I always had problems setting up pytest "standalone", without a full django project (just with those runtests.py, conftest.py etc).

bittner commented 10 months ago

@nerdoc Did you ever start with the tests? Did you also plan to add a CI setup?

If it helps, I could add something like this as a test infrastructure:

The setup would be similar to what you can find in this Django project example, but with GHA for GitHub.

Interested?

nerdoc commented 10 months ago

HM, no. As tetra seems to be dead (at least Sam seems to have no time for maintaining it), I switched to using HTMX...

nerdoc commented 3 months ago

@bittner Wind is changing again ;-) As I took over the development of tetra, I added basic tests, at least for some of the blocks and backend things, see in the "tetra-package" branch (soon to be merged).

I never used tox, but the tests are run with pytest ATM. CI in GH is set up and working as well.

I don't know well how to test the frontend parts. I've never used a Js frontent test engine. MochaJs (X,=nodejs), Jest(X, more for React etc), Jasmine(BDD!), Karma(needs Browser?), Cypress(component testing!!, supported by PyCharm IDE), Selenium (uuuaaargh...)