wasp-lang / wasp

The fastest way to develop full-stack web apps with React & Node.js.
https://wasp-lang.dev
MIT License
12.73k stars 1.13k forks source link

Provide clear instructions how to easily test code changes made in waspc/ code #2058

Closed Martinsos closed 2 weeks ago

Martinsos commented 1 month ago

Make it so that if somebody wants to make a change to waspc/ code and test it, it is clear how they can easily do it. Couple of days ago I was in this situation and actually it wasn't very clear to me if there is an example app that I can easily run and use or if I have to create my own in order to test this specific feature I was working on.

@sodic then told me that waspc/examples/todoApp is kept up to date with the latest code always, and since it has most of the features in it, that is actually the best way to quickly test the changes! I was kind of aware if has most of the features in it but wasn't aware it is kept up to date, I assumed it would potentially be broken till the actual release. But, it is actually checked in the CI (if it can build) and some e2e tests run over it (not fully tested though, but is somewhat), and that is great. The only tricky part is getting the env vars set up for it, for all the APIs, but we could also look into how to make that as easy as possible.

TODO:

sodic commented 1 month ago

My setup is described here: https://github.com/wasp-lang/wasp/issues/1883#issuecomment-2069646739

Martinsos commented 3 weeks ago

A bit of learnings: In CI, we check:

  1. That examples/todoApp compiles (both by Wasp and by TS), and that it builds (by Wasp, and then also that generated client/server build further).
  2. That headless-test/examples/todoApp passes e2e (playwright) tests.

This makes the situation a bit more complex, since we don't have a single app that we thoroughly test. This is connected to https://github.com/wasp-lang/wasp/issues/2024 -> which says that this should indeed be just one app, and that we will likely keep the one under waspc/examples/todoApp.

Which one is the right one to recommend here then? I guess waspc/examples/todoApp? Even though it is not tested by e2e tests properly.