Mining/ui/e2e/api/system.api.spec.ts
snider 8460b8f3be feat: Add multi-miner dashboard support and TT-Miner implementation
Dashboard:
- Add aggregate stats across all running miners (total hashrate, shares)
- Add workers table with per-miner stats, efficiency, and controls
- Show hashrate bars and efficiency badges for each worker
- Support stopping individual workers or all at once

TT-Miner:
- Implement Install, Start, GetStats, CheckInstallation, Uninstall
- Add TT-Miner to Manager's StartMiner and ListAvailableMiners
- Support GPU-specific config options (devices, intensity, cliArgs)

Chart:
- Improve styling with WA-Pro theme variables
- Add hashrate unit formatting (H/s, kH/s, MH/s)
- Better tooltip and axis styling

Also:
- Fix XMRig download URLs (linux-static-x64, windows-x64)
- Add Playwright E2E testing infrastructure
- Add XMR pool research documentation

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-27 22:48:20 +00:00

39 lines
1.4 KiB
TypeScript

import { test, expect } from '@playwright/test';
import { API_BASE } from '../fixtures/test-data';
test.describe('System API Endpoints', () => {
test('GET /info - returns system information', async ({ request }) => {
const response = await request.get(`${API_BASE}/info`);
expect(response.ok()).toBeTruthy();
const body = await response.json();
expect(body).toHaveProperty('os');
expect(body).toHaveProperty('architecture');
expect(body).toHaveProperty('go_version');
expect(body).toHaveProperty('available_cpu_cores');
expect(body).toHaveProperty('total_system_ram_gb');
expect(body).toHaveProperty('installed_miners_info');
expect(Array.isArray(body.installed_miners_info)).toBeTruthy();
});
test('POST /doctor - performs live miner check', async ({ request }) => {
const response = await request.post(`${API_BASE}/doctor`);
expect(response.ok()).toBeTruthy();
const body = await response.json();
expect(body).toHaveProperty('installed_miners_info');
expect(Array.isArray(body.installed_miners_info)).toBeTruthy();
});
test('POST /update - checks for miner updates', async ({ request }) => {
const response = await request.post(`${API_BASE}/update`);
expect(response.ok()).toBeTruthy();
const body = await response.json();
// Either "status" (all up to date) or "updates_available"
expect(body.status || body.updates_available).toBeDefined();
});
});