This commit is contained in:
2025-11-30 23:00:48 +01:00
parent 4b8c70978f
commit 645f537895
41 changed files with 738 additions and 1631 deletions

View File

@@ -31,7 +31,7 @@ describe('ConfirmCheckoutUseCase - Enhanced with Confirmation Port', () => {
const state = CheckoutState.ready();
vi.mocked(mockCheckoutService.extractCheckoutInfo).mockResolvedValue(
Result.ok({ price, state })
Result.ok({ price, state, buttonHtml: '' })
);
vi.mocked(mockConfirmationPort.requestCheckoutConfirmation).mockResolvedValue(
@@ -60,7 +60,7 @@ describe('ConfirmCheckoutUseCase - Enhanced with Confirmation Port', () => {
const state = CheckoutState.ready();
vi.mocked(mockCheckoutService.extractCheckoutInfo).mockResolvedValue(
Result.ok({ price, state })
Result.ok({ price, state, buttonHtml: '' })
);
vi.mocked(mockConfirmationPort.requestCheckoutConfirmation).mockResolvedValue(
@@ -80,7 +80,7 @@ describe('ConfirmCheckoutUseCase - Enhanced with Confirmation Port', () => {
const state = CheckoutState.ready();
vi.mocked(mockCheckoutService.extractCheckoutInfo).mockResolvedValue(
Result.ok({ price, state })
Result.ok({ price, state, buttonHtml: '' })
);
vi.mocked(mockConfirmationPort.requestCheckoutConfirmation).mockResolvedValue(
@@ -100,7 +100,7 @@ describe('ConfirmCheckoutUseCase - Enhanced with Confirmation Port', () => {
const state = CheckoutState.ready();
vi.mocked(mockCheckoutService.extractCheckoutInfo).mockResolvedValue(
Result.ok({ price, state })
Result.ok({ price, state, buttonHtml: '' })
);
vi.mocked(mockConfirmationPort.requestCheckoutConfirmation).mockResolvedValue(
@@ -118,7 +118,7 @@ describe('ConfirmCheckoutUseCase - Enhanced with Confirmation Port', () => {
const state = CheckoutState.insufficientFunds();
vi.mocked(mockCheckoutService.extractCheckoutInfo).mockResolvedValue(
Result.ok({ price, state })
Result.ok({ price, state, buttonHtml: '' })
);
const result = await useCase.execute();
@@ -139,7 +139,7 @@ describe('ConfirmCheckoutUseCase - Enhanced with Confirmation Port', () => {
};
vi.mocked(mockCheckoutService.extractCheckoutInfo).mockResolvedValue(
Result.ok({ price, state })
Result.ok({ price, state, buttonHtml: '' })
);
vi.mocked(mockConfirmationPort.requestCheckoutConfirmation).mockResolvedValue(

View File

@@ -1,7 +1,7 @@
import { describe, it, expect, vi, beforeEach, Mock } from 'vitest';
import { StartAutomationSessionUseCase } from '../../../../packages/application/use-cases/StartAutomationSessionUseCase';
import { IAutomationEngine } from '../../../../packages/application/ports/IAutomationEngine';
import { IBrowserAutomation } from '../../../../packages/application/ports/IBrowserAutomation';
import { IScreenAutomation } from '../../../../packages/application/ports/IScreenAutomation';
import { ISessionRepository } from '../../../../packages/application/ports/ISessionRepository';
import { AutomationSession } from '../../../../packages/domain/entities/AutomationSession';
@@ -48,7 +48,7 @@ describe('StartAutomationSessionUseCase', () => {
useCase = new StartAutomationSessionUseCase(
mockAutomationEngine as unknown as IAutomationEngine,
mockBrowserAutomation as unknown as IBrowserAutomation,
mockBrowserAutomation as unknown as IScreenAutomation,
mockSessionRepository as unknown as ISessionRepository
);
});