Mining/ui/e2e/ui/setup-wizard.e2e.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

52 lines
1.7 KiB
TypeScript

import { test, expect } from '@playwright/test';
import { API_BASE } from '../fixtures/test-data';
test.describe('Setup Wizard Component', () => {
test.beforeEach(async ({ page }) => {
await page.goto('/');
await page.waitForLoadState('networkidle');
});
test('displays setup wizard', async ({ page }) => {
const wizard = page.locator('snider-mining-setup-wizard');
await expect(wizard).toBeVisible();
});
test('shows setup required header', async ({ page }) => {
await expect(
page.locator('snider-mining-setup-wizard .header-title:has-text("Setup Required")')
).toBeVisible();
});
test('shows available miners heading', async ({ page }) => {
await expect(
page.locator('snider-mining-setup-wizard h4:has-text("Available Miners")')
).toBeVisible();
});
test('displays available miners for installation', async ({ page, request }) => {
const availableResponse = await request.get(`${API_BASE}/miners/available`);
const available = await availableResponse.json();
for (const miner of available) {
await expect(
page.locator(`snider-mining-setup-wizard .miner-item:has-text("${miner.name}")`)
).toBeVisible();
}
});
test('shows install button for non-installed miners', async ({ page, request }) => {
const infoResponse = await request.get(`${API_BASE}/info`);
const info = await infoResponse.json();
const xmrigInfo = info.installed_miners_info?.find((m: { miner_binary?: string }) =>
m.miner_binary?.includes('xmrig')
);
const xmrigItem = page.locator('snider-mining-setup-wizard .miner-item:has-text("xmrig")');
if (!xmrigInfo?.is_installed) {
await expect(xmrigItem.locator('wa-button:has-text("Install")')).toBeVisible();
}
});
});