wip
This commit is contained in:
@@ -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');
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user