39 lines
1.1 KiB
TypeScript
39 lines
1.1 KiB
TypeScript
import { describe, it, expect, beforeEach, afterEach } from 'vitest';
|
||
import type { StepHarness } from '../support/StepHarness';
|
||
import { createStepHarness } from '../support/StepHarness';
|
||
|
||
describe('Step 3 – race information', () => {
|
||
let harness: StepHarness;
|
||
|
||
beforeEach(async () => {
|
||
harness = await createStepHarness();
|
||
});
|
||
|
||
afterEach(async () => {
|
||
await harness.dispose();
|
||
});
|
||
|
||
it('fills race information on Race Information page', async () => {
|
||
await harness.navigateToFixtureStep(3);
|
||
|
||
const page = harness.adapter.getPage();
|
||
expect(page).not.toBeNull();
|
||
|
||
const sidebarRaceInfo = await page!.textContent(
|
||
'#wizard-sidebar-link-set-session-information',
|
||
);
|
||
expect(sidebarRaceInfo).toContain('Race Information');
|
||
|
||
const result = await harness.executeStep(3, {
|
||
sessionName: 'GridPilot E2E Session',
|
||
password: 'secret',
|
||
description: 'Step 3 race information E2E',
|
||
});
|
||
|
||
expect(result.success).toBe(true);
|
||
expect(result.error).toBeUndefined();
|
||
|
||
const footerText = await page!.textContent('.wizard-footer');
|
||
expect(footerText).toMatch(/Server Details|Admins/i);
|
||
});
|
||
}); |