joshwcomeau / guppy

🐠A friendly application manager and task runner for React.js
ISC License
3.27k stars 154 forks source link

Change test script to interactive mode #328

Open AWolf81 opened 5 years ago

AWolf81 commented 5 years ago

At the moment, tests inside Guppy are running once and the user need to re-run manually. As @joshwcomeau mentioned in a comment that's a temporary hack.

It was a good idea from Josh to do this later as this is a pretty large task. But maybe two people could work on this. One for implementing the UI with jest-stare and the other for parsing/handling the interactive commands. But it's also possible to tackle this with-out splitting - just do it like this: First UI then command handling or start with a minimal temporary UI and work on the business logic first then improve UI.

Is your feature request related to a problem? Please describe. UX could be better if it would be possible to use interactive mode.

Describe the solution you'd like By removing line 188 to 190 in task.saga. We're running in interactive mode and the output in a terminal will look like in the following screenshot (ran in a real terminal as the Guppy output seems to be filtered): grafik

Todos UI

Command handling

Edge cases

superhawk610 commented 5 years ago

https://github.com/Raathigesh/majestic looks like a cool Jest front-end that fits better with Guppy's UI out of the box, perhaps another option to consider.

AWolf81 commented 5 years ago

Good idea. Maybe we could use it as starting point, inspiration for the UI or directly integrate it. I like the navigation through the test files but I have some points I don't like:

Guppy tests in Majestic grafik

How would we add the testing pane? I think it would be good if we could have a second project page so we're getting more space for the UI. I don't like to add this into the modal or would this fit into the modal?

If we would use Majestic would we create a fork (so we can customize the UI & add features) and launch it with npx https://github.com/forked-majestic? Or should we add it as submodule and run it with-out npx (probably a better dev. experience)? Once the server is started, we could show the Majestic server output in an iframe.