-
Notifications
You must be signed in to change notification settings - Fork 5.2k
feat: add playwright test for start page [fixes #15896] #15897
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: dev
Are you sure you want to change the base?
Conversation
✅ Deploy Preview for ethereumorg ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
src/config/rainbow-kit.ts
Outdated
}, | ||
], | ||
wallets: walletGroups, | ||
ssr: isLocalhost, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not using ssr: true
casues hydration issues. Is there an explicit reason why you are not using it by default?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
True, I don't see why not to enable this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Assuming we still want this updated?
ssr: isLocalhost, | |
ssr: true, |
Thanks @agualis! Will get some eyes on this soon |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @agualis, thanks for adding this test! 💪🏼
The test looks good and is working perfectly for me locally, but I think we could make a small refactor to organize the code better.
To keep things separated and clean, I'd suggest placing all test-related files and code within the /tests/e2e
folder. We could:
- Move
mockWallet
to the fixtures folder. - Create a
rainbowkitConfig
specifically for the test runtime.
We could export the config from rainbow-kit.ts
and then extend it in a test.beforeEach
block, for example. This way, we keep the code clean and decoupled from the test logic.
LMK what do you think.
src/config/rainbow-kit.ts
Outdated
}, | ||
], | ||
wallets: walletGroups, | ||
ssr: isLocalhost, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
True, I don't see why not to enable this.
0cf12ba
to
05167d2
Compare
Thanks for reviewing @pettinarip
Done ✅
I understand your concern but this is not so trivial because, in order to update If you want to keep the original ✅ Test setup would be more isolated. Happy to use an alternative simpler approach if you know one. |
This issue is stale because it has been open 30 days with no activity. |
@agualis Thanks for the updates here!—any chance you could help clear up the merge conflicts? 🙏 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@agualis you are right. If we add more tests that depends on this in the future we might change it. As of now, current implementation looks good enough.
I don't have time this week but I will try next one. |
@pettinarip @wackerow Cleared up! |
Fixes #15896 by adding a playwright test for start page to test wallet connection
Description
Adds a new rainbow kit
Test
group with wagmi's mock connector (only when the app is running in localhost).Another approach could be using an env var like
NEXT_PUBLIC_ALLOW_WALLET_MOCK
that must betrue
when running the app to be tested by playwright but I find it less straight forward (so worse DX).