webxdc / store

XDC store, migrated to codeberg
https://codeberg.org/webxdc/store
5 stars 0 forks source link

Setup frontend testing CI #36

Closed link2xt closed 1 year ago

link2xt commented 1 year ago

It would be nice to setup some CI for the frontend.

Nothing fancy, no end-to-end testing against the bot, just mock the basic webxdc APIs and e.g. have a test that when the .xdc is opened, the app list is displayed, then when update is clicked an update request is sent, then when an update arrives the app list refreshes and has an new/updated app in it.

Even one such test would help catching regressions that happen due to dependency updates or a syntax/method name error in JS that throws an error in the browser engine.

We are using testcafe in desktop: https://github.com/deltachat/deltachat-desktop/pull/3251 cypress is also good

adbenitez commented 1 year ago

once this issue is solved then https://github.com/webxdc/appstore-bot/issues/78 can be worked on

Septias commented 1 year ago

I've looked into this and found that it is pretty hard to test anything useful without backend communication (I also made a comment in #116). The best setup for testing though is definitely vitest + @solidjs/testing-library as stated here: https://docs.solidjs.com/guides/how-to-guides/testing-in-solid/vitest