This commit is contained in:
2025-12-01 17:27:56 +01:00
parent e7ada8aa23
commit 98a09a3f2b
41 changed files with 2341 additions and 1525 deletions

View File

@@ -17,23 +17,23 @@ describe('Step 8 cars', () => {
describe('alignment', () => {
it('executes on Cars page in mock wizard and exposes Add Car UI', async () => {
await harness.navigateToFixtureStep(8);
const page = harness.adapter.getPage();
expect(page).not.toBeNull();
const carsContainer = page!
.locator(IRACING_SELECTORS.wizard.stepContainers.cars)
.first();
expect(await carsContainer.count()).toBeGreaterThan(0);
const addCarButton = page!
.locator(IRACING_SELECTORS.steps.addCarButton)
.first();
const addCarText = await addCarButton.innerText();
expect(addCarText.toLowerCase()).toContain('add a car');
const result = await harness.executeStep(8, {});
const result = await harness.executeStepWithFixtureMismatch(8, {});
expect(result.success).toBe(true);
expect(result.error).toBeUndefined();
});
@@ -45,7 +45,7 @@ describe('Step 8 cars', () => {
await harness.adapter.getPage()?.waitForLoadState('domcontentloaded');
await expect(async () => {
await harness.executeStep(8, {});
await harness.executeStepWithFixtureMismatch(8, {});
}).rejects.toThrow(/Step 8 FAILED validation/i);
});
@@ -54,7 +54,7 @@ describe('Step 8 cars', () => {
await harness.adapter.getPage()?.waitForLoadState('domcontentloaded');
await expect(async () => {
await harness.executeStep(8, {});
await harness.executeStepWithFixtureMismatch(8, {});
}).rejects.toThrow(/Step 8 FAILED validation/i);
});
@@ -62,7 +62,7 @@ describe('Step 8 cars', () => {
await harness.navigateToFixtureStep(8);
await harness.adapter.getPage()?.waitForLoadState('domcontentloaded');
const result = await harness.executeStep(8, {});
const result = await harness.executeStepWithFixtureMismatch(8, {});
expect(result.success).toBe(true);
});