File size: 11,415 Bytes
b190b45 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="Permissions-Policy" content="accelerometer=(), camera=(), geolocation=(), gyroscope=(), magnetometer=(), microphone=(), payment=(), usb=()">
<title>Test All Pages - Crypto Hub</title>
<style>
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
min-height: 100vh;
padding: 20px;
}
.container {
max-width: 1200px;
margin: 0 auto;
background: white;
border-radius: 20px;
padding: 40px;
box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}
h1 {
color: #667eea;
margin-bottom: 10px;
}
.subtitle {
color: #666;
margin-bottom: 30px;
}
.test-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
gap: 20px;
margin-bottom: 30px;
}
.test-card {
border: 2px solid #e0e0e0;
border-radius: 12px;
padding: 20px;
transition: all 0.3s;
cursor: pointer;
}
.test-card:hover {
border-color: #667eea;
transform: translateY(-4px);
box-shadow: 0 8px 20px rgba(102, 126, 234, 0.3);
}
.test-card h3 {
color: #333;
margin-bottom: 10px;
display: flex;
align-items: center;
gap: 10px;
}
.test-card p {
color: #666;
font-size: 14px;
margin-bottom: 15px;
}
.test-btn {
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
color: white;
border: none;
padding: 10px 20px;
border-radius: 8px;
cursor: pointer;
font-weight: 600;
width: 100%;
transition: transform 0.2s;
}
.test-btn:hover {
transform: scale(1.05);
}
.status {
display: inline-block;
width: 12px;
height: 12px;
border-radius: 50%;
margin-left: auto;
}
.status.pending { background: #ccc; }
.status.testing { background: #ffa500; animation: pulse 1s infinite; }
.status.pass { background: #22c55e; }
.status.fail { background: #ef4444; }
@keyframes pulse {
0%, 100% { opacity: 1; }
50% { opacity: 0.5; }
}
.results {
background: #f5f5f5;
border-radius: 12px;
padding: 20px;
margin-top: 30px;
}
.result-item {
padding: 10px;
margin: 5px 0;
background: white;
border-radius: 8px;
display: flex;
justify-content: space-between;
align-items: center;
}
.badge {
padding: 5px 15px;
border-radius: 20px;
font-size: 12px;
font-weight: 600;
}
.badge.success { background: #22c55e; color: white; }
.badge.error { background: #ef4444; color: white; }
.badge.warning { background: #ffa500; color: white; }
.test-all-btn {
background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
color: white;
border: none;
padding: 15px 40px;
border-radius: 12px;
font-size: 18px;
font-weight: 700;
cursor: pointer;
width: 100%;
margin-bottom: 20px;
}
.test-all-btn:hover {
transform: scale(1.02);
}
</style>
<!-- API Configuration - Smart Fallback System -->
<script src="/static/js/api-config.js"></script>
<script>
// Initialize API client
window.apiReady = new Promise((resolve) => {
if (window.apiClient) {
console.log('β
API Client ready');
resolve(window.apiClient);
} else {
console.error('β API Client not loaded');
}
});
</script>
</head>
<body>
<div class="container">
<h1>π§ͺ Crypto Hub - Page Test Suite</h1>
<p class="subtitle">Click any card to open and test that page, or click "Test All" to open all pages</p>
<button class="test-all-btn" onclick="testAllPages()">
π Test All Pages
</button>
<div class="test-grid">
<div class="test-card" onclick="openPage('dashboard')">
<h3>
π Dashboard
<span class="status pending" id="status-dashboard"></span>
</h3>
<p>System overview, market data, sentiment charts</p>
<button class="test-btn">Open Dashboard</button>
</div>
<div class="test-card" onclick="openPage('market')">
<h3>
πΉ Market
<span class="status pending" id="status-market"></span>
</h3>
<p>Real-time cryptocurrency market data</p>
<button class="test-btn">Open Market</button>
</div>
<div class="test-card" onclick="openPage('sentiment')">
<h3>
π Sentiment
<span class="status pending" id="status-sentiment"></span>
</h3>
<p>Multi-modal sentiment analysis</p>
<button class="test-btn">Open Sentiment</button>
</div>
<div class="test-card" onclick="openPage('news')">
<h3>
π° News
<span class="status pending" id="status-news"></span>
</h3>
<p>Aggregated crypto news feed</p>
<button class="test-btn">Open News</button>
</div>
<div class="test-card" onclick="openPage('providers')">
<h3>
π Providers
<span class="status pending" id="status-providers"></span>
</h3>
<p>API provider health monitoring</p>
<button class="test-btn">Open Providers</button>
</div>
<div class="test-card" onclick="openPage('ai-analyst')">
<h3>
π€ AI Analyst
<span class="status pending" id="status-ai-analyst"></span>
</h3>
<p>AI-powered trading decisions</p>
<button class="test-btn">Open AI Analyst</button>
</div>
<div class="test-card" onclick="openPage('trading-assistant')">
<h3>
π Trading Assistant
<span class="status pending" id="status-trading-assistant"></span>
</h3>
<p>Trading signals and recommendations</p>
<button class="test-btn">Open Trading</button>
</div>
<div class="test-card" onclick="openPage('models')">
<h3>
π§ Models
<span class="status pending" id="status-models"></span>
</h3>
<p>AI models management</p>
<button class="test-btn">Open Models</button>
</div>
<div class="test-card" onclick="openPage('api-explorer')">
<h3>
π API Explorer
<span class="status pending" id="status-api-explorer"></span>
</h3>
<p>Interactive API testing tool</p>
<button class="test-btn">Open Explorer</button>
</div>
<div class="test-card" onclick="openPage('diagnostics')">
<h3>
π₯ Diagnostics
<span class="status pending" id="status-diagnostics"></span>
</h3>
<p>System health checks</p>
<button class="test-btn">Open Diagnostics</button>
</div>
<div class="test-card" onclick="openPage('settings')">
<h3>
βοΈ Settings
<span class="status pending" id="status-settings"></span>
</h3>
<p>Application configuration</p>
<button class="test-btn">Open Settings</button>
</div>
<div class="test-card" onclick="openPage('data-sources')">
<h3>
πΎ Data Sources
<span class="status pending" id="status-data-sources"></span>
</h3>
<p>Data source management</p>
<button class="test-btn">Open Data Sources</button>
</div>
</div>
<div class="results">
<h3>β
Manual Testing Checklist</h3>
<div id="checklist">
<div class="result-item">
<span>All pages open without errors</span>
<span class="badge warning">Manual Check</span>
</div>
<div class="result-item">
<span>All buttons are clickable</span>
<span class="badge warning">Manual Check</span>
</div>
<div class="result-item">
<span>Data displays (real or demo)</span>
<span class="badge warning">Manual Check</span>
</div>
<div class="result-item">
<span>Console has 0 critical errors</span>
<span class="badge warning">Check DevTools</span>
</div>
<div class="result-item">
<span>No pages hang or freeze</span>
<span class="badge warning">Manual Check</span>
</div>
</div>
</div>
</div>
<script>
function openPage(pageName) {
const status = document.getElementById(`status-${pageName}`);
status.className = 'status testing';
// Open in new tab
const url = `./${pageName}/index.html`;
window.open(url, '_blank');
// Simulate status change
setTimeout(() => {
status.className = 'status pass';
}, 1000);
}
function testAllPages() {
const pages = [
'dashboard', 'market', 'sentiment', 'news',
'providers', 'ai-analyst', 'trading-assistant',
'models', 'api-explorer', 'diagnostics',
'settings', 'data-sources'
];
let delay = 0;
pages.forEach(page => {
setTimeout(() => openPage(page), delay);
delay += 500; // Stagger opening by 500ms
});
}
</script>
</body>
</html>
|