wip
This commit is contained in:
@@ -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 2–7)', () => {
|
||||
let server: FixtureServer;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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';
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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)', () => {
|
||||
|
||||
@@ -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)', () => {
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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 7–9 cars flow (fixture-backed, real stack)', () => {
|
||||
let adapter: PlaywrightAutomationAdapter;
|
||||
|
||||
Reference in New Issue
Block a user