Open jnaviask opened 1 year ago
@alexyoung23j: feel free to consult with @mhagel, @NakulManchanda, and @ianrowan on this ticket, as they've recently implemented similar testing libraries for Cosmos / ETH. There will likely be differences in implementation, as Snapshot is not a blockchain, but they can help you understand the scope of work involved in setting up a testing fixture.
yes, do let me know about writing any kind of automated test or set up infrastructure on local or on heroku. Thanks!
@alexyoung23j @ianrowan @mhagel
unit/integration/e2e testing On backend server side - we have place to write all three, we just have to capture existing behavior before we make a switch. After @ianrowan we can run same tests again on backend
Current coverage on backend for Snapshot tests
subscriptions.spec.ts
have few test
describe('SnapshotProposal /createSubscription test', () => {
describe('/viewNotification Snapshot Proposals', () => {
On frontend, coverage anyways is little light:
We can add new snapshots.spec.ts
We don't have mocking api response support on frontend.
There are two ways i found for mocking responses for frontend:
We should start with mocking /snapshots
or /cosmos
endpoints only
FYI @kurtisassad - see comment above https://github.com/hicommonwealth/commonwealth/issues/3557#issuecomment-1520805794
It may help closing blocked PR on testing frontend controller like: https://github.com/hicommonwealth/commonwealth/pull/3391
Description
Related to #3347. We should come up with a plan to build unit/integration/e2e testing for Snapshot. We will likely either need some sort of testing server/apparatus, or else detailed mocks for snapshot cases.
Acceptance Criteria