wip
This commit is contained in:
@@ -77,7 +77,7 @@ describe('Browser Mode Integration - GREEN Phase', () => {
|
||||
process.env.NODE_ENV = 'production';
|
||||
|
||||
const { PlaywrightAutomationAdapter } = await import(
|
||||
'packages/infrastructure/adapters/automation'
|
||||
'packages/automation-infrastructure/adapters/automation'
|
||||
);
|
||||
|
||||
adapter = new PlaywrightAutomationAdapter({
|
||||
@@ -96,7 +96,7 @@ describe('Browser Mode Integration - GREEN Phase', () => {
|
||||
process.env.NODE_ENV = 'test';
|
||||
|
||||
const { PlaywrightAutomationAdapter } = await import(
|
||||
'packages/infrastructure/adapters/automation'
|
||||
'packages/automation-infrastructure/adapters/automation'
|
||||
);
|
||||
|
||||
adapter = new PlaywrightAutomationAdapter({
|
||||
@@ -115,7 +115,7 @@ describe('Browser Mode Integration - GREEN Phase', () => {
|
||||
delete process.env.NODE_ENV;
|
||||
|
||||
const { PlaywrightAutomationAdapter } = await import(
|
||||
'packages/infrastructure/adapters/automation'
|
||||
'packages/automation-infrastructure/adapters/automation'
|
||||
);
|
||||
|
||||
adapter = new PlaywrightAutomationAdapter({
|
||||
@@ -139,7 +139,7 @@ describe('Browser Mode Integration - GREEN Phase', () => {
|
||||
process.env.NODE_ENV = 'production';
|
||||
|
||||
const { PlaywrightAutomationAdapter } = await import(
|
||||
'packages/infrastructure/adapters/automation'
|
||||
'packages/automation-infrastructure/adapters/automation'
|
||||
);
|
||||
|
||||
adapter = new PlaywrightAutomationAdapter({
|
||||
@@ -155,7 +155,7 @@ describe('Browser Mode Integration - GREEN Phase', () => {
|
||||
process.env.NODE_ENV = 'test';
|
||||
|
||||
const { PlaywrightAutomationAdapter } = await import(
|
||||
'packages/infrastructure/adapters/automation'
|
||||
'packages/automation-infrastructure/adapters/automation'
|
||||
);
|
||||
|
||||
adapter = new PlaywrightAutomationAdapter({
|
||||
@@ -187,7 +187,7 @@ describe('Browser Mode Integration - GREEN Phase', () => {
|
||||
};
|
||||
|
||||
const { PlaywrightAutomationAdapter } = await import(
|
||||
'packages/infrastructure/adapters/automation'
|
||||
'packages/automation-infrastructure/adapters/automation'
|
||||
);
|
||||
|
||||
adapter = new PlaywrightAutomationAdapter(
|
||||
@@ -213,7 +213,7 @@ describe('Browser Mode Integration - GREEN Phase', () => {
|
||||
process.env.NODE_ENV = 'production';
|
||||
|
||||
const { PlaywrightAutomationAdapter } = await import(
|
||||
'packages/infrastructure/adapters/automation'
|
||||
'packages/automation-infrastructure/adapters/automation'
|
||||
);
|
||||
|
||||
const userDataDir = path.join(process.cwd(), 'test-browser-data');
|
||||
@@ -239,10 +239,10 @@ describe('Browser Mode Integration - GREEN Phase', () => {
|
||||
it('reads mode from injected loader and passes headless flag to launcher accordingly', async () => {
|
||||
process.env.NODE_ENV = 'development';
|
||||
const { PlaywrightAutomationAdapter } = await import(
|
||||
'packages/infrastructure/adapters/automation'
|
||||
'packages/automation-infrastructure/adapters/automation'
|
||||
);
|
||||
const { BrowserModeConfigLoader } = await import(
|
||||
'../../../packages/infrastructure/config/BrowserModeConfig'
|
||||
'../../../packages/automation-infrastructure/config/BrowserModeConfig'
|
||||
);
|
||||
|
||||
// Create loader and set to headed
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { describe, it, expect, beforeEach, vi } from 'vitest';
|
||||
import { Result } from '../../../packages/shared/result/Result';
|
||||
import { CheckoutPriceExtractor } from '../../../packages/infrastructure/adapters/automation/CheckoutPriceExtractor';
|
||||
import { CheckoutStateEnum } from '../../../packages/domain/value-objects/CheckoutState';
|
||||
import { CheckoutPriceExtractor } from '../../../packages/automation-infrastructure/adapters/automation/CheckoutPriceExtractor';
|
||||
import { CheckoutStateEnum } from '../../../packages/automation-domain/value-objects/CheckoutState';
|
||||
|
||||
/**
|
||||
* CheckoutPriceExtractor Integration Tests - GREEN PHASE
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
*/
|
||||
|
||||
import { describe, it, expect, beforeAll, afterAll } from 'vitest';
|
||||
import { FixtureServer, getAllStepFixtureMappings, PlaywrightAutomationAdapter } from 'packages/infrastructure/adapters/automation';
|
||||
import { FixtureServer, getAllStepFixtureMappings, PlaywrightAutomationAdapter } from 'packages/automation-infrastructure/adapters/automation';
|
||||
|
||||
declare const getComputedStyle: any;
|
||||
declare const document: any;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { describe, it, expect, beforeEach } from 'vitest';
|
||||
import { InMemorySessionRepository } from '../../../packages/infrastructure/repositories/InMemorySessionRepository';
|
||||
import { AutomationSession } from '../../../packages/domain/entities/AutomationSession';
|
||||
import { StepId } from '../../../packages/domain/value-objects/StepId';
|
||||
import { InMemorySessionRepository } from '../../../packages/automation-infrastructure/repositories/InMemorySessionRepository';
|
||||
import { AutomationSession } from '../../../packages/automation-domain/entities/AutomationSession';
|
||||
import { StepId } from '../../../packages/automation-domain/value-objects/StepId';
|
||||
|
||||
describe('InMemorySessionRepository Integration Tests', () => {
|
||||
let repository: InMemorySessionRepository;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { describe, it, expect, beforeEach, afterEach, vi } from 'vitest';
|
||||
import { MockBrowserAutomationAdapter } from 'packages/infrastructure/adapters/automation';
|
||||
import { StepId } from 'packages/domain/value-objects/StepId';
|
||||
import { MockBrowserAutomationAdapter } from 'packages/automation-infrastructure/adapters/automation';
|
||||
import { StepId } from 'packages/automation-domain/value-objects/StepId';
|
||||
|
||||
describe('MockBrowserAutomationAdapter Integration Tests', () => {
|
||||
let adapter: MockBrowserAutomationAdapter;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { describe, test, expect } from 'vitest'
|
||||
import { PlaywrightAutomationAdapter } from 'packages/infrastructure/adapters/automation'
|
||||
import { PlaywrightAutomationAdapter } from 'packages/automation-infrastructure/adapters/automation'
|
||||
|
||||
describe('CarsFlow integration', () => {
|
||||
test('adapter emits panel-attached then action-started then action-complete for performAddCar', async () => {
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
import { describe, it, expect } from 'vitest';
|
||||
import { OverlaySyncService } from 'packages/application/services/OverlaySyncService';
|
||||
import type { AutomationEvent } from 'packages/application/ports/IAutomationEventPublisher';
|
||||
import { OverlaySyncService } from 'packages/automation-application/services/OverlaySyncService';
|
||||
import type { AutomationEvent } from 'packages/automation-application/ports/IAutomationEventPublisher';
|
||||
import type {
|
||||
IAutomationLifecycleEmitter,
|
||||
LifecycleCallback,
|
||||
} from 'packages/infrastructure/adapters/IAutomationLifecycleEmitter';
|
||||
} from 'packages/automation-infrastructure/adapters/IAutomationLifecycleEmitter';
|
||||
import type {
|
||||
OverlayAction,
|
||||
ActionAck,
|
||||
} from 'packages/application/ports/IOverlaySyncPort';
|
||||
} from 'packages/automation-application/ports/IOverlaySyncPort';
|
||||
|
||||
class TestLifecycleEmitter implements IAutomationLifecycleEmitter {
|
||||
private callbacks: Set<LifecycleCallback> = new Set();
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import { describe, it, expect } from 'vitest';
|
||||
import { PageStateValidator } from 'packages/domain/services/PageStateValidator';
|
||||
import { StepTransitionValidator } from 'packages/domain/services/StepTransitionValidator';
|
||||
import { StepId } from 'packages/domain/value-objects/StepId';
|
||||
import { SessionState } from 'packages/domain/value-objects/SessionState';
|
||||
import { PageStateValidator } from 'packages/automation-domain/services/PageStateValidator';
|
||||
import { StepTransitionValidator } from 'packages/automation-domain/services/StepTransitionValidator';
|
||||
import { StepId } from 'packages/automation-domain/value-objects/StepId';
|
||||
import { SessionState } from 'packages/automation-domain/value-objects/SessionState';
|
||||
|
||||
describe('Validator conformance (integration)', () => {
|
||||
describe('PageStateValidator with hosted-session selectors', () => {
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import { describe, it, expect, beforeEach, afterEach } from 'vitest';
|
||||
import { DIContainer } from '../../../..//apps/companion/main/di-container';
|
||||
import type { HostedSessionConfig } from '../../../..//packages/domain/entities/HostedSessionConfig';
|
||||
import { StepId } from '../../../..//packages/domain/value-objects/StepId';
|
||||
import { PlaywrightAutomationAdapter } from '../../../..//packages/infrastructure/adapters/automation';
|
||||
import type { HostedSessionConfig } from '../../../..//packages/automation-domain/entities/HostedSessionConfig';
|
||||
import { StepId } from '../../../..//packages/automation-domain/value-objects/StepId';
|
||||
import { PlaywrightAutomationAdapter } from '../../../..//packages/automation-infrastructure/adapters/automation';
|
||||
|
||||
describe('companion start automation - browser mode refresh wiring', () => {
|
||||
const originalEnv = { ...process.env };
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import { describe, it, expect, beforeEach, afterEach } from 'vitest';
|
||||
import { DIContainer } from '../../../..//apps/companion/main/di-container';
|
||||
import type { HostedSessionConfig } from '../../../..//packages/domain/entities/HostedSessionConfig';
|
||||
import { StepId } from '../../../..//packages/domain/value-objects/StepId';
|
||||
import { PlaywrightAutomationAdapter } from '../../../..//packages/infrastructure/adapters/automation';
|
||||
import type { HostedSessionConfig } from '../../../..//packages/automation-domain/entities/HostedSessionConfig';
|
||||
import { StepId } from '../../../..//packages/automation-domain/value-objects/StepId';
|
||||
import { PlaywrightAutomationAdapter } from '../../../..//packages/automation-infrastructure/adapters/automation';
|
||||
|
||||
describe('companion start automation - browser not connected at step 1', () => {
|
||||
const originalEnv = { ...process.env };
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { describe, it, expect, beforeEach, afterEach, vi } from 'vitest';
|
||||
import { DIContainer } from '../../../..//apps/companion/main/di-container';
|
||||
import type { HostedSessionConfig } from '../../../..//packages/domain/entities/HostedSessionConfig';
|
||||
import { PlaywrightAutomationAdapter } from '../../../..//packages/infrastructure/adapters/automation';
|
||||
import type { HostedSessionConfig } from '../../../..//packages/automation-domain/entities/HostedSessionConfig';
|
||||
import { PlaywrightAutomationAdapter } from '../../../..//packages/automation-infrastructure/adapters/automation';
|
||||
|
||||
describe('companion start automation - browser connection failure before steps', () => {
|
||||
const originalEnv = { ...process.env };
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { describe, it, expect, beforeEach, afterEach } from 'vitest';
|
||||
import { DIContainer } from '../../../..//apps/companion/main/di-container';
|
||||
import type { HostedSessionConfig } from '../../../..//packages/domain/entities/HostedSessionConfig';
|
||||
import { StepId } from '../../../..//packages/domain/value-objects/StepId';
|
||||
import type { HostedSessionConfig } from '../../../..//packages/automation-domain/entities/HostedSessionConfig';
|
||||
import { StepId } from '../../../..//packages/automation-domain/value-objects/StepId';
|
||||
|
||||
describe('companion start automation - happy path', () => {
|
||||
const originalEnv = { ...process.env };
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import { describe, it, expect } from 'vitest';
|
||||
import { MockAutomationLifecycleEmitter } from '../../../mocks/MockAutomationLifecycleEmitter';
|
||||
import { OverlaySyncService } from 'packages/application/services/OverlaySyncService';
|
||||
import type { AutomationEvent } from 'packages/application/ports/IAutomationEventPublisher';
|
||||
import type { OverlayAction } from 'packages/application/ports/IOverlaySyncPort';
|
||||
import { OverlaySyncService } from 'packages/automation-application/services/OverlaySyncService';
|
||||
import type { AutomationEvent } from 'packages/automation-application/ports/IAutomationEventPublisher';
|
||||
import type { OverlayAction } from 'packages/automation-application/ports/IOverlaySyncPort';
|
||||
|
||||
type RendererOverlayState =
|
||||
| { status: 'idle' }
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { describe, expect, test } from 'vitest'
|
||||
import { MockAutomationLifecycleEmitter } from '../../../mocks/MockAutomationLifecycleEmitter'
|
||||
import { OverlaySyncService } from 'packages/application/services/OverlaySyncService'
|
||||
import { OverlaySyncService } from 'packages/automation-application/services/OverlaySyncService'
|
||||
|
||||
describe('renderer overlay integration', () => {
|
||||
test('renderer shows confirmed only after main acks confirmed', async () => {
|
||||
|
||||
Reference in New Issue
Block a user