Mining/ui/e2e/page-objects/profile-list.page.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

50 lines
1.6 KiB
TypeScript

import { Page, Locator } from '@playwright/test';
export class ProfileListPage {
readonly page: Page;
readonly container: Locator;
readonly profileItems: Locator;
readonly noProfilesMessage: Locator;
constructor(page: Page) {
this.page = page;
this.container = page.locator('snider-mining-profile-list');
this.profileItems = page.locator('snider-mining-profile-list .profile-item');
this.noProfilesMessage = page.locator('snider-mining-profile-list >> text=No profiles created yet');
}
async getProfileCount(): Promise<number> {
return await this.profileItems.count();
}
async getProfileByName(name: string): Locator {
return this.container.locator(`.profile-item:has-text("${name}")`);
}
async clickStartButton(profileName: string) {
const profileItem = await this.getProfileByName(profileName);
await profileItem.locator('wa-button:has-text("Start")').click();
}
async clickEditButton(profileName: string) {
const profileItem = await this.getProfileByName(profileName);
await profileItem.locator('wa-button:has-text("Edit")').click();
}
async clickDeleteButton(profileName: string) {
const profileItem = await this.getProfileByName(profileName);
await profileItem.locator('wa-button:has-text("Delete")').click();
}
async clickSaveButton() {
await this.container.locator('wa-button:has-text("Save")').click();
}
async clickCancelButton() {
await this.container.locator('wa-button:has-text("Cancel")').click();
}
async waitForProfileListLoad() {
await this.container.waitFor({ state: 'visible' });
}
}