wip
This commit is contained in:
@@ -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);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user