unrip/test/operator-dashboard-ui-static.test.mjs
philipp 9eb1f7b80e
All checks were successful
deploy / deploy (push) Successful in 31s
Consolidate quote lifecycle dashboard
Proof: Operator dashboard now renders one full-width quote lifecycle table and one successful-trades-only table from durable lifecycle evidence; targeted dashboard tests, dashboard build, and full npm test pass.

Assumptions: Gross edge estimate is edge percent times EUR notional and is labeled separately from realized PnL; realized per-trade PnL remains unavailable until fee and venue-terminal fill data are stored.

Still fake: Venue-native terminal fill events, fee attribution, realized per-trade PnL, and full inventory-skew strategy controls remain incomplete.
2026-04-10 17:25:46 +02:00

23 lines
1.2 KiB
JavaScript

import test from 'node:test';
import assert from 'node:assert/strict';
import { readFileSync } from 'node:fs';
const strategySource = readFileSync(new URL('../src/operator-dashboard/static/pages/StrategyPage.jsx', import.meta.url), 'utf8');
const fundsSource = readFileSync(new URL('../src/operator-dashboard/static/pages/FundsPage.jsx', import.meta.url), 'utf8');
test('strategy page owns consolidated quote lifecycle and successful trade tables', () => {
assert.match(strategySource, /Quote lifecycle/);
assert.match(strategySource, /Incoming quotes and what happened next/);
assert.match(strategySource, /Responded\?/);
assert.match(strategySource, /Successful trades only/);
assert.match(strategySource, /Show lifecycle/);
assert.match(strategySource, /Submitted means the relay accepted the response; it does not prove a trade\./);
assert.doesNotMatch(strategySource, /Actionable|actionable/);
});
test('funds page no longer renders duplicate quote and submission tables', () => {
assert.doesNotMatch(fundsSource, /Recent incoming quotes/);
assert.doesNotMatch(fundsSource, /Recent submitted quote terms/);
assert.doesNotMatch(fundsSource, /Submitted quote responses/);
assert.doesNotMatch(fundsSource, /Durable ledger/);
});