huseyindeniz / vite-react-dapp-template

Vite React Template for dApp Frontend Development
https://huseyindeniz.github.io/react-dapp-template-documentation/
MIT License
9 stars 5 forks source link

Integrate cypress / synpress #7

Open huseyindeniz opened 1 year ago

huseyindeniz commented 1 year ago

If it's possible, integrate cypress/synpress

huseyindeniz commented 1 year ago

I found this great example but couldn't make it work in my template. => https://github.com/YakovL/synpress-cucumber I'll try later. fyi: @YakovL

YakovL commented 8 months ago

Hi @huseyindeniz if you specify what went wrong, I could be able to help. Note that Cypress watch mode still doesn't work with Synpress (not sure if it will get changed with the upcoming Sypress 4, though), there are some issues with it (my not-so-consistent notes can be found here), even though a couple of fixes I've proposed were merged already. But aside the watch mode, I was able to combine Synpress + Cucumber (not sure if the latest setup is in the repo, though)

YakovL commented 8 months ago

PS a side note: you may want to use Vitest instead of Jest for better performance of tests

huseyindeniz commented 8 months ago

hi @YakovL thank you very much for the update. I checked my local branches and found the branch that I tested this integration. I'll push the branch later after I check if I put any secret into code accidentally or not :D

There are 2 issues when I run the cypress.

First one is, during the startup, Metamask installation can not be completed. I needed to do it manually in the test browser instance. It shows Metamask installed but can not be configured error at this phase. It shows this warning with a reload extension button but when you click it nothing changes.

After completing the Metamask setup manually and trigger the test manually I see this:

image

But it's better pushing this branch, so if you could look at that branch in some time, maybe you can identify the problem quickly. Thanks again.

YakovL commented 8 months ago

during the startup, Metamask installation can not be completed

is it stuck on the password typing step? Does it show that the setup metamask helper was called twice?

huseyindeniz commented 8 months ago

I can only see the following screen right after running it:

image

And when I click the Metamask icon, it shows it's not logged in.

huseyindeniz commented 7 months ago

it seems synpress supports playwright. Consider using playwright instead of cypress.