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,11 +1,11 @@
import { describe, it, expect, beforeAll, afterAll } from 'vitest';
import { StepId } from 'packages/automation-domain/value-objects/StepId';
import { StepId } from '@gridpilot/automation/domain/value-objects/StepId';
import {
FixtureServer,
PlaywrightAutomationAdapter,
} from 'packages/automation-infrastructure/adapters/automation';
import { IRACING_SELECTORS } from 'packages/automation-infrastructure/adapters/automation/dom/IRacingSelectors';
import { PinoLogAdapter } from 'packages/automation-infrastructure/adapters/logging/PinoLogAdapter';
} from 'packages/automation/infrastructure/adapters/automation';
import { IRACING_SELECTORS } from 'packages/automation/infrastructure/adapters/automation/dom/IRacingSelectors';
import { PinoLogAdapter } from 'packages/automation/infrastructure/adapters/logging/PinoLogAdapter';
describe('Real Playwright hosted-session smoke (fixtures, steps 27)', () => {
let server: FixtureServer;

View File

@@ -1,8 +1,8 @@
import { describe, it, expect, beforeAll, afterAll } from 'vitest';
import { DIContainer } from '../../../apps/companion/main/di-container';
import { StepId } from 'packages/automation-domain/value-objects/StepId';
import type { HostedSessionConfig } from 'packages/automation-domain/entities/HostedSessionConfig';
import { PlaywrightAutomationAdapter } from 'packages/automation-infrastructure/adapters/automation';
import { StepId } from '@gridpilot/automation/domain/value-objects/StepId';
import type { HostedSessionConfig } from '@gridpilot/automation/domain/entities/HostedSessionConfig';
import { PlaywrightAutomationAdapter } from 'packages/automation/infrastructure/adapters/automation';
describe('Companion UI - hosted workflow via fixture-backed real stack', () => {
let container: DIContainer;

View File

@@ -1,13 +1,13 @@
import { describe, it, expect, beforeAll, afterAll } from 'vitest';
import { StepId } from 'packages/automation-domain/value-objects/StepId';
import { StepId } from '@gridpilot/automation/domain/value-objects/StepId';
import {
PlaywrightAutomationAdapter,
} from 'packages/automation-infrastructure/adapters/automation';
} from 'packages/automation/infrastructure/adapters/automation';
import {
IRACING_SELECTORS,
IRACING_TIMEOUTS,
} from 'packages/automation-infrastructure/adapters/automation/dom/IRacingSelectors';
import { PinoLogAdapter } from 'packages/automation-infrastructure/adapters/logging/PinoLogAdapter';
} from 'packages/automation/infrastructure/adapters/automation/dom/IRacingSelectors';
import { PinoLogAdapter } from 'packages/automation/infrastructure/adapters/logging/PinoLogAdapter';
const shouldRun = process.env.HOSTED_REAL_E2E === '1';
const describeMaybe = shouldRun ? describe : describe.skip;

View File

@@ -1,13 +1,13 @@
import { describe, it, expect, beforeAll, afterAll } from 'vitest';
import { StepId } from 'packages/automation-domain/value-objects/StepId';
import { StepId } from '@gridpilot/automation/domain/value-objects/StepId';
import {
PlaywrightAutomationAdapter,
} from 'packages/automation-infrastructure/adapters/automation';
} from 'packages/automation/infrastructure/adapters/automation';
import {
IRACING_SELECTORS,
IRACING_TIMEOUTS,
} from 'packages/automation-infrastructure/adapters/automation/dom/IRacingSelectors';
import { PinoLogAdapter } from 'packages/automation-infrastructure/adapters/logging/PinoLogAdapter';
} from 'packages/automation/infrastructure/adapters/automation/dom/IRacingSelectors';
import { PinoLogAdapter } from 'packages/automation/infrastructure/adapters/logging/PinoLogAdapter';
const shouldRun = process.env.HOSTED_REAL_E2E === '1';

View File

