Closed chopan123 closed 1 month ago
we can not mock component functions on e2e tests, we should use component testing for that
I created a component test that mount the app in the swap page and do the wallet connection
How to run:
-npx cypress open -Select component testing -Start component testing in chrome -Select app.test.tsx
That should run a test in swap page connecting a wallet
Check:
cypress/e2e/connectWallet.test.ts
for example to log and mock some functions,The intention of that test is to connect wallet, but it is not working. you can uncomment
// cy.contains('Public Key: publicKey')
to see screenshots of the browser and logs on logs/I am not quite sure about why I am not getting into the try nor the catch block of the following function:
Explain to the team how to do it