Should I run the tests automatically as part of some workflow?
On pre-commit hook? (this wouldn't cover external PRs but it would be simpler than Github Actions, since it would rely on a local environment, instead of needing to figure out running Caddy/Docker/Rails in a CI pipeline).
Frontend tests:
[ ] Back-to-top behavior.
[ ] Test mobile UI and behaviors
A basic test of the mobile play button (that it plays the song, just like the sidebar play button does—see that test).
Testing the existence and behavior of the off canvas navs (includes visual display, close via ESC, close via overlay click, close on song navigation, and scroll locking).
Confirm that you can interrupt a playing song with song updates (new song, tempo change, note change, etc)
I'm not sure I want to put a test for this, because I feel like the current behavior could change to allow updates mid-song.
Test that a tempo corresponds to a specific scroll speed
That feels tricky and implementation specific, and that work could be nullified if update it so ToneJs drives the scroll-speed, (instead of having our own page-scroller), so I think I'll hold off on that for now.
Scroll manually over a note and confirm that the note is triggered.
I tried to set this up and got the stub working, but I had a hard time getting the observer to fire consistently on scroll.
Here are some more ideas for Cypress tests that I came up with while working on https://github.com/bryanbraun/music-box-fun/issues/13. They are in rough order of value.
Automation:
Frontend tests:
Tests including API functionality:
Tests I won't do for now:
.hovers()
so we'd have to use one of their recommended workarounds.