Skip to content

Conversation

@roomote
Copy link

@roomote roomote bot commented Dec 23, 2025

Added a new documentation page covering best practices and recommendations for using OnChainTestKit, including:

  • General testing best practices
  • Wallet-specific recommendations
  • Network configuration guidelines
  • Security best practices
  • Performance optimization tips
  • CI/CD integration examples
  • Common pitfalls to avoid
  • Debugging strategies
  • Critical test scenarios

The documentation has been added to both the navigation bar and sidebar under a new "Resources" section.


View task on Roo Code Cloud

@vercel
Copy link
Contributor

vercel bot commented Dec 23, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (UTC)
https-github-com-joe10832-onchaintestkit Error Error Dec 24, 2025 11:21pm
https-github-com-joe10832-onchaintestkit-k43t Error Error Dec 24, 2025 11:21pm
https-github-com-joe10832-onchaintestkit-sdea Error Error Dec 24, 2025 11:21pm
https-github-com-joe10832-onchaintestkit-tuek Error Error Dec 24, 2025 11:21pm
https-github-com-joe10832-onchaintestkit-z6dv Error Error Dec 24, 2025 11:21pm

@roomote
Copy link
Author

roomote bot commented Dec 23, 2025

Rooviewer Clock   See task on Roo Cloud

Review completed. Found 4 issues related to API accuracy in the documentation:

  • Fix wallet.reset() method usage in test isolation example (line 49)
  • Fix wallet.reset() method usage in cleanup example (line 317)
  • Update critical test scenarios to use correct handleAction() API pattern (lines 361-380)
  • Consider updating GitHub repository URL to use cleaner naming (line 404)

Mention @roomote in a comment to request specific changes to this pull request or fix all unresolved issues.

```typescript
test.beforeEach(async ({ page, wallet }) => {
// Reset wallet state
await wallet.reset();
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The wallet.reset() method is used in multiple code examples throughout this documentation but doesn't appear to exist in the BaseWallet interface. Based on the source code, wallet operations use the handleAction() method pattern. This example may confuse users who try to implement it.

Fix it with Roo Code or mention @roomote and request a fix.

await wallet.sendTransaction(...);

// Clean up
await wallet.reset();
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same issue here - the wallet.reset() method doesn't exist in the BaseWallet API. This will cause confusion for users trying to implement the cleanup pattern shown in this example.

Fix it with Roo Code or mention @roomote and request a fix.

Comment on lines +361 to +380
test.describe('Critical Wallet Flows', () => {
test('should connect wallet successfully', async ({ page, wallet }) => {
await wallet.connect();
expect(await wallet.isConnected()).toBe(true);
});

test('should sign transactions', async ({ page, wallet }) => {
const tx = await wallet.sendTransaction({...});
expect(tx.hash).toBeDefined();
});

test('should handle rejected transactions', async ({ page, wallet }) => {
await expect(wallet.rejectTransaction()).resolves.toBeTruthy();
});

test('should switch networks', async ({ page, wallet }) => {
await wallet.switchNetwork(baseSepolia.id);
expect(await wallet.getCurrentChainId()).toBe(baseSepolia.id);
});
});
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These test examples use wallet methods like wallet.connect(), wallet.isConnected(), wallet.sendTransaction(), wallet.rejectTransaction(), wallet.switchNetwork(), and wallet.getCurrentChainId() that don't match the actual OnChainTestKit API. Based on the source code, wallet operations use the handleAction(action, options) pattern (e.g., wallet.handleAction('connect', {...})). These examples should be updated to reflect the actual API to avoid confusion.

Fix it with Roo Code or mention @roomote and request a fix.

- [Playwright Best Practices](https://playwright.dev/docs/best-practices)
- [Web3 Testing Guide](https://ethereum.org/en/developers/docs/testing/)
- [OnChainTestKit Examples](/examples)
- [GitHub Repository](https://github.com/MunyayLLC/https-github.com-joe10832-onchaintestkit)
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The GitHub repository URL uses the unusual repository name https-github.com-joe10832-onchaintestkit which appears to be the internal directory structure rather than the canonical repository name. This URL will work but looks unprofessional in user-facing documentation. Consider using a cleaner repository URL if one exists.

Fix it with Roo Code or mention @roomote and request a fix.

Copy link
Member

@joe10832 joe10832 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

3 participants