Coding overhaul, failed, frustrated, Christmas break.
Not sure how much time I'll have today, but I hope I can finish the ui improvements I decided to do two days ago.
- replace "Next" with "Next lesson" or "Chapter x: x x x" if it's the last step.
- done
- a tooltip that displays when hovering over the disabled "Next" button and explains to the user they need to submit first
- done. Not sure I like it, though, but I'll leave it for now
- fix wrong step loading on refresh
- done
Now to tackle the issues discovered yesterday
- failed tests not displaying nicely, raw output shown
- run cmd called twice on submit
When I submit and something goes wrong, the submit button just keeps spinning. I should display a user friendly message and enable the button again.
I need to move my whole validation logic to the driver backend for the failed tests to work. The way I've been doing it (regex) is just not working, so I need to use structured output. To use structure output, I need to write to a file. So, I'm going to do the following
-
new endpoint POST submit/test
- request
- checks[]
- type (TestPasses, OutputContains, FileContains)
- value
- message
- file (for FileContains types)
- checks[]
- response
- failedChecks[]
- type (TestPasses, OutputContains, InputContains)
- value
- message
- TestOutput (xml format)
- failedChecks[]
- request
-
does the following:
- performs input checks
- if pre-run checks fail, returns early
- runs dotnet test -l "trx;logfilename=/tmp/results.trx"
- reads file, deletes file
- performs TestPasses check and Output checks
- returns result
I had to rip everything apart, I did so many changes I no longer know what I'm doing, spent the whole day coding.
I got it to work, finally, I also don't have the time to test all chapters thoroughly, I expect there to be more issues, especially at the regex part (which I also completely redesigned).
The step that requires the tests to fail doesn't work now, so I'll tackle that later.
So basically I spent the whole day to end up with less working features than I started with. NOT happy at all.
Tomorrow is Christmas, and my fiance is going to lose her shit if I touch the computer, so I probably won't be doing any work.