ecadlabs / taquito

A library for building dApps on the Tezos Blockchain - JavaScript / TypeScript
https://taquito.io
Apache License 2.0
298 stars 116 forks source link

Wallet API Testing page for Beacon/tzip-10 #582

Closed jevonearth closed 3 years ago

jevonearth commented 3 years ago

As a Taquito developer/tester, I want a web page that exercises all the common user journeys/activities between a dapp and a TZIP10 wallet so that I have an area to conduct repeatable tests of Taquito, Beacon and supported wallets.

Tentative URL for the new page: http://tezostaquito.io/tests/tzip10

Specific buttons/inputs for;

We want this page within the website so that when website deployment previews (#473) get deployed, testing can be done immediately.

AndreasGassmann commented 3 years ago

That list is a very good start. We should include all of those cases in the beacon-sdk tests as well. Currently, we only have unit tests, but I would also like to introduce e2e tests that verify the behaviour in an actual browser with all the moving parts. Some additional things that I would like to cover in the beacon-sdk are related to establishing a connection to different wallets (eg. browser wallet and p2p wallet), the "reconnect" behaviour on page refreshes, as well as error cases that are triggered by changes in the wallet (eg. a connected account is removed in the wallet).

Do you already have an e2e testing setup in place (or in mind)? Maybe we could run a similar setup and save some time by sharing the test-setup.

mkernaghan commented 3 years ago

Tzip10 has proposed handshake: https://gitlab.com/tzip/tzip/-/blob/master/proposals/tzip-10/tzip-10.md#handshake-

could the web page make those steps clear (walkthrough with timings) , or is this better "under the hood"?

jevonearth commented 3 years ago

@AndreasGassmann we don't have e2e infra setup yet, but this work is a precursor to that.

Some elements of wallet interactions are designed not to be automated, so we while we can automate a lot of this stuff, some will have to be tested by humans.

Testing these scenarios with the different tzip10 wallets is our goal so we can get a good overview.

The reconnect scenarios is a good one. I want to also get into permissions, but probably on the second round of this.

@mkernaghan WRT handshakes, if possible, we can surface a lot of that technical information on the test page.

mkernaghan commented 3 years ago

Most of the specific buttons listed are working now. Are you intending to add more @claudebarde ?

claudebarde commented 3 years ago

@mkernaghan I want to run more tests (and hear from yours!) before ticking the boxes, for example with Kukai wallet as Jev mentioned the issue with the testnet version today.

mkernaghan commented 3 years ago

I did a walkthrough and tried out things in the Beacon Test Dapp. This is a draft, I may have made errors: https://ecadlabs.ontestpad.com/script/42/report/?auth=6cf87f8a7f1d9b7eccd4fe2ae4fa2cdc perhaps we can use this as a checklist to determine when this issue can be closed.

mkernaghan commented 3 years ago

It would be great if we could add to the Test Dapp: a link to the operation hash for the contract tested

Innkst commented 3 years ago

I believe, tests are now here: https://ecadlabs.ontestpad.com/project/2/. The above link didn't work somehow.

michaelkernaghan commented 3 years ago

Updated Monday, Feb 22, 2012

these are working: connect wallet disconnect wallet (depends on the connected state)

  1. Send tokens to address
  2. Contract call with int
  3. Contract call with (pair nat string)
  4. Call a contract entry point that fails
  5. Call a contract entrypoint that fails with an Int
  6. Call a contract entrypoint that fails with (pair int string)

these are on the page but not working

  1. Originate smart contract with success
  2. Use Batch API with a wallet
  3. Signing o provided payload

These I believe are not on the page Call smart contract method that takes a complex type as an argument Call smart contract that takes a complex type with optional params (both cases) Call smart contract that will throw a fail with an error. Originate smart contract that fails Request signing of an arbitrary string reset (I forget the correct term)