Open AWolf81 opened 6 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.
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
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.
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):Todos UI
Watch usage
. Maybe we could also change to a json reporter so it's easier to get the output - not sure if this is working with interactive mode.a
keyf
keyp
&t
key with a input fieldq
keyenter
keyCommand handling
runTest
generator intask.saga
that's listening for a Redux action that will pass the command to the test child process. So you have to usetake(stdioChannel)
andtakeEvery(TRIGGER_TEST_COMMAND, handleTestCommand)
inside awhile(true)
loop.handleTestCommand
will usesendCommandToProcess
to send the command passed with the actionTRIGGER_TEST_COMMAND
to the test child process.Edge cases