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

@@ -45,6 +45,9 @@ describe('Overlay lifecycle (integration)', () => {
info: (...args: unknown[]) => void;
warn: (...args: unknown[]) => void;
error: (...args: unknown[]) => void;
fatal: (...args: unknown[]) => void;
child: (...args: unknown[]) => LoggerLike;
flush: (...args: unknown[]) => Promise<void>;
};
const logger = console as unknown as LoggerLike;
@@ -63,7 +66,7 @@ describe('Overlay lifecycle (integration)', () => {
const ackPromise: Promise<ActionAck> = service.startAction(action);
expect(publisher.events.length).toBe(1);
const first = publisher.events[0];
const first = publisher.events[0]!;
expect(first.type).toBe('modal-opened');
expect(first.actionId).toBe('hosted-session');
@@ -84,8 +87,8 @@ describe('Overlay lifecycle (integration)', () => {
expect(ack.id).toBe('hosted-session');
expect(ack.status).toBe('confirmed');
expect(publisher.events[0].type).toBe('modal-opened');
expect(publisher.events[0].actionId).toBe('hosted-session');
expect(publisher.events[0]!.type).toBe('modal-opened');
expect(publisher.events[0]!.actionId).toBe('hosted-session');
});
it('emits panel-missing when cancelAction is called', async () => {
@@ -96,6 +99,9 @@ describe('Overlay lifecycle (integration)', () => {
info: (...args: unknown[]) => void;
warn: (...args: unknown[]) => void;
error: (...args: unknown[]) => void;
fatal: (...args: unknown[]) => void;
child: (...args: unknown[]) => LoggerLike;
flush: (...args: unknown[]) => Promise<void>;
};
const logger = console as unknown as LoggerLike;
@@ -108,7 +114,7 @@ describe('Overlay lifecycle (integration)', () => {
await service.cancelAction('hosted-session-cancel');
expect(publisher.events.length).toBe(1);
const ev = publisher.events[0];
const ev = publisher.events[0]!;
expect(ev.type).toBe('panel-missing');
expect(ev.actionId).toBe('hosted-session-cancel');
});