This commit is contained in:
2025-12-12 21:39:48 +01:00
parent ddbd99b747
commit cae81b1088
49 changed files with 777 additions and 269 deletions

View File

@@ -74,8 +74,8 @@ describe('companion start automation - browser not connected at step 1', () => {
const session = await waitForFailedSession(sessionRepository, dto.sessionId);
expect(session).toBeDefined();
expect(session.state.value).toBe('FAILED');
const error = session.errorMessage as string | undefined;
expect(session!.state!.value).toBe('FAILED');
const error = session!.errorMessage as string | undefined;
expect(error).toBeDefined();
expect(error).toContain('Step 1 (Navigate to Hosted Racing page)');
expect(error).toContain('Browser not connected');

View File

@@ -52,7 +52,7 @@ describe('companion start automation - browser connection failure before steps',
const executeStepSpy = vi.spyOn(
automationEngine,
'executeStep' as keyof typeof automationEngine,
'executeStep',
);
const config: HostedSessionConfig = {

View File

@@ -51,7 +51,7 @@ describe('renderer overlay lifecycle integration', () => {
const svc = new OverlaySyncService({
lifecycleEmitter: emitter,
publisher,
logger: console,
logger: console as any,
defaultTimeoutMs: 2_000,
});
@@ -104,7 +104,7 @@ describe('renderer overlay lifecycle integration', () => {
const rendererState = reduceEventsToRendererState(publisher.events);
expect(rendererState.status).toBe('completed');
expect(rendererState.actionId).toBe('hosted-session');
expect((rendererState as { actionId: string }).actionId).toBe('hosted-session');
});
it('ends in failed state when panel-missing is emitted', async () => {
@@ -113,7 +113,7 @@ describe('renderer overlay lifecycle integration', () => {
const svc = new OverlaySyncService({
lifecycleEmitter: emitter,
publisher,
logger: console,
logger: console as any,
defaultTimeoutMs: 200,
});
@@ -141,6 +141,6 @@ describe('renderer overlay lifecycle integration', () => {
const rendererState = reduceEventsToRendererState(publisher.events);
expect(rendererState.status).toBe('failed');
expect(rendererState.actionId).toBe('hosted-failure');
expect((rendererState as { actionId: string }).actionId).toBe('hosted-failure');
});
});

View File

@@ -9,7 +9,7 @@ describe('renderer overlay integration', () => {
const svc = new OverlaySyncService({
lifecycleEmitter: emitter,
publisher,
logger: console,
logger: console as any,
})
// simulate renderer request