web
web copied to clipboard
Test/browser setup
I noticed there were no automated tests. I'd wager it is probably effective to start with browser testing than unit tests in the event of some implementation refactoring. This is a setup with Playwright, with the start of some tests. I can continue to expand the tests if this approach is desirable, or change course based on maintainer feedback :+1:
I did have the image snapshots added
$ git status
...
new file: tests/example.spec.ts-snapshots/Prompts-adding-a-new-connection-as-the-call-to-action-when-there-are-no-devices-1-chromium-linux.png
new file: tests/example.spec.ts-snapshots/Shows-the-protocols-as-the-first-step-of-adding-a-device-1-chromium-linux.png
new file: tests/example.spec.ts-snapshots/connect-over-http-chromium-linux.png
new file: tests/example.spec.ts-snapshots/connect-over-serial-chromium-linux.png
but when pushing to my fork I got the message
$ git push --set-upstream origin test/browser-setup
batch response: @PixnBits can not upload new objects to public fork PixnBits/meshtastic-web
error: failed to push some refs to 'github.com:PixnBits/meshtastic-web.git'
When looking for the cause or a needed setting I found
Git LFS on github.com does not currently support pushing LFS objects to public forks.
https://github.com/git-lfs/git-lfs/issues/1906#issuecomment-276602035
The image snapshots could be useful for documentation purposes in addition to quick visual change checks, but with this restriction by GitHub could be an impediment to contributors?
Before moving this PR to a ready state we might need to think through the impact of GitHub's image storage on contributions? https://github.com/meshtastic/web/pull/205#issuecomment-2118979986
I'm in the Meshtastic Discord "server" if that helps \m/
Closing this PR because this work was already merged in #462
I'm glad unit testing is started via #462 👍 This PR was for browser tests 😉 [insert the units tests passed meme]