All checks were successful
deploy / deploy (push) Successful in 35s
Proof: successful trade summary now aggregates gross edge estimates only from completed lifecycle rows with linked settlement evidence; tests prove completed-without-delta rows are excluded. Assumptions: gross edge estimate is useful operator evidence but remains pre-fee and not venue-native realized PnL. Still fake: fee-complete realized trade PnL and venue-native terminal fill events remain unavailable.
34 lines
1.8 KiB
JavaScript
34 lines
1.8 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');
|
|
const stylesSource = readFileSync(new URL('../src/operator-dashboard/static/styles.css', 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, /Gross edge est\./);
|
|
assert.match(strategySource, /successful_trade_gross_edge_estimate_eure/);
|
|
assert.match(strategySource, /before fees/);
|
|
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/);
|
|
});
|
|
|
|
test('mobile status bar uses normal document flow instead of sticky viewport positioning', () => {
|
|
assert.match(
|
|
stylesSource,
|
|
/@media \(max-width: 720px\)[\s\S]*?\.status-bar \{[\s\S]*?position: static;[\s\S]*?top: auto;[\s\S]*?z-index: auto;[\s\S]*?\}/,
|
|
);
|
|
});
|