mirror of
https://github.com/actualbudget/actual.git
synced 2026-03-22 00:13:45 -05:00
* [AI] Promote typescript/restrict-template-expressions to error and fix violations Convert the oxlint rule from "warn" to "error" and fix all 42 violations by wrapping non-string template expressions with String(). This ensures type safety in template literals across the codebase. https://claude.ai/code/session_01Uk8SwFbD6HuUuo3SSMwU9z * Add release notes for PR #7181 --------- Co-authored-by: Claude <noreply@anthropic.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
46 lines
1.2 KiB
TypeScript
46 lines
1.2 KiB
TypeScript
import type { Locator, Page } from '@playwright/test';
|
|
|
|
export class CustomReportPage {
|
|
readonly page: Page;
|
|
readonly pageContent: Locator;
|
|
readonly showLegendButton: Locator;
|
|
readonly showSummaryButton: Locator;
|
|
readonly showLabelsButton: Locator;
|
|
|
|
constructor(page: Page) {
|
|
this.page = page;
|
|
this.pageContent = page.getByTestId('reports-page');
|
|
|
|
this.showLegendButton = this.pageContent.getByRole('button', {
|
|
name: 'Show Legend',
|
|
});
|
|
this.showSummaryButton = this.pageContent.getByRole('button', {
|
|
name: 'Show Summary',
|
|
});
|
|
this.showLabelsButton = this.pageContent.getByRole('button', {
|
|
name: 'Show Labels',
|
|
});
|
|
}
|
|
|
|
async selectViz(vizName: string | RegExp) {
|
|
await this.pageContent.getByRole('button', { name: vizName }).click();
|
|
}
|
|
|
|
async selectMode(mode: 'total' | 'time') {
|
|
switch (mode) {
|
|
case 'total':
|
|
await this.pageContent
|
|
.getByRole('button', { name: 'Total', exact: true })
|
|
.click();
|
|
break;
|
|
case 'time':
|
|
await this.pageContent
|
|
.getByRole('button', { name: 'Time', exact: true })
|
|
.click();
|
|
break;
|
|
default:
|
|
throw new Error(`Unrecognized mode: ${String(mode)}`);
|
|
}
|
|
}
|
|
}
|