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>
36 lines
1.2 KiB
TypeScript
36 lines
1.2 KiB
TypeScript
import { Page, Locator } from '@playwright/test';
|
|
|
|
export class DashboardPage {
|
|
readonly page: Page;
|
|
readonly dashboard: Locator;
|
|
readonly statsBarContainer: Locator;
|
|
readonly statsListContainer: Locator;
|
|
readonly chartContainer: Locator;
|
|
readonly noMinersMessage: Locator;
|
|
readonly errorCard: Locator;
|
|
|
|
constructor(page: Page) {
|
|
this.page = page;
|
|
this.dashboard = page.locator('snider-mining-dashboard').first();
|
|
this.statsBarContainer = page.locator('.stats-bar-container').first();
|
|
this.statsListContainer = page.locator('.stats-list-container').first();
|
|
this.chartContainer = page.locator('.chart-container').first();
|
|
this.noMinersMessage = page.locator('text=No miners running').first();
|
|
this.errorCard = page.locator('.card-error').first();
|
|
}
|
|
|
|
async goto() {
|
|
await this.page.goto('/');
|
|
await this.page.waitForLoadState('networkidle');
|
|
}
|
|
|
|
async waitForDashboardLoad() {
|
|
await this.dashboard.waitFor({ state: 'visible' });
|
|
}
|
|
|
|
async hasRunningMiners(): Promise<boolean> {
|
|
const response = await this.page.request.get('http://localhost:9090/api/v1/mining/miners');
|
|
const miners = await response.json();
|
|
return miners.length > 0;
|
|
}
|
|
}
|