web icon indicating copy to clipboard operation
web copied to clipboard

Test/browser setup

Open PixnBits opened this issue 1 year ago • 2 comments

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:

PixnBits avatar May 18 '24 19:05 PixnBits

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?

PixnBits avatar May 18 '24 19:05 PixnBits

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/

PixnBits avatar Jul 09 '24 01:07 PixnBits

Closing this PR because this work was already merged in #462

KomelT avatar Feb 27 '25 10:02 KomelT

I'm glad unit testing is started via #462 👍 This PR was for browser tests 😉 [insert the units tests passed meme]

PixnBits avatar Feb 27 '25 22:02 PixnBits