Run playwright UI tests

This commit is contained in:
2026-03-06 14:40:43 -05:00
parent 610fce8db3
commit 8e62c66677
37 changed files with 4430 additions and 643 deletions

View File

@@ -8,7 +8,6 @@ import type {
Holding,
FinancialHistoryWindow,
FinancialStatementKind,
FinancialStatementMode,
PortfolioInsight,
PortfolioSummary,
Task,
@@ -199,24 +198,32 @@ export async function getCompanyAnalysis(ticker: string) {
export async function getCompanyFinancialStatements(input: {
ticker: string;
mode: FinancialStatementMode;
statement: FinancialStatementKind;
window: FinancialHistoryWindow;
includeDimensions?: boolean;
includeFacts?: boolean;
factsCursor?: string | null;
factsLimit?: number;
cursor?: string | null;
limit?: number;
}) {
const query = {
ticker: input.ticker.trim().toUpperCase(),
mode: input.mode,
statement: input.statement,
window: input.window,
includeDimensions: input.includeDimensions ? 'true' : 'false',
includeFacts: input.includeFacts ? 'true' : 'false',
...(typeof input.cursor === 'string' && input.cursor.trim().length > 0
? { cursor: input.cursor.trim() }
: {}),
...(typeof input.limit === 'number' && Number.isFinite(input.limit)
? { limit: input.limit }
: {}),
...(typeof input.factsCursor === 'string' && input.factsCursor.trim().length > 0
? { factsCursor: input.factsCursor.trim() }
: {}),
...(typeof input.factsLimit === 'number' && Number.isFinite(input.factsLimit)
? { factsLimit: input.factsLimit }
: {})
};