fix(web): preserve historical backtests with null configuration (CL25)

This commit is contained in:
Boki 2026-10-28 15:50:32 -04:00
parent 731acc41db
commit ed7429cfbc
10 changed files with 41 additions and 23 deletions

View file

@ -2082,12 +2082,15 @@ test('browser_reopen_and_switch', async () => {
).toEqual(beforeHistorySelection);
// A real missing row, not an invented empty result.
await f.page.goto(`${f.origin}/backtests/${definitionId}/run/${randomUUID()}`);
await visible(f.page, 'Failed to get run: Not Found');
await visible(f.page, 'Run not found');
await visible(f.page, 'Retry run');
// Transport failure has a visible retry; restoring the real endpoint recovers.
await f.page.route(`**/api/v2/runs/${secondId}`, route => route.abort('failed'));
await f.page.goto(secondUrl);
await visible(f.page, /Failed to fetch|Load failed/);
await visible(
f.page,
'The backtest response was lost. Check saved runs before submitting again.'
);
await f.page.unroute(`**/api/v2/runs/${secondId}`);
await f.page.getByRole('button', { name: 'Retry run', exact: true }).click();
await visible(f.page, 'Completed');