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

@@ -1,6 +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/infrastructure/adapters/automation/dom/IRacingSelectors';
describe('Step 5 set admins', () => {
let harness: StepHarness;
@@ -18,11 +19,17 @@ describe('Step 5 set admins', () => {
const page = harness.adapter.getPage();
expect(page).not.toBeNull();
const sidebarAdmins = await page!.textContent(
'#wizard-sidebar-link-set-admins',
);
expect(sidebarAdmins).toContain('Admins');
const sidebarAdmins = await page!
.locator(IRACING_SELECTORS.wizard.sidebarLinks.admins)
.first()
.innerText();
expect(sidebarAdmins).toMatch(/Admins/i);
const adminsContainer = page!
.locator(IRACING_SELECTORS.wizard.stepContainers.admins)
.first();
expect(await adminsContainer.count()).toBeGreaterThan(0);
const bodyText = await page!.textContent('body');
expect(bodyText).toContain('Add an Admin');