Files
smom-dbis-138/docs/operations/integrations/METAMASK_TEST_CHECKLIST.md

238 lines
5.2 KiB
Markdown
Raw Normal View History

# MetaMask Integration Test Checklist
Comprehensive test checklist for MetaMask integration with ChainID 138.
## Pre-Testing Setup
- [ ] MetaMask extension installed (latest version)
- [ ] MetaMask mobile app installed (for mobile testing)
- [ ] Test accounts created and funded
- [ ] RPC endpoints accessible
- [ ] Blockscout explorer accessible
- [ ] Token contracts deployed
## Browser Testing
### Chrome/Chromium
- [ ] Network addition via `wallet_addEthereumChain`
- [ ] Network addition via Chainlist
- [ ] Network switching via `wallet_switchEthereumChain`
- [ ] Token addition via `wallet_watchAsset`
- [ ] Account connection
- [ ] Transaction signing
- [ ] Network change event handling
- [ ] Account change event handling
### Firefox
- [ ] Network addition via `wallet_addEthereumChain`
- [ ] Network addition via Chainlist
- [ ] Network switching
- [ ] Token addition
- [ ] Account connection
- [ ] Transaction signing
### Edge
- [ ] Network addition
- [ ] Network switching
- [ ] Token addition
- [ ] Account connection
## Mobile Testing
### iOS (MetaMask Mobile)
- [ ] Network addition
- [ ] Network switching
- [ ] Token addition
- [ ] Account connection
- [ ] Transaction signing
- [ ] Deep linking
### Android (MetaMask Mobile)
- [ ] Network addition
- [ ] Network switching
- [ ] Token addition
- [ ] Account connection
- [ ] Transaction signing
- [ ] Deep linking
## Network Addition Tests
### Method 1: wallet_addEthereumChain
- [ ] Add network successfully
- [ ] Handle network already added error
- [ ] Handle user rejection
- [ ] Handle invalid parameters
- [ ] Verify network appears in MetaMask
- [ ] Verify network details are correct
### Method 2: Chainlist
- [ ] Find network on Chainlist
- [ ] Click "Add to MetaMask" button
- [ ] Approve network addition
- [ ] Verify network added correctly
### Method 3: Manual Addition
- [ ] Add network manually via MetaMask UI
- [ ] Verify all fields are correct
- [ ] Test with different RPC URLs
- [ ] Test with different explorer URLs
## Network Switching Tests
- [ ] Switch to ChainID 138 from another network
- [ ] Switch away from ChainID 138
- [ ] Handle network not added error
- [ ] Handle user rejection
- [ ] Verify chain change event fires
- [ ] Verify UI updates on chain change
## Token Addition Tests
### Method 1: wallet_watchAsset
- [ ] Add token successfully
- [ ] Handle invalid address
- [ ] Handle invalid decimals
- [ ] Handle user rejection
- [ ] Verify token appears in MetaMask
- [ ] Verify token balance displays correctly
- [ ] Verify token logo displays correctly
### Method 2: Token List
- [ ] Token auto-detection works
- [ ] Token appears in token list
- [ ] Token metadata is correct
- [ ] Token logo is accessible
## Integration Tests
### React Integration
- [ ] useChain138 hook works correctly
- [ ] Chain138Button component works
- [ ] AddTokenButton component works
- [ ] Event listeners work correctly
- [ ] State management works correctly
### Vanilla JS Integration
- [ ] Network addition works
- [ ] Network switching works
- [ ] Token addition works
- [ ] Event handlers work correctly
### Vue Integration
- [ ] useChain138 composable works
- [ ] Components work correctly
- [ ] Event listeners work correctly
## Error Handling Tests
- [ ] MetaMask not installed error
- [ ] MetaMask locked error
- [ ] User rejection error
- [ ] Network not added error
- [ ] Invalid parameters error
- [ ] RPC endpoint error
- [ ] Network connectivity error
## Edge Cases
- [ ] Multiple network additions
- [ ] Rapid network switching
- [ ] Network addition during transaction
- [ ] Token addition with invalid logo URL
- [ ] Token addition with missing metadata
- [ ] Network change during token addition
- [ ] Account change during network switch
## Performance Tests
- [ ] Network addition response time
- [ ] Network switching response time
- [ ] Token addition response time
- [ ] Event handler performance
- [ ] Memory usage
## Security Tests
- [ ] Verify RPC URLs are correct
- [ ] Verify explorer URLs are correct
- [ ] Verify token addresses are correct
- [ ] Test with malicious RPC URLs
- [ ] Test with malicious token addresses
- [ ] Verify CORS headers
- [ ] Verify SSL certificates
## Regression Tests
- [ ] Test with older MetaMask versions
- [ ] Test with newer MetaMask versions
- [ ] Test with different browser versions
- [ ] Test with different operating systems
- [ ] Test with different network conditions
## Documentation Tests
- [ ] Code examples work correctly
- [ ] Documentation is accurate
- [ ] Links are working
- [ ] Screenshots are up to date
## Production Readiness
- [ ] All tests pass
- [ ] Error handling is comprehensive
- [ ] User experience is smooth
- [ ] Documentation is complete
- [ ] Security checks pass
- [ ] Performance is acceptable
## Test Results
### Test Date: ___________
### Tester: ___________
### Browser: ___________
### MetaMask Version: ___________
### Results:
- Total Tests: ___________
- Passed: ___________
- Failed: ___________
- Skipped: ___________
### Notes:
___________
___________
___________
## Sign-off
- [ ] All critical tests passed
- [ ] All high-priority tests passed
- [ ] Documentation reviewed
- [ ] Security reviewed
- [ ] Ready for production
**Tester Signature**: ___________
**Date**: ___________