filecoin-saturn / L1-dashboard

https://dashboard.saturn.tech
Other
6 stars 4 forks source link

FILE-13 - Add more test coverage #57

Closed gitstart closed 10 months ago

gitstart commented 1 year ago

What does this PR do?

Issue reference

https://github.com/filecoin-saturn/L1-dashboard/issues/50

Demo video/scrennshot:

Added unit tests for each component image

Added E2E test for app image

Added E2E test for WebUi mode

image

Demo E2E

https://www.loom.com/share/c1fa9d4d5cfd418badf6b4f0e93ad38d

Coverage snapshot

image image

This code was written and reviewed by GitStart Community. Growing future engineers, one PR at a time.

gitstart commented 1 year ago

env for webui

env for embed mode

gitstart commented 1 year ago

@guanzo this PR is ready for review

gitstart commented 1 year ago

Not really familiar with FE or its testing, but, a lot of these assertions seem to be just asserting what the code is telling it to be. If we define button to have a width of X why would it be Y on the test?

Thank you for the question. The test is of two kinds, an e2e test and a unit test The e2e test uses Puppeteer to ensure that the features work from end to end on the browser and no new additions break existing features. Same as the unit test. It ensures that it renders as expected with the appropriate parameters and that future additions would not cause breaking changes.