-
Notifications
You must be signed in to change notification settings - Fork 5.3k
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
feat: add playwright test for start page [fixes #15896] #15897
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 |
pettinarip
left a comment
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
mockWalletto the fixtures folder. - Create a
rainbowkitConfigspecifically 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? 🙏 |
pettinarip
left a comment
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! |
|
This issue is stale because it has been open 30 days with no activity. |
corwintines
left a comment
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.
Thanks @agualis this is great!
|
@all-contributors can you add @agualis for code |
|
I've put up a pull request to add @agualis! 🎉 |
|
Congrats, your important contribution to this open-source project has earned you a GitPOAP! GitPOAP: 2025 Ethereum.org Contributor: Join the [ethereum.org Discord server](https://ethereum.org/discord) to explore more ways to contribute to the project. Depending on the tasks you complete, you may also unlock additional rewards. Visit [ethereum.org/contributing](https://ethereum.org/contributing) to learn more.Head to gitpoap.io & connect your GitHub account to mint!Keep buidling, keep learning, and let's grow the Ethereum open-source community together 🌱 Learn more about GitPOAPs here. |


Fixes #15896 by adding a playwright test for start page to test wallet connection
Description
Adds a new rainbow kit
Testgroup 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_MOCKthat must betruewhen running the app to be tested by playwright but I find it less straight forward (so worse DX).