@@ -1,15 +1,15 @@
import { describe, it, expect, beforeAll, afterAll } from 'vitest';
import { promises as fs } from 'fs';
import path from 'path';
import { StepId } from 'packages/automation-domain/value-objects/StepId';
import { StepId } from '@gridpilot/automation/domain/value-objects/StepId';
import {
PlaywrightAutomationAdapter,
} from 'packages/automation-infrastructure/adapters/automation';
} from 'packages/automation/infrastructure/adapters/automation';
import {
IRACING_SELECTORS,
IRACING_TIMEOUTS,
} from 'packages/automation-infrastructure/adapters/automation/dom/IRacingSelectors';
import { PinoLogAdapter } from 'packages/automation-infrastructure/adapters/logging/PinoLogAdapter';
} from 'packages/automation/infrastructure/adapters/automation/dom/IRacingSelectors';
import { PinoLogAdapter } from 'packages/automation/infrastructure/adapters/logging/PinoLogAdapter';
const shouldRun = process.env.HOSTED_REAL_E2E === '1';
const describeMaybe = shouldRun ? describe : describe.skip;

View File

@@ -1,7 +1,7 @@
import { describe, it, expect, beforeEach, afterEach } from 'vitest';
import type { StepHarness } from '../support/StepHarness';
import { createStepHarness } from '../support/StepHarness';
import { IRACING_SELECTORS } from 'packages/automation-infrastructure/adapters/automation/dom/IRacingSelectors';
import { IRACING_SELECTORS } from 'packages/automation/infrastructure/adapters/automation/dom/IRacingSelectors';
describe('Step 2 create race', () => {
let harness: StepHarness;

View File

@@ -1,7 +1,7 @@
import { describe, it, expect, beforeEach, afterEach } from 'vitest';
import type { StepHarness } from '../support/StepHarness';
import { createStepHarness } from '../support/StepHarness';
import { IRACING_SELECTORS } from 'packages/automation-infrastructure/adapters/automation/dom/IRacingSelectors';
import { IRACING_SELECTORS } from 'packages/automation/infrastructure/adapters/automation/dom/IRacingSelectors';
describe('Step 3 race information', () => {
let harness: StepHarness;

View File

@@ -1,7 +1,7 @@
import { describe, it, expect, beforeEach, afterEach } from 'vitest';
import type { StepHarness } from '../support/StepHarness';
import { createStepHarness } from '../support/StepHarness';
import { IRACING_SELECTORS } from 'packages/automation-infrastructure/adapters/automation/dom/IRacingSelectors';
import { IRACING_SELECTORS } from 'packages/automation/infrastructure/adapters/automation/dom/IRacingSelectors';
describe('Step 4 server details', () => {
let harness: StepHarness;

View File

@@ -1,7 +1,7 @@
import { describe, it, expect, beforeEach, afterEach } from 'vitest';
import type { StepHarness } from '../support/StepHarness';
import { createStepHarness } from '../support/StepHarness';
import { IRACING_SELECTORS } from 'packages/automation-infrastructure/adapters/automation/dom/IRacingSelectors';
import { IRACING_SELECTORS } from 'packages/automation/infrastructure/adapters/automation/dom/IRacingSelectors';
describe('Step 5 set admins', () => {
let harness: StepHarness;

View File

@@ -1,7 +1,7 @@
import { describe, it, expect, beforeEach, afterEach } from 'vitest';
import type { StepHarness } from '../support/StepHarness';
import { createStepHarness } from '../support/StepHarness';
import { IRACING_SELECTORS } from 'packages/automation-infrastructure/adapters/automation/dom/IRacingSelectors';
import { IRACING_SELECTORS } from 'packages/automation/infrastructure/adapters/automation/dom/IRacingSelectors';
describe('Step 6 admins', () => {
let harness: StepHarness;

View File

@@ -1,7 +1,7 @@
import { describe, it, expect, beforeEach, afterEach } from 'vitest';
import type { StepHarness } from '../support/StepHarness';
import { createStepHarness } from '../support/StepHarness';
import { IRACING_SELECTORS } from 'packages/automation-infrastructure/adapters/automation/dom/IRacingSelectors';
import { IRACING_SELECTORS } from 'packages/automation/infrastructure/adapters/automation/dom/IRacingSelectors';
describe('Step 7 time limits', () => {
let harness: StepHarness;

View File

@@ -1,7 +1,7 @@
import { describe, it, expect, beforeEach, afterEach } from 'vitest';
import type { StepHarness } from '../support/StepHarness';
import { createStepHarness } from '../support/StepHarness';
import { IRACING_SELECTORS } from 'packages/automation-infrastructure/adapters/automation/dom/IRacingSelectors';
import { IRACING_SELECTORS } from 'packages/automation/infrastructure/adapters/automation/dom/IRacingSelectors';
describe('Step 8 cars', () => {
let harness: StepHarness;

View File

@@ -1,7 +1,7 @@
import { describe, it, expect, beforeEach, afterEach } from 'vitest';
import type { StepHarness } from '../support/StepHarness';
import { createStepHarness } from '../support/StepHarness';
import { IRACING_SELECTORS } from 'packages/automation-infrastructure/adapters/automation/dom/IRacingSelectors';
import { IRACING_SELECTORS } from 'packages/automation/infrastructure/adapters/automation/dom/IRacingSelectors';
describe('Step 13 track options', () => {
let harness: StepHarness;

View File

@@ -1,7 +1,7 @@
import { describe, it, expect, beforeEach, afterEach } from 'vitest';
import type { StepHarness } from '../support/StepHarness';
import { createStepHarness } from '../support/StepHarness';
import { IRACING_SELECTORS } from 'packages/automation-infrastructure/adapters/automation/dom/IRacingSelectors';
import { IRACING_SELECTORS } from 'packages/automation/infrastructure/adapters/automation/dom/IRacingSelectors';
describe('Step 14 time of day', () => {
let harness: StepHarness;

View File

@@ -1,7 +1,7 @@
import { describe, it, expect, beforeEach, afterEach } from 'vitest';
import type { StepHarness } from '../support/StepHarness';
import { createStepHarness } from '../support/StepHarness';
import { IRACING_SELECTORS } from 'packages/automation-infrastructure/adapters/automation/dom/IRacingSelectors';
import { IRACING_SELECTORS } from 'packages/automation/infrastructure/adapters/automation/dom/IRacingSelectors';
describe('Step 15 weather', () => {
let harness: StepHarness;

View File

@@ -1,7 +1,7 @@
import { describe, it, expect, beforeEach, afterEach } from 'vitest';
import type { StepHarness } from '../support/StepHarness';
import { createStepHarness } from '../support/StepHarness';
import { CheckoutConfirmation } from 'packages/automation-domain/value-objects/CheckoutConfirmation';
import { CheckoutConfirmation } from '@gridpilot/automation/domain/value-objects/CheckoutConfirmation';
describe('Step 17 team driving', () => {
let harness: StepHarness;

View File

@@ -1,6 +1,6 @@
import { StepId } from 'packages/automation-domain/value-objects/StepId';
import type { PlaywrightAutomationAdapter } from 'packages/automation-infrastructure/adapters/automation';
import type { AutomationResult } from 'packages/automation-application/ports/AutomationResults';
import { StepId } from '@gridpilot/automation/domain/value-objects/StepId';
import type { PlaywrightAutomationAdapter } from 'packages/automation/infrastructure/adapters/automation';
import type { AutomationResult } from 'packages/automation/application/ports/AutomationResults';
export function assertAutoNavigationConfig(config: Record<string, unknown>): void {
if ((config as any).__skipFixtureNavigation) {

View File

@@ -1,10 +1,10 @@
import type { AutomationResult } from 'packages/automation-application/ports/AutomationResults';
import { StepId } from 'packages/automation-domain/value-objects/StepId';
import type { AutomationResult } from 'packages/automation/application/ports/AutomationResults';
import { StepId } from '@gridpilot/automation/domain/value-objects/StepId';
import {
PlaywrightAutomationAdapter,
FixtureServer,
} from 'packages/automation-infrastructure/adapters/automation';
import { PinoLogAdapter } from 'packages/automation-infrastructure/adapters/logging/PinoLogAdapter';
} from 'packages/automation/infrastructure/adapters/automation';
import { PinoLogAdapter } from 'packages/automation/infrastructure/adapters/logging/PinoLogAdapter';
export interface StepHarness {
server: FixtureServer;

View File

@@ -2,9 +2,9 @@ import { describe, it, expect, beforeAll, afterAll } from 'vitest';
import {
PlaywrightAutomationAdapter,
FixtureServer,
} from 'packages/automation-infrastructure/adapters/automation';
import { StepId } from 'packages/automation-domain/value-objects/StepId';
import { PinoLogAdapter } from 'packages/automation-infrastructure/adapters/logging/PinoLogAdapter';
} from 'packages/automation/infrastructure/adapters/automation';
import { StepId } from '@gridpilot/automation/domain/value-objects/StepId';
import { PinoLogAdapter } from 'packages/automation/infrastructure/adapters/logging/PinoLogAdapter';
import { executeStepWithAutoNavigationGuard } from '../support/AutoNavGuard';
describe('Hosted validator guards (fixture-backed, real stack)', () => {

View File

@@ -2,10 +2,10 @@ import { describe, it, expect, beforeAll, afterAll } from 'vitest';
import {
PlaywrightAutomationAdapter,
FixtureServer,
} from 'packages/automation-infrastructure/adapters/automation';
import { StepId } from 'packages/automation-domain/value-objects/StepId';
import { PinoLogAdapter } from 'packages/automation-infrastructure/adapters/logging/PinoLogAdapter';
import { IRACING_SELECTORS } from 'packages/automation-infrastructure/adapters/automation/dom/IRacingSelectors';
} from 'packages/automation/infrastructure/adapters/automation';
import { StepId } from '@gridpilot/automation/domain/value-objects/StepId';
import { PinoLogAdapter } from 'packages/automation/infrastructure/adapters/logging/PinoLogAdapter';
import { IRACING_SELECTORS } from 'packages/automation/infrastructure/adapters/automation/dom/IRacingSelectors';
import { executeStepWithAutoNavigationGuard } from '../support/AutoNavGuard';
describe('Workflow hosted session autonav slice (fixture-backed, real stack)', () => {

View File

@@ -2,12 +2,12 @@ import { describe, it, expect, beforeAll, afterAll } from 'vitest';
import {
PlaywrightAutomationAdapter,
FixtureServer,
} from 'packages/automation-infrastructure/adapters/automation';
import { InMemorySessionRepository } from 'packages/automation-infrastructure/repositories/InMemorySessionRepository';
import { AutomationEngineAdapter } from 'packages/automation-infrastructure/adapters/automation/engine/AutomationEngineAdapter';
import { StartAutomationSessionUseCase } from 'packages/automation-application/use-cases/StartAutomationSessionUseCase';
import { StepId } from 'packages/automation-domain/value-objects/StepId';
import { PinoLogAdapter } from 'packages/automation-infrastructure/adapters/logging/PinoLogAdapter';
} from 'packages/automation/infrastructure/adapters/automation';
import { InMemorySessionRepository } from 'packages/automation/infrastructure/repositories/InMemorySessionRepository';
import { AutomationEngineAdapter } from 'packages/automation/infrastructure/adapters/automation/engine/AutomationEngineAdapter';
import { StartAutomationSessionUseCase } from 'packages/automation/application/use-cases/StartAutomationSessionUseCase';
import { StepId } from '@gridpilot/automation/domain/value-objects/StepId';
import { PinoLogAdapter } from 'packages/automation/infrastructure/adapters/logging/PinoLogAdapter';
describe('Workflow hosted session end-to-end (fixture-backed, real stack)', () => {
let server: FixtureServer;

View File

@@ -2,10 +2,10 @@ import { describe, it, expect, beforeAll, afterAll } from 'vitest';
import {
PlaywrightAutomationAdapter,
FixtureServer,
} from 'packages/automation-infrastructure/adapters/automation';
import { StepId } from 'packages/automation-domain/value-objects/StepId';
import { IRACING_SELECTORS } from 'packages/automation-infrastructure/adapters/automation/dom/IRacingSelectors';
import { PinoLogAdapter } from 'packages/automation-infrastructure/adapters/logging/PinoLogAdapter';
} from 'packages/automation/infrastructure/adapters/automation';
import { StepId } from '@gridpilot/automation/domain/value-objects/StepId';
import { IRACING_SELECTORS } from 'packages/automation/infrastructure/adapters/automation/dom/IRacingSelectors';
import { PinoLogAdapter } from 'packages/automation/infrastructure/adapters/logging/PinoLogAdapter';
describe('Workflow steps 79 cars flow (fixture-backed, real stack)', () => {
let adapter: PlaywrightAutomationAdapter;