chenglou / chenglou/node-huxley
Default Workflow seems like a bit of a hand grenade for juniors
- Dominant language
- JavaScript
- Stars
- 358
- Forks
- 24
- PR merge metrics
- No merged PRs in 30d
Description
preface: I had a little look into the history of the default workflow after writing this issue and why it came about through the issues, so I sort of understand if there's reluctance to go back to screenshot commit and diff testing rather than this git workflow, possibly what I want isn't right for the project (in which case I might tend towards a fork). Close this if you think it's not applicable, but I need to get it off my mind as it's my main roadblock in bringing huxley as a core piece of my front-end workflow right now. The search for a good screenshot regression testing workflow continues I guess.
---
Hey there, this might seem a bit critical but it's only because huxley is, for me, so close yet just a little too cumbersome for use in a design heavy project where I'd like to screenshot every design component, possibly with a number of permutations.
The main problem for me is the default workflow, which is enough of a hand grenade for juniors that if it messes up their repository state, they can get confused about the correct steps to recover their work. I really believe the only tools that should mess with git should be version control tools, which this isn't, and I shouldn't have juniors thinking twice about running huxley because their repo wasn't in the right state. IMO the default should instead be something completely non-destructive, I'd think the best default would be a simple fill in the gaps approach where:
if there are tests without a recorded set of actions or screenshots missing, the CLI lists them out and then asks if you'd like to fill them out:
```
$ hux project/Huxleyfile.json
The following tests are missing recordings or screenshots:
InputLockup
SearchPanel
WidgetList
Do you wish to record and write screenshots for them now [Y/n]
```
...and if the recordings and screenshots ARE in place, runs through the lot with a less verbose output, grouped by Huxleyfiles, ie:
```
$ hux project/Huxleyfile.json
./project/Huxleyfile.json
InputLockup 1 ✔ 2 ✔
SearchPanel 1 ✔ 2 ✔ 3 ✔
WidgetList 1 ❌ diff at project/Huxleyfile/WidgetList.hux/firefox-1-diff.png
```
The only other thing I'd potentially want here would be an 'update' mode, where you can run through the entire set of tests, and if the test fails, have a chance to look at the result and see whether you want to replace the existing screenshots or not.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start at the CLI entry point that handles a Huxleyfile and trace the current default workflow for recordings, screenshots, and git state. Compare that behavior with the proposed missing-test listing, fill-in flow, grouped results, and optional update mode; done means the workflow is non-destructive and clearly reports or updates the requested artifacts.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- frontend, testing
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100