1.5 KiB
1.5 KiB
Explorer Frontend Testing
Summary
Path-based URLs (e.g. /address/0x99b3511a2d315a497c8112c1fdd8d508d4b1e506) now work on the explorer. The fix includes:
- SPA path-based routing –
applyHashRoute()infrontend/public/index.htmlreads bothpathnameandhash, so/address/0x...,/tx/0x...,/block/123, etc. load correctly. - Nginx SPA paths – Nginx serves
index.htmlfor/address,/tx,/block,/token,/blocks,/transactions,/bridge,/weth,/watchlist, and/nft. - HTTP + HTTPS – Both HTTP (for internal tests) and HTTPS serve the SPA for these paths.
Test Commands
Shell E2E (curl-based)
./explorer-monorepo/scripts/e2e-test-explorer.sh
Requires network access to 192.168.11.140 (VMID 5000).
Playwright E2E
cd explorer-monorepo
EXPLORER_URL="http://192.168.11.140" npx playwright test e2e-explorer-frontend.spec.ts --project=chromium
Links Verified
| Link | Example |
|---|---|
| Address | /address/0x99b3511a2d315a497c8112c1fdd8d508d4b1e506 |
| Tx | /tx/<hash> |
| Block | /block/<number> |
| Blocks | /blocks |
| Transactions | /transactions |
| Bridge | /bridge |
| WETH | /weth |
| Watchlist | /watchlist |
| MetaMask Snap | /snap/ |
Proxy 301 Note
If https://explorer.d-bis.org/address/0x... returns 301, the proxy (NPMplus/Cloudflare) may need configuration. The VM nginx serves the SPA correctly. Workaround: use #/address/0x... or access via LAN.