envoylabs / whoami-ui

A UI for the whoami NFT-based nameservice
whoami-ui.vercel.app
Apache License 2.0
9 stars 3 forks source link

Regression tests #65

Open the-frey opened 2 years ago

the-frey commented 2 years ago

Need simple regression tests for navigating to the main pages of the app.

danwlsn commented 2 years ago

Going with cypress for the integration side of testing. I'll try and add as many happy paths as I can find but might need help highlighting some hairier paths through the application.

the-frey commented 2 years ago

Cypress makes sense.

Probably priorities in terms of user 'footfall' are:

  1. Mint
  2. Register/search page (/tokens/register)
  3. Public/serarch page (/ids/search)
  4. View pages (/ids/<id>, /tokens/<id> and the two variants: /dens/<id> & /<id>)

It feels like we should test /tokens/manage and /addresses/<address> but those are probably lower priority as AFAICR they are just read-based 🤔

Burn might be worth testing... although we have almost no evidence people are even burning.

danwlsn commented 2 years ago

Hmmm, really struggling to "log in" as a wallet with cypress. First tried loading keplr as a browser extension in cypress; that was a no-go. Now attempting to stub hooks/useSigningCosmWasmClient to return a wallet address to state and bypass keplr. Any guidance here?

the-frey commented 2 years ago

Interesting. I wonder what other people are doing. From a five-minute scan of other repos, there are unit tests for functions but no regression tests... 🙃

danwlsn commented 2 years ago

Ahh good shout, didn't think about looking at other repo's implementations. I've found some eth projects that use cypress that are shedding light on possible paths 👍

the-frey commented 2 years ago

Taking notes out of discord threads: https://github.com/CosmWasm/dApps/blob/master/packages/logic/src/service/sdk.ts#L36-L65

as recommended by ethan Screenshot_2022-01-27_at_14 01 17