This commit is contained in:
2025-12-04 11:54:42 +01:00
parent 9d5caa87f3
commit b7d5551ea7
223 changed files with 5473 additions and 885 deletions

View File

@@ -1,5 +1,5 @@
import { describe, it, expect, beforeEach, afterEach, vi } from 'vitest';
import { loadAutomationConfig, getAutomationMode, AutomationMode } from '../../../packages/automation-infrastructure/config/AutomationConfig';
import { loadAutomationConfig, getAutomationMode, AutomationMode } from '../../../packages/automation/infrastructure/config/AutomationConfig';
describe('AutomationConfig', () => {
const originalEnv = process.env;

View File

@@ -1,6 +1,6 @@
import { describe, test, expect, beforeEach, vi } from 'vitest';
import type { Page } from 'playwright';
import { AuthenticationGuard } from 'packages/automation-infrastructure/adapters/automation/auth/AuthenticationGuard';
import { AuthenticationGuard } from 'packages/automation/infrastructure/adapters/automation/auth/AuthenticationGuard';
describe('AuthenticationGuard', () => {
let mockPage: Page;

View File

@@ -9,9 +9,9 @@ vi.mock('electron', () => ({
},
}));
import { ElectronCheckoutConfirmationAdapter } from '@/packages/automation-infrastructure/adapters/ipc/ElectronCheckoutConfirmationAdapter';
import { CheckoutPrice } from '@/packages/automation-domain/value-objects/CheckoutPrice';
import { CheckoutState } from '@/packages/automation-domain/value-objects/CheckoutState';
import { ElectronCheckoutConfirmationAdapter } from '@/packages/automation/infrastructure/adapters/ipc/ElectronCheckoutConfirmationAdapter';
import { CheckoutPrice } from '@gridpilot/automation/domain/value-objects/CheckoutPrice';
import { CheckoutState } from '@gridpilot/automation/domain/value-objects/CheckoutState';
import { ipcMain } from 'electron';
describe('ElectronCheckoutConfirmationAdapter', () => {

View File

@@ -1,11 +1,11 @@
import { describe, it, expect, vi, beforeEach, afterEach } from 'vitest';
import type { Page, BrowserContext } from 'playwright';
import { PlaywrightAuthSessionService } from '../../../../packages/automation-infrastructure/adapters/automation/auth/PlaywrightAuthSessionService';
import type { PlaywrightBrowserSession } from '../../../../packages/automation-infrastructure/adapters/automation/core/PlaywrightBrowserSession';
import type { SessionCookieStore } from '../../../../packages/automation-infrastructure/adapters/automation/auth/SessionCookieStore';
import type { IPlaywrightAuthFlow } from '../../../../packages/automation-infrastructure/adapters/automation/auth/PlaywrightAuthFlow';
import type { ILogger } from '../../../../packages/automation-application/ports/ILogger';
import { AuthenticationState } from '../../../../packages/automation-domain/value-objects/AuthenticationState';
import { PlaywrightAuthSessionService } from '../../../../packages/automation/infrastructure/adapters/automation/auth/PlaywrightAuthSessionService';
import type { PlaywrightBrowserSession } from '../../../../packages/automation/infrastructure/adapters/automation/core/PlaywrightBrowserSession';
import type { SessionCookieStore } from '../../../../packages/automation/infrastructure/adapters/automation/auth/SessionCookieStore';
import type { IPlaywrightAuthFlow } from '../../../../packages/automation/infrastructure/adapters/automation/auth/PlaywrightAuthFlow';
import type { ILogger } from '../../../../packages/automation/application/ports/ILogger';
import { AuthenticationState } from '@gridpilot/automation/domain/value-objects/AuthenticationState';
import { Result } from '../../../../packages/shared/result/Result';
describe('PlaywrightAuthSessionService.initiateLogin browser mode behaviour', () => {

View File

@@ -1,13 +1,13 @@
import { describe, it, expect, vi } from 'vitest';
import type { Page, Locator } from 'playwright';
import { PlaywrightAuthSessionService } from '../../../../packages/automation-infrastructure/adapters/automation/auth/PlaywrightAuthSessionService';
import { AuthenticationState } from '../../../../packages/automation-domain/value-objects/AuthenticationState';
import { BrowserAuthenticationState } from '../../../../packages/automation-domain/value-objects/BrowserAuthenticationState';
import type { ILogger } from '../../../../packages/automation-application/ports/ILogger';
import { PlaywrightAuthSessionService } from '../../../../packages/automation/infrastructure/adapters/automation/auth/PlaywrightAuthSessionService';
import { AuthenticationState } from '@gridpilot/automation/domain/value-objects/AuthenticationState';
import { BrowserAuthenticationState } from '@gridpilot/automation/domain/value-objects/BrowserAuthenticationState';
import type { ILogger } from '../../../../packages/automation/application/ports/ILogger';
import type { Result } from '../../../../packages/shared/result/Result';
import type { PlaywrightBrowserSession } from '../../../../packages/automation-infrastructure/adapters/automation/core/PlaywrightBrowserSession';
import type { SessionCookieStore } from '../../../../packages/automation-infrastructure/adapters/automation/auth/SessionCookieStore';
import type { IPlaywrightAuthFlow } from '../../../../packages/automation-infrastructure/adapters/automation/auth/PlaywrightAuthFlow';
import type { PlaywrightBrowserSession } from '../../../../packages/automation/infrastructure/adapters/automation/core/PlaywrightBrowserSession';
import type { SessionCookieStore } from '../../../../packages/automation/infrastructure/adapters/automation/auth/SessionCookieStore';
import type { IPlaywrightAuthFlow } from '../../../../packages/automation/infrastructure/adapters/automation/auth/PlaywrightAuthFlow';
describe('PlaywrightAuthSessionService.verifyPageAuthentication', () => {
function createService(deps: {

View File

@@ -1,5 +1,5 @@
import { describe, test, expect, beforeEach } from 'vitest';
import { SessionCookieStore } from 'packages/automation-infrastructure/adapters/automation/auth/SessionCookieStore';
import { SessionCookieStore } from 'packages/automation/infrastructure/adapters/automation/auth/SessionCookieStore';
import type { Cookie } from 'playwright';
describe('SessionCookieStore - Cookie Validation', () => {

View File

@@ -1,5 +1,5 @@
import { describe, it, expect, beforeEach, afterEach } from 'vitest';
import { BrowserModeConfigLoader } from '../../../../packages/automation-infrastructure/config/BrowserModeConfig';
import { BrowserModeConfigLoader } from '../../../../packages/automation/infrastructure/config/BrowserModeConfig';
/**
* Unit tests for BrowserModeConfig - GREEN PHASE