Skip to content

Conversation

@shibatales
Copy link
Collaborator

@shibatales shibatales commented Sep 18, 2024

Cypress-polkadot-wallet package was used to attempt creating automated e2e tests using Cypress testing suite on our repo. Multiple attempts were made to implement the example test code in our repo, but to no avail.

Example chainsafe-cypress repo: https://github.com/ChainSafe/cypress-polkadot-wallet?ref=blog.chainsafe.io

While the example repo builds fine independently, its tests passing, migrating the example code into our repo and updating it to fit the dapp's ui interactions have been unfruitful. Cypress scaffolding and built-in methods are working fine, just not the methods from cypress-polkadot-wallet.

Possible issues could have arisen from:

  • incorrect config for tsconfig files
  • mismatched peer dependencies in example repo vs glove repo
  • nextjs issues? (package claims it is framework agnostic)

Possible solutions were explored for the above issues, however none have worked and the tests are still failing.

The example repo uses a vanilla typescript and html implementation (main.ts), so I tried 2 types of implementation in our repo (glove-test.ts is a similar script call from the example, and I also created a react component version example called <GloveTest />), which can be found in layout.tsx. Neither implementation seem to trigger the chainsafe package methods successfully.

The test file itself (test.cy.ts) can be found in the cypress/e2e folder.

To open the Cypress testing UI and run the test there, run yarn e2e:open, or without opening the UI run yarn e2e:run

A message has been sent to the package maintainer/creator seeking guidance and support (no responses yet).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